From 83b9bf0e3bfb1d842b10b80bbe749095b2c661a1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 22 Feb 2010 18:58:28 +0000 Subject: Added old KDE3 version of Krusader git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krusader@1094427 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- AUTHORS | 2 + COPYING | 280 + CVSNEWS | 340 + ChangeLog | 1277 +++ FAQ | 813 ++ INSTALL | 780 ++ Krusader.kdevelop | 213 + Makefile.am | 27 + Makefile.cvs | 14 + Makefile.dist | 14 + README | 405 + TODO | 20 + acinclude.m4 | 11919 +++++++++++++++++++++++ aclocal.m4 | 863 ++ config.h.in | 248 + configure.files | 2 + configure.in | 297 + configure.in.in | 108 + dist2rpm | 6 + doc/ChangeLog | 577 ++ doc/Makefile.am | 15 + doc/actions_tutorial.txt | 70 + doc/en/Makefile.am | 11 + doc/en/archives.docbook | 125 + doc/en/bookmarks.docbook | 289 + doc/en/checksum.docbook | 34 + doc/en/commands.docbook | 2129 ++++ doc/en/compare.docbook | 89 + doc/en/configuration-files.docbook | 165 + doc/en/credits.docbook | 310 + doc/en/diskusage.docbook | 120 + doc/en/editors-note.docbook | 73 + doc/en/faq.docbook | 1848 ++++ doc/en/features.docbook | 515 + doc/en/glossary.docbook | 355 + doc/en/help.docbook | 158 + doc/en/index.docbook | 594 ++ doc/en/installation.docbook | 1250 +++ doc/en/introduction.docbook | 145 + doc/en/java.docbook | 88 + doc/en/keyboard.docbook | 1864 ++++ doc/en/konfigurator.docbook | 1907 ++++ doc/en/krusader-tools.docbook | 35 + doc/en/locate.docbook | 114 + doc/en/more.docbook | 65 + doc/en/mount.docbook | 80 + doc/en/mouse.docbook | 45 + doc/en/occupied-space.docbook | 45 + doc/en/profiles.docbook | 57 + doc/en/release-overview.docbook | 647 ++ doc/en/remote-connections.docbook | 267 + doc/en/search.docbook | 328 + doc/en/splitter.docbook | 61 + doc/en/synchronizer.docbook | 730 ++ doc/en/user-interface.docbook | 863 ++ doc/en/useraction-xml.docbook | 217 + doc/en/useractions.docbook | 644 ++ doc/en/using-krusader.docbook | 426 + doc/en/vfs.docbook | 83 + doc/en/viewer-editor.docbook | 1127 +++ doc/fdl-license | 356 + doc/krusader.1 | 185 + doc/pics/Makefile.am | 60 + doc/pics/actionman.png | Bin 0 -> 51580 bytes doc/pics/bookmanadd.png | Bin 0 -> 22545 bytes doc/pics/bookmanedit.png | Bin 0 -> 32915 bytes doc/pics/cmdline.png | Bin 0 -> 5032 bytes doc/pics/fnkeys.png | Bin 0 -> 5711 bytes doc/pics/kgstartup.png | Bin 0 -> 40705 bytes doc/pics/krusader1.png | Bin 0 -> 49280 bytes doc/pics/krusader_title.png | Bin 0 -> 16538 bytes doc/pics/listpanel.png | Bin 0 -> 36013 bytes doc/pics/mainwindow.png | Bin 0 -> 38082 bytes doc/pics/mountman.png | Bin 0 -> 35683 bytes doc/pics/search_advanced.png | Bin 0 -> 37745 bytes doc/pics/search_general.png | Bin 0 -> 32154 bytes doc/pics/syncdir.png | Bin 0 -> 49454 bytes doc/pics/tabbed_browsing.png | Bin 0 -> 3969 bytes doc/pics/terminalEmu.png | Bin 0 -> 5515 bytes doc/pics/toolbar.png | Bin 0 -> 4971 bytes doc/ru/Makefile.am | 11 + doc/ru/commands.docbook | 1892 ++++ doc/ru/configuration-files.docbook | 224 + doc/ru/credits.docbook | 360 + doc/ru/editors-note.docbook | 63 + doc/ru/faq.docbook | 1514 +++ doc/ru/features.docbook | 473 + doc/ru/glossary.docbook | 190 + doc/ru/help.docbook | 142 + doc/ru/index.docbook | 1113 +++ doc/ru/installation.docbook | 1170 +++ doc/ru/introduction.docbook | 152 + doc/ru/keyboard.docbook | 1948 ++++ doc/ru/konfigurator.docbook | 2167 ++++ doc/ru/krusader-tools.docbook | 4254 ++++++++ doc/ru/mouse.docbook | 56 + doc/ru/release-overview.docbook | 694 ++ doc/ru/user-interface.docbook | 975 ++ doc/ru/useraction-xml.docbook | 338 + doc/ru/using-krusader.docbook | 977 ++ doc/update_docbook | 73 + doc/update_po | 68 + doc/update_pot | 57 + iso/Makefile.am | 64 + iso/iso.cpp | 525 + iso/iso.h | 51 + iso/iso.protocol | 11 + iso/isoservice.desktop | 14 + iso/kio_isorc | 2 + iso/kiso.cpp | 459 + iso/kiso.h | 112 + iso/kisodirectory.cpp | 31 + iso/kisodirectory.h | 40 + iso/kisofile.cpp | 53 + iso/kisofile.h | 49 + iso/libisofs/COPYING | 280 + iso/libisofs/ChangeLog | 6 + iso/libisofs/Makefile.am | 18 + iso/libisofs/README | 24 + iso/libisofs/bswap.h | 94 + iso/libisofs/el_torito.h | 63 + iso/libisofs/iso_fs.h | 219 + iso/libisofs/isofs.c | 876 ++ iso/libisofs/isofs.h | 161 + iso/libisofs/rock.h | 127 + iso/qfilehack.cpp | 40 + iso/qfilehack.h | 38 + krArc/Makefile.am | 59 + krArc/krarc.cpp | 1668 ++++ krArc/krarc.h | 142 + krArc/krarc.protocol | 17 + krusader-1.40.info | 13 + krusader-1.50.info | 13 + krusader-1.60.info | 13 + krusader-1.70.info | 13 + krusader-1.80.info | 18 + krusader.SlackBuild | 134 + krusader.kdevprj | 1958 ++++ krusader.lsm | 34 + krusader.spec | 177 + krusader/ActionMan/Makefile.am | 14 + krusader/ActionMan/actionman.cpp | 60 + krusader/ActionMan/actionman.h | 36 + krusader/ActionMan/actionproperty.cpp | 470 + krusader/ActionMan/actionproperty.h | 146 + krusader/ActionMan/actionpropertybase.cpp | 463 + krusader/ActionMan/actionpropertybase.ui | 1125 +++ krusader/ActionMan/addplaceholderpopup.cpp | 582 ++ krusader/ActionMan/addplaceholderpopup.h | 318 + krusader/ActionMan/useractionlistview.cpp | 232 + krusader/ActionMan/useractionlistview.h | 81 + krusader/ActionMan/useractionpage.cpp | 317 + krusader/ActionMan/useractionpage.h | 73 + krusader/BookMan/Makefile.am | 11 + krusader/BookMan/kraddbookmarkdlg.cpp | 117 + krusader/BookMan/kraddbookmarkdlg.h | 39 + krusader/BookMan/krbookmark.cpp | 92 + krusader/BookMan/krbookmark.h | 45 + krusader/BookMan/krbookmarkbutton.cpp | 38 + krusader/BookMan/krbookmarkbutton.h | 23 + krusader/BookMan/krbookmarkhandler.cpp | 576 ++ krusader/BookMan/krbookmarkhandler.h | 63 + krusader/Dialogs/Makefile.am | 22 + krusader/Dialogs/checksumdlg.cpp | 603 ++ krusader/Dialogs/checksumdlg.h | 54 + krusader/Dialogs/krdialogs.cpp | 255 + krusader/Dialogs/krdialogs.h | 115 + krusader/Dialogs/krkeydialog.cpp | 157 + krusader/Dialogs/krkeydialog.h | 37 + krusader/Dialogs/krmaskchoice.cpp | 179 + krusader/Dialogs/krmaskchoice.h | 76 + krusader/Dialogs/krpleasewait.cpp | 153 + krusader/Dialogs/krpleasewait.h | 82 + krusader/Dialogs/krprogress.cpp | 270 + krusader/Dialogs/krprogress.h | 86 + krusader/Dialogs/krspecialwidgets.cpp | 239 + krusader/Dialogs/krspecialwidgets.h | 126 + krusader/Dialogs/krspwidgets.cpp | 316 + krusader/Dialogs/krspwidgets.h | 110 + krusader/Dialogs/krsqueezedtextlabel.cpp | 80 + krusader/Dialogs/krsqueezedtextlabel.h | 44 + krusader/Dialogs/kurllistrequester.cpp | 202 + krusader/Dialogs/kurllistrequester.h | 76 + krusader/Dialogs/newftpgui.cpp | 185 + krusader/Dialogs/newftpgui.h | 54 + krusader/Dialogs/packgui.cpp | 120 + krusader/Dialogs/packgui.h | 53 + krusader/Dialogs/packguibase.cpp | 468 + krusader/Dialogs/packguibase.h | 109 + krusader/Dialogs/percentalsplitter.cpp | 193 + krusader/Dialogs/percentalsplitter.h | 58 + krusader/Dialogs/popularurls.cpp | 307 + krusader/Dialogs/popularurls.h | 84 + krusader/DiskUsage/Makefile.am | 17 + krusader/DiskUsage/diskusage.cpp | 1147 +++ krusader/DiskUsage/diskusage.h | 204 + krusader/DiskUsage/diskusagegui.cpp | 227 + krusader/DiskUsage/diskusagegui.h | 89 + krusader/DiskUsage/dufilelight.cpp | 236 + krusader/DiskUsage/dufilelight.h | 80 + krusader/DiskUsage/dulines.cpp | 522 + krusader/DiskUsage/dulines.h | 78 + krusader/DiskUsage/dulistview.cpp | 293 + krusader/DiskUsage/dulistview.h | 144 + krusader/DiskUsage/filelightParts/Config.cpp | 50 + krusader/DiskUsage/filelightParts/Config.h | 37 + krusader/DiskUsage/filelightParts/Makefile.am | 9 + krusader/DiskUsage/filelightParts/debug.h | 14 + krusader/DiskUsage/filelightParts/fileTree.cpp | 78 + krusader/DiskUsage/filelightParts/fileTree.h | 299 + krusader/DiskUsage/radialMap/Makefile.am | 14 + krusader/DiskUsage/radialMap/builder.cpp | 139 + krusader/DiskUsage/radialMap/builder.h | 37 + krusader/DiskUsage/radialMap/labels.cpp | 342 + krusader/DiskUsage/radialMap/map.cpp | 432 + krusader/DiskUsage/radialMap/radialMap.h | 71 + krusader/DiskUsage/radialMap/segmentTip.cpp | 163 + krusader/DiskUsage/radialMap/segmentTip.h | 33 + krusader/DiskUsage/radialMap/sincos.h | 17 + krusader/DiskUsage/radialMap/widget.cpp | 199 + krusader/DiskUsage/radialMap/widget.h | 110 + krusader/DiskUsage/radialMap/widgetEvents.cpp | 241 + krusader/Filter/Makefile.am | 11 + krusader/Filter/advancedfilter.cpp | 711 ++ krusader/Filter/advancedfilter.h | 115 + krusader/Filter/filterbase.h | 51 + krusader/Filter/filterdialog.cpp | 87 + krusader/Filter/filterdialog.h | 60 + krusader/Filter/filtertabs.cpp | 133 + krusader/Filter/filtertabs.h | 80 + krusader/Filter/generalfilter.cpp | 536 + krusader/Filter/generalfilter.h | 106 + krusader/GUI/Makefile.am | 18 + krusader/GUI/dirhistorybutton.cpp | 82 + krusader/GUI/dirhistorybutton.h | 56 + krusader/GUI/dirhistoryqueue.cpp | 87 + krusader/GUI/dirhistoryqueue.h | 47 + krusader/GUI/kcmdline.cpp | 253 + krusader/GUI/kcmdline.h | 99 + krusader/GUI/kcmdmodebutton.cpp | 74 + krusader/GUI/kcmdmodebutton.h | 52 + krusader/GUI/kfnkeys.cpp | 133 + krusader/GUI/kfnkeys.h | 54 + krusader/GUI/krremoteencodingmenu.cpp | 207 + krusader/GUI/krremoteencodingmenu.h | 67 + krusader/GUI/krusaderstatus.cpp | 46 + krusader/GUI/krusaderstatus.h | 56 + krusader/GUI/mediabutton.cpp | 692 ++ krusader/GUI/mediabutton.h | 106 + krusader/GUI/profilemanager.cpp | 198 + krusader/GUI/profilemanager.h | 69 + krusader/GUI/syncbrowsebutton.cpp | 72 + krusader/GUI/syncbrowsebutton.h | 66 + krusader/KViewer/Makefile.am | 11 + krusader/KViewer/diskusageviewer.cpp | 129 + krusader/KViewer/diskusageviewer.h | 68 + krusader/KViewer/kimagefilepreview.cpp | 136 + krusader/KViewer/kimagefilepreview.h | 70 + krusader/KViewer/krviewer.cpp | 702 ++ krusader/KViewer/krviewer.h | 128 + krusader/KViewer/panelviewer.cpp | 307 + krusader/KViewer/panelviewer.h | 88 + krusader/Konfigurator/Makefile.am | 23 + krusader/Konfigurator/kgadvanced.cpp | 133 + krusader/Konfigurator/kgadvanced.h | 44 + krusader/Konfigurator/kgarchives.cpp | 155 + krusader/Konfigurator/kgarchives.h | 54 + krusader/Konfigurator/kgcolors.cpp | 633 ++ krusader/Konfigurator/kgcolors.h | 139 + krusader/Konfigurator/kgdependencies.cpp | 169 + krusader/Konfigurator/kgdependencies.h | 58 + krusader/Konfigurator/kggeneral.cpp | 213 + krusader/Konfigurator/kggeneral.h | 54 + krusader/Konfigurator/kglookfeel.cpp | 373 + krusader/Konfigurator/kglookfeel.h | 69 + krusader/Konfigurator/kgprotocols.cpp | 418 + krusader/Konfigurator/kgprotocols.h | 86 + krusader/Konfigurator/kgstartup.cpp | 117 + krusader/Konfigurator/kgstartup.h | 52 + krusader/Konfigurator/kguseractions.cpp | 106 + krusader/Konfigurator/kguseractions.h | 51 + krusader/Konfigurator/kgwelcome.cpp | 50 + krusader/Konfigurator/kgwelcome.h | 44 + krusader/Konfigurator/konfigurator.cpp | 220 + krusader/Konfigurator/konfigurator.h | 81 + krusader/Konfigurator/konfiguratoritems.cpp | 815 ++ krusader/Konfigurator/konfiguratoritems.h | 418 + krusader/Konfigurator/konfiguratorpage.cpp | 334 + krusader/Konfigurator/konfiguratorpage.h | 522 + krusader/Konfigurator/krresulttable.cpp | 377 + krusader/Konfigurator/krresulttable.h | 140 + krusader/Konfigurator/krresulttabledialog.cpp | 97 + krusader/Konfigurator/krresulttabledialog.h | 84 + krusader/Konfigurator/searchobject.cpp | 106 + krusader/Konfigurator/searchobject.h | 131 + krusader/KrJS/Makefile.am | 13 + krusader/KrJS/krjs.cpp | 89 + krusader/KrJS/krjs.h | 32 + krusader/Locate/Makefile.am | 7 + krusader/Locate/locate.cpp | 613 ++ krusader/Locate/locate.h | 100 + krusader/Makefile.am | 192 + krusader/MountMan/Makefile.am | 10 + krusader/MountMan/kdiskfreesp.cpp | 168 + krusader/MountMan/kdiskfreesp.h | 88 + krusader/MountMan/kmountman.cpp | 327 + krusader/MountMan/kmountman.h | 102 + krusader/MountMan/kmountmangui.cpp | 396 + krusader/MountMan/kmountmangui.h | 198 + krusader/Panel/Makefile.am | 29 + krusader/Panel/krbriefview.cpp | 1461 +++ krusader/Panel/krbriefview.h | 172 + krusader/Panel/krbriefviewitem.cpp | 225 + krusader/Panel/krbriefviewitem.h | 79 + krusader/Panel/krcalcspacedialog.cpp | 187 + krusader/Panel/krcalcspacedialog.h | 106 + krusader/Panel/krcolorcache.cpp | 761 ++ krusader/Panel/krcolorcache.h | 101 + krusader/Panel/krdetailedview.cpp | 1587 +++ krusader/Panel/krdetailedview.h | 180 + krusader/Panel/krdetailedviewitem.cpp | 313 + krusader/Panel/krdetailedviewitem.h | 73 + krusader/Panel/krdrag.cpp | 103 + krusader/Panel/krdrag.h | 62 + krusader/Panel/krpopupmenu.cpp | 354 + krusader/Panel/krpopupmenu.h | 77 + krusader/Panel/krpreviewpopup.cpp | 68 + krusader/Panel/krpreviewpopup.h | 48 + krusader/Panel/krselectionmode.cpp | 61 + krusader/Panel/krselectionmode.h | 97 + krusader/Panel/krview.cpp | 332 + krusader/Panel/krview.h | 245 + krusader/Panel/krviewitem.cpp | 105 + krusader/Panel/krviewitem.h | 76 + krusader/Panel/listpanel.cpp | 1115 +++ krusader/Panel/listpanel.h | 211 + krusader/Panel/panelfunc.cpp | 1186 +++ krusader/Panel/panelfunc.h | 105 + krusader/Panel/panelpopup.cpp | 400 + krusader/Panel/panelpopup.h | 73 + krusader/Queue/Makefile.am | 10 + krusader/Queue/queue.cpp | 22 + krusader/Queue/queue.h | 32 + krusader/Queue/queue_mgr.cpp | 31 + krusader/Queue/queue_mgr.h | 26 + krusader/Queue/queuewidget.cpp | 10 + krusader/Queue/queuewidget.h | 14 + krusader/RemoteMan/Makefile.am | 9 + krusader/RemoteMan/remoteman.cpp | 385 + krusader/RemoteMan/remoteman.h | 70 + krusader/RemoteMan/remotemanbase.cpp | 331 + krusader/RemoteMan/remotemanbase.h | 82 + krusader/Search/Makefile.am | 9 + krusader/Search/krsearchdialog.cpp | 628 ++ krusader/Search/krsearchdialog.h | 183 + krusader/Search/krsearchmod.cpp | 253 + krusader/Search/krsearchmod.h | 85 + krusader/Splitter/Makefile.am | 11 + krusader/Splitter/combiner.cpp | 328 + krusader/Splitter/combiner.h | 92 + krusader/Splitter/crc32.cpp | 69 + krusader/Splitter/crc32.h | 48 + krusader/Splitter/splitter.cpp | 252 + krusader/Splitter/splitter.h | 83 + krusader/Splitter/splittergui.cpp | 213 + krusader/Splitter/splittergui.h | 178 + krusader/Synchronizer/Makefile.am | 13 + krusader/Synchronizer/feedtolistboxdialog.cpp | 200 + krusader/Synchronizer/feedtolistboxdialog.h | 65 + krusader/Synchronizer/synchronizedialog.cpp | 199 + krusader/Synchronizer/synchronizedialog.h | 91 + krusader/Synchronizer/synchronizer.cpp | 1493 +++ krusader/Synchronizer/synchronizer.h | 204 + krusader/Synchronizer/synchronizerdirlist.cpp | 216 + krusader/Synchronizer/synchronizerdirlist.h | 72 + krusader/Synchronizer/synchronizerfileitem.h | 170 + krusader/Synchronizer/synchronizergui.cpp | 2478 +++++ krusader/Synchronizer/synchronizergui.h | 224 + krusader/Synchronizer/synchronizertask.cpp | 343 + krusader/Synchronizer/synchronizertask.h | 167 + krusader/UserAction/Makefile.am | 17 + krusader/UserAction/expander.cpp | 1224 +++ krusader/UserAction/expander.h | 245 + krusader/UserAction/kraction.cpp | 586 ++ krusader/UserAction/kraction.h | 167 + krusader/UserAction/kractionbase.cpp | 77 + krusader/UserAction/kractionbase.h | 97 + krusader/UserAction/tstring.h | 113 + krusader/UserAction/useraction.cpp | 210 + krusader/UserAction/useraction.h | 145 + krusader/UserAction/useractionpopupmenu.cpp | 26 + krusader/UserAction/useractionpopupmenu.h | 25 + krusader/UserMenu/Makefile.am | 7 + krusader/UserMenu/usermenu.cpp | 85 + krusader/UserMenu/usermenu.h | 46 + krusader/VFS/Makefile.am | 19 + krusader/VFS/arc_vfs.cpp | 866 ++ krusader/VFS/arc_vfs.h | 130 + krusader/VFS/ftp_vfs.cpp | 297 + krusader/VFS/ftp_vfs.h | 79 + krusader/VFS/krarchandler.cpp | 756 ++ krusader/VFS/krarchandler.h | 148 + krusader/VFS/krdirwatch.cpp | 124 + krusader/VFS/krdirwatch.h | 79 + krusader/VFS/krpermhandler.cpp | 355 + krusader/VFS/krpermhandler.h | 89 + krusader/VFS/krquery.cpp | 653 ++ krusader/VFS/krquery.h | 208 + krusader/VFS/krvfshandler.cpp | 71 + krusader/VFS/krvfshandler.h | 40 + krusader/VFS/normal_vfs.cpp | 437 + krusader/VFS/normal_vfs.h | 92 + krusader/VFS/preservingcopyjob.cpp | 319 + krusader/VFS/preservingcopyjob.h | 84 + krusader/VFS/temp_vfs.cpp | 127 + krusader/VFS/temp_vfs.h | 57 + krusader/VFS/vfile.cpp | 311 + krusader/VFS/vfile.h | 166 + krusader/VFS/vfs.cpp | 393 + krusader/VFS/vfs.h | 186 + krusader/VFS/virt_vfs.cpp | 341 + krusader/VFS/virt_vfs.h | 76 + krusader/VFS/virtualcopyjob.cpp | 316 + krusader/VFS/virtualcopyjob.h | 125 + krusader/alpa-yellow.color | Bin 0 -> 2468 bytes krusader/bash.color | Bin 0 -> 2650 bytes krusader/calc.js | 64 + krusader/calc.ui | 267 + krusader/cr16-app-krusader_blue.png | Bin 0 -> 910 bytes krusader/cr16-app-krusader_red.png | Bin 0 -> 935 bytes krusader/cr16-app-krusader_root.png | Bin 0 -> 210 bytes krusader/cr16-app-krusader_user.png | Bin 0 -> 184 bytes krusader/cr22-app-krusader_blue.png | Bin 0 -> 1377 bytes krusader/cr22-app-krusader_red.png | Bin 0 -> 1436 bytes krusader/cr22-app-krusader_root.png | Bin 0 -> 579 bytes krusader/cr22-app-krusader_shield.png | Bin 0 -> 1256 bytes krusader/cr22-app-krusader_user.png | Bin 0 -> 568 bytes krusader/cr32-app-krusader_blue.png | Bin 0 -> 2453 bytes krusader/cr32-app-krusader_red.png | Bin 0 -> 2523 bytes krusader/cr32-app-krusader_root.png | Bin 0 -> 846 bytes krusader/cr32-app-krusader_shield.png | Bin 0 -> 2024 bytes krusader/cr32-app-krusader_user.png | Bin 0 -> 922 bytes krusader/cr48-app-krusader_blue.png | Bin 0 -> 4528 bytes krusader/cr48-app-krusader_red.png | Bin 0 -> 4497 bytes krusader/cr48-app-krusader_root.png | Bin 0 -> 2002 bytes krusader/cr48-app-krusader_shield.png | Bin 0 -> 3302 bytes krusader/cr48-app-krusader_user.png | Bin 0 -> 2105 bytes krusader/cr64-app-krusader_blue.png | Bin 0 -> 6469 bytes krusader/cr64-app-krusader_red.png | Bin 0 -> 6585 bytes krusader/cr64-app-krusader_root.png | Bin 0 -> 2731 bytes krusader/cr64-app-krusader_shield.png | Bin 0 -> 4794 bytes krusader/cr64-app-krusader_user.png | Bin 0 -> 2826 bytes krusader/defaults.h | 306 + krusader/dos_navigator.color | Bin 0 -> 2674 bytes krusader/kicons.cpp | 377 + krusader/kicons.h | 29 + krusader/krservices.cpp | 216 + krusader/krservices.h | 78 + krusader/krslots.cpp | 944 ++ krusader/krslots.h | 187 + krusader/krusader.cpp | 1248 +++ krusader/krusader.desktop | 86 + krusader/krusader.h | 274 + krusader/krusader_root-mode.desktop | 90 + krusader/krusaderapp.h | 31 + krusader/krusaderui.rc | 193 + krusader/krusaderview.cpp | 415 + krusader/krusaderview.h | 110 + krusader/lo16-app-krusader.png | Bin 0 -> 814 bytes krusader/lo32-app-krusader.png | Bin 0 -> 3742 bytes krusader/lo32-app-krusader2.png | Bin 0 -> 680 bytes krusader/main.cpp | 248 + krusader/midnight_cmd_AHamann.color | Bin 0 -> 2732 bytes krusader/midnight_commander.color | Bin 0 -> 1776 bytes krusader/midnight_commander.keymap | Bin 0 -> 1375 bytes krusader/midnight_commander.keymap.info | 42 + krusader/mount.js | 37 + krusader/mount.ui | 208 + krusader/panelmanager.cpp | 352 + krusader/panelmanager.h | 78 + krusader/paneltabbar.cpp | 262 + krusader/paneltabbar.h | 99 + krusader/recode.js | 202 + krusader/recode.ui | 297 + krusader/resources.h | 42 + krusader/select_from_file.js | 13 + krusader/splash.png | Bin 0 -> 67168 bytes krusader/total_cmd_pleasent.color | Bin 0 -> 2652 bytes krusader/total_commander.color | Bin 0 -> 1760 bytes krusader/total_commander.keymap | 112 + krusader/total_commander.keymap.info | 10 + krusader/useraction_examples.xml | 406 + krusader/x-ace.desktop | 7 + pics/Makefile.am | 19 + pics/about.png | Bin 0 -> 20647 bytes pics/cr16-action-kr_addbookmark.png | Bin 0 -> 745 bytes pics/cr16-action-kr_arc_pack.png | Bin 0 -> 871 bytes pics/cr16-action-kr_arc_test.png | Bin 0 -> 938 bytes pics/cr16-action-kr_arc_unpack.png | Bin 0 -> 869 bytes pics/cr16-action-kr_bookman.png | Bin 0 -> 974 bytes pics/cr16-action-kr_bookmark.png | Bin 0 -> 697 bytes pics/cr16-action-kr_calc.png | Bin 0 -> 944 bytes pics/cr16-action-kr_combine.png | Bin 0 -> 513 bytes pics/cr16-action-kr_compare.png | Bin 0 -> 938 bytes pics/cr16-action-kr_comparedirs.png | Bin 0 -> 739 bytes pics/cr16-action-kr_diskusage.png | Bin 0 -> 1165 bytes pics/cr16-action-kr_ftp_connect.png | Bin 0 -> 978 bytes pics/cr16-action-kr_ftp_disconnect.png | Bin 0 -> 1055 bytes pics/cr16-action-kr_ftp_new.png | Bin 0 -> 974 bytes pics/cr16-action-kr_fullview.png | Bin 0 -> 485 bytes pics/cr16-action-kr_hwinfo.png | Bin 0 -> 918 bytes pics/cr16-action-kr_invert.png | Bin 0 -> 938 bytes pics/cr16-action-kr_jumpback.png | Bin 0 -> 857 bytes pics/cr16-action-kr_mountman.png | Bin 0 -> 881 bytes pics/cr16-action-kr_profile.png | Bin 0 -> 833 bytes pics/cr16-action-kr_properties.png | Bin 0 -> 872 bytes pics/cr16-action-kr_select.png | Bin 0 -> 839 bytes pics/cr16-action-kr_selectall.png | Bin 0 -> 864 bytes pics/cr16-action-kr_setjumpback.png | Bin 0 -> 896 bytes pics/cr16-action-kr_split.png | Bin 0 -> 594 bytes pics/cr16-action-kr_syncbrowse_off.png | Bin 0 -> 1165 bytes pics/cr16-action-kr_syncbrowse_on.png | Bin 0 -> 622 bytes pics/cr16-action-kr_syncdirs.png | Bin 0 -> 726 bytes pics/cr16-action-kr_terminal.png | Bin 0 -> 501 bytes pics/cr16-action-kr_treeview.png | Bin 0 -> 563 bytes pics/cr16-action-kr_unselect.png | Bin 0 -> 853 bytes pics/cr16-action-kr_unselectall.png | Bin 0 -> 886 bytes pics/cr16-app-krusader_root.xpm | 25 + pics/cr16-app-krusader_user.xpm | 22 + pics/cr22-action-kr_addbookmark.png | Bin 0 -> 1003 bytes pics/cr22-action-kr_arc_pack.png | Bin 0 -> 1211 bytes pics/cr22-action-kr_arc_test.png | Bin 0 -> 1333 bytes pics/cr22-action-kr_arc_unpack.png | Bin 0 -> 1206 bytes pics/cr22-action-kr_bookman.png | Bin 0 -> 1480 bytes pics/cr22-action-kr_bookmark.png | Bin 0 -> 934 bytes pics/cr22-action-kr_calc.png | Bin 0 -> 1566 bytes pics/cr22-action-kr_combine.png | Bin 0 -> 693 bytes pics/cr22-action-kr_compare.png | Bin 0 -> 1214 bytes pics/cr22-action-kr_comparedirs.png | Bin 0 -> 781 bytes pics/cr22-action-kr_diskusage.png | Bin 0 -> 1632 bytes pics/cr22-action-kr_ftp_connect.png | Bin 0 -> 1479 bytes pics/cr22-action-kr_ftp_disconnect.png | Bin 0 -> 1599 bytes pics/cr22-action-kr_ftp_new.png | Bin 0 -> 1506 bytes pics/cr22-action-kr_fullview.png | Bin 0 -> 456 bytes pics/cr22-action-kr_hwinfo.png | Bin 0 -> 1311 bytes pics/cr22-action-kr_invert.png | Bin 0 -> 1275 bytes pics/cr22-action-kr_mountman.png | Bin 0 -> 1873 bytes pics/cr22-action-kr_profile.png | Bin 0 -> 1371 bytes pics/cr22-action-kr_properties.png | Bin 0 -> 1303 bytes pics/cr22-action-kr_select.png | Bin 0 -> 1138 bytes pics/cr22-action-kr_selectall.png | Bin 0 -> 1168 bytes pics/cr22-action-kr_split.png | Bin 0 -> 824 bytes pics/cr22-action-kr_syncdirs.png | Bin 0 -> 781 bytes pics/cr22-action-kr_terminal.png | Bin 0 -> 1325 bytes pics/cr22-action-kr_treeview.png | Bin 0 -> 555 bytes pics/cr22-action-kr_unselect.png | Bin 0 -> 1241 bytes pics/cr22-action-kr_unselectall.png | Bin 0 -> 1215 bytes pics/cr32-action-kr_addbookmark.png | Bin 0 -> 1075 bytes pics/cr32-action-kr_arc_pack.png | Bin 0 -> 2131 bytes pics/cr32-action-kr_arc_test.png | Bin 0 -> 2070 bytes pics/cr32-action-kr_arc_unpack.png | Bin 0 -> 2162 bytes pics/cr32-action-kr_bookman.png | Bin 0 -> 2063 bytes pics/cr32-action-kr_bookmark.png | Bin 0 -> 1018 bytes pics/cr32-action-kr_calc.png | Bin 0 -> 1595 bytes pics/cr32-action-kr_combine.png | Bin 0 -> 1050 bytes pics/cr32-action-kr_compare.png | Bin 0 -> 1078 bytes pics/cr32-action-kr_comparedirs.png | Bin 0 -> 1054 bytes pics/cr32-action-kr_dependencies.png | Bin 0 -> 2287 bytes pics/cr32-action-kr_diskusage.png | Bin 0 -> 2464 bytes pics/cr32-action-kr_ftp_connect.png | Bin 0 -> 2042 bytes pics/cr32-action-kr_ftp_disconnect.png | Bin 0 -> 2117 bytes pics/cr32-action-kr_ftp_new.png | Bin 0 -> 2027 bytes pics/cr32-action-kr_fullview.png | Bin 0 -> 1015 bytes pics/cr32-action-kr_hwinfo.png | Bin 0 -> 1553 bytes pics/cr32-action-kr_invert.png | Bin 0 -> 1946 bytes pics/cr32-action-kr_mountman.png | Bin 0 -> 2480 bytes pics/cr32-action-kr_profile.png | Bin 0 -> 1807 bytes pics/cr32-action-kr_properties.png | Bin 0 -> 2016 bytes pics/cr32-action-kr_select.png | Bin 0 -> 1522 bytes pics/cr32-action-kr_selectall.png | Bin 0 -> 1950 bytes pics/cr32-action-kr_split.png | Bin 0 -> 1363 bytes pics/cr32-action-kr_syncdirs.png | Bin 0 -> 1054 bytes pics/cr32-action-kr_terminal.png | Bin 0 -> 1959 bytes pics/cr32-action-kr_treeview.png | Bin 0 -> 819 bytes pics/cr32-action-kr_unselect.png | Bin 0 -> 1649 bytes pics/cr32-action-kr_unselectall.png | Bin 0 -> 1884 bytes pics/cr32-action-kr_useractions.png | Bin 0 -> 2431 bytes pics/cr32-app-krusader_root.xpm | 103 + pics/cr32-app-krusader_user.xpm | 109 + pics/konfig_small.jpg | Bin 0 -> 44016 bytes po/Makefile.am | 6 + po/bg.po | 7167 ++++++++++++++ po/bs.po | 7347 ++++++++++++++ po/ca.po | 6553 +++++++++++++ po/cs.po | 6529 +++++++++++++ po/da.po | 6933 +++++++++++++ po/de.po | 6589 +++++++++++++ po/el.po | 6601 +++++++++++++ po/es.po | 6647 +++++++++++++ po/fr.po | 6579 +++++++++++++ po/hu.po | 6472 ++++++++++++ po/it.po | 6508 +++++++++++++ po/ja.po | 7240 ++++++++++++++ po/lt.po | 6603 +++++++++++++ po/nl.po | 6534 +++++++++++++ po/pl.po | 6568 +++++++++++++ po/pt.po | 6555 +++++++++++++ po/pt_BR.po | 6568 +++++++++++++ po/ru.po | 6624 +++++++++++++ po/sk.po | 6539 +++++++++++++ po/sl.po | 6379 ++++++++++++ po/sr.po | 6521 +++++++++++++ po/sr@Latn.po | 6531 +++++++++++++ po/sv.po | 6513 +++++++++++++ po/tr.po | 6698 +++++++++++++ po/uk.po | 7341 ++++++++++++++ po/zh_CN.po | 6692 +++++++++++++ slack-desc | 12 + subdirs | 8 + tar/Makefile.am | 22 + tar/ar.protocol | 12 + tar/ktartest.cpp | 201 + tar/tar.cc | 482 + tar/tar.h | 48 + tar/tar.protocol | 12 + tar/zip.protocol | 12 + virt/Makefile.am | 17 + virt/virt.cc | 305 + virt/virt.h | 55 + virt/virt.protocol | 19 + 630 files changed, 305286 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 CVSNEWS create mode 100644 ChangeLog create mode 100644 FAQ create mode 100644 INSTALL create mode 100644 Krusader.kdevelop create mode 100644 Makefile.am create mode 100644 Makefile.cvs create mode 100644 Makefile.dist create mode 100644 README create mode 100644 TODO create mode 100644 acinclude.m4 create mode 100644 aclocal.m4 create mode 100644 config.h.in create mode 100644 configure.files create mode 100644 configure.in create mode 100644 configure.in.in create mode 100755 dist2rpm create mode 100644 doc/ChangeLog create mode 100644 doc/Makefile.am create mode 100644 doc/actions_tutorial.txt create mode 100644 doc/en/Makefile.am create mode 100644 doc/en/archives.docbook create mode 100644 doc/en/bookmarks.docbook create mode 100644 doc/en/checksum.docbook create mode 100644 doc/en/commands.docbook create mode 100644 doc/en/compare.docbook create mode 100644 doc/en/configuration-files.docbook create mode 100644 doc/en/credits.docbook create mode 100644 doc/en/diskusage.docbook create mode 100644 doc/en/editors-note.docbook create mode 100644 doc/en/faq.docbook create mode 100644 doc/en/features.docbook create mode 100644 doc/en/glossary.docbook create mode 100644 doc/en/help.docbook create mode 100644 doc/en/index.docbook create mode 100644 doc/en/installation.docbook create mode 100644 doc/en/introduction.docbook create mode 100644 doc/en/java.docbook create mode 100644 doc/en/keyboard.docbook create mode 100644 doc/en/konfigurator.docbook create mode 100644 doc/en/krusader-tools.docbook create mode 100644 doc/en/locate.docbook create mode 100644 doc/en/more.docbook create mode 100644 doc/en/mount.docbook create mode 100644 doc/en/mouse.docbook create mode 100644 doc/en/occupied-space.docbook create mode 100644 doc/en/profiles.docbook create mode 100644 doc/en/release-overview.docbook create mode 100644 doc/en/remote-connections.docbook create mode 100644 doc/en/search.docbook create mode 100644 doc/en/splitter.docbook create mode 100644 doc/en/synchronizer.docbook create mode 100644 doc/en/user-interface.docbook create mode 100644 doc/en/useraction-xml.docbook create mode 100644 doc/en/useractions.docbook create mode 100644 doc/en/using-krusader.docbook create mode 100644 doc/en/vfs.docbook create mode 100644 doc/en/viewer-editor.docbook create mode 100644 doc/fdl-license create mode 100644 doc/krusader.1 create mode 100644 doc/pics/Makefile.am create mode 100644 doc/pics/actionman.png create mode 100644 doc/pics/bookmanadd.png create mode 100644 doc/pics/bookmanedit.png create mode 100644 doc/pics/cmdline.png create mode 100644 doc/pics/fnkeys.png create mode 100644 doc/pics/kgstartup.png create mode 100644 doc/pics/krusader1.png create mode 100644 doc/pics/krusader_title.png create mode 100644 doc/pics/listpanel.png create mode 100644 doc/pics/mainwindow.png create mode 100644 doc/pics/mountman.png create mode 100644 doc/pics/search_advanced.png create mode 100644 doc/pics/search_general.png create mode 100644 doc/pics/syncdir.png create mode 100644 doc/pics/tabbed_browsing.png create mode 100644 doc/pics/terminalEmu.png create mode 100644 doc/pics/toolbar.png create mode 100644 doc/ru/Makefile.am create mode 100644 doc/ru/commands.docbook create mode 100644 doc/ru/configuration-files.docbook create mode 100644 doc/ru/credits.docbook create mode 100644 doc/ru/editors-note.docbook create mode 100644 doc/ru/faq.docbook create mode 100644 doc/ru/features.docbook create mode 100644 doc/ru/glossary.docbook create mode 100644 doc/ru/help.docbook create mode 100644 doc/ru/index.docbook create mode 100644 doc/ru/installation.docbook create mode 100644 doc/ru/introduction.docbook create mode 100644 doc/ru/keyboard.docbook create mode 100644 doc/ru/konfigurator.docbook create mode 100644 doc/ru/krusader-tools.docbook create mode 100644 doc/ru/mouse.docbook create mode 100644 doc/ru/release-overview.docbook create mode 100644 doc/ru/user-interface.docbook create mode 100644 doc/ru/useraction-xml.docbook create mode 100644 doc/ru/using-krusader.docbook create mode 100755 doc/update_docbook create mode 100755 doc/update_po create mode 100755 doc/update_pot create mode 100644 iso/Makefile.am create mode 100644 iso/iso.cpp create mode 100644 iso/iso.h create mode 100644 iso/iso.protocol create mode 100644 iso/isoservice.desktop create mode 100644 iso/kio_isorc create mode 100644 iso/kiso.cpp create mode 100644 iso/kiso.h create mode 100644 iso/kisodirectory.cpp create mode 100644 iso/kisodirectory.h create mode 100644 iso/kisofile.cpp create mode 100644 iso/kisofile.h create mode 100644 iso/libisofs/COPYING create mode 100644 iso/libisofs/ChangeLog create mode 100644 iso/libisofs/Makefile.am create mode 100644 iso/libisofs/README create mode 100644 iso/libisofs/bswap.h create mode 100644 iso/libisofs/el_torito.h create mode 100644 iso/libisofs/iso_fs.h create mode 100644 iso/libisofs/isofs.c create mode 100644 iso/libisofs/isofs.h create mode 100644 iso/libisofs/rock.h create mode 100644 iso/qfilehack.cpp create mode 100644 iso/qfilehack.h create mode 100644 krArc/Makefile.am create mode 100644 krArc/krarc.cpp create mode 100644 krArc/krarc.h create mode 100644 krArc/krarc.protocol create mode 100644 krusader-1.40.info create mode 100644 krusader-1.50.info create mode 100644 krusader-1.60.info create mode 100644 krusader-1.70.info create mode 100644 krusader-1.80.info create mode 100755 krusader.SlackBuild create mode 100644 krusader.kdevprj create mode 100644 krusader.lsm create mode 100644 krusader.spec create mode 100644 krusader/ActionMan/Makefile.am create mode 100644 krusader/ActionMan/actionman.cpp create mode 100644 krusader/ActionMan/actionman.h create mode 100644 krusader/ActionMan/actionproperty.cpp create mode 100644 krusader/ActionMan/actionproperty.h create mode 100644 krusader/ActionMan/actionpropertybase.cpp create mode 100644 krusader/ActionMan/actionpropertybase.ui create mode 100644 krusader/ActionMan/addplaceholderpopup.cpp create mode 100644 krusader/ActionMan/addplaceholderpopup.h create mode 100644 krusader/ActionMan/useractionlistview.cpp create mode 100644 krusader/ActionMan/useractionlistview.h create mode 100644 krusader/ActionMan/useractionpage.cpp create mode 100644 krusader/ActionMan/useractionpage.h create mode 100644 krusader/BookMan/Makefile.am create mode 100644 krusader/BookMan/kraddbookmarkdlg.cpp create mode 100644 krusader/BookMan/kraddbookmarkdlg.h create mode 100644 krusader/BookMan/krbookmark.cpp create mode 100644 krusader/BookMan/krbookmark.h create mode 100644 krusader/BookMan/krbookmarkbutton.cpp create mode 100644 krusader/BookMan/krbookmarkbutton.h create mode 100644 krusader/BookMan/krbookmarkhandler.cpp create mode 100644 krusader/BookMan/krbookmarkhandler.h create mode 100644 krusader/Dialogs/Makefile.am create mode 100644 krusader/Dialogs/checksumdlg.cpp create mode 100644 krusader/Dialogs/checksumdlg.h create mode 100644 krusader/Dialogs/krdialogs.cpp create mode 100644 krusader/Dialogs/krdialogs.h create mode 100644 krusader/Dialogs/krkeydialog.cpp create mode 100644 krusader/Dialogs/krkeydialog.h create mode 100644 krusader/Dialogs/krmaskchoice.cpp create mode 100644 krusader/Dialogs/krmaskchoice.h create mode 100644 krusader/Dialogs/krpleasewait.cpp create mode 100644 krusader/Dialogs/krpleasewait.h create mode 100644 krusader/Dialogs/krprogress.cpp create mode 100644 krusader/Dialogs/krprogress.h create mode 100644 krusader/Dialogs/krspecialwidgets.cpp create mode 100644 krusader/Dialogs/krspecialwidgets.h create mode 100644 krusader/Dialogs/krspwidgets.cpp create mode 100644 krusader/Dialogs/krspwidgets.h create mode 100644 krusader/Dialogs/krsqueezedtextlabel.cpp create mode 100644 krusader/Dialogs/krsqueezedtextlabel.h create mode 100644 krusader/Dialogs/kurllistrequester.cpp create mode 100644 krusader/Dialogs/kurllistrequester.h create mode 100644 krusader/Dialogs/newftpgui.cpp create mode 100644 krusader/Dialogs/newftpgui.h create mode 100644 krusader/Dialogs/packgui.cpp create mode 100644 krusader/Dialogs/packgui.h create mode 100644 krusader/Dialogs/packguibase.cpp create mode 100644 krusader/Dialogs/packguibase.h create mode 100644 krusader/Dialogs/percentalsplitter.cpp create mode 100644 krusader/Dialogs/percentalsplitter.h create mode 100644 krusader/Dialogs/popularurls.cpp create mode 100644 krusader/Dialogs/popularurls.h create mode 100644 krusader/DiskUsage/Makefile.am create mode 100644 krusader/DiskUsage/diskusage.cpp create mode 100644 krusader/DiskUsage/diskusage.h create mode 100644 krusader/DiskUsage/diskusagegui.cpp create mode 100644 krusader/DiskUsage/diskusagegui.h create mode 100644 krusader/DiskUsage/dufilelight.cpp create mode 100644 krusader/DiskUsage/dufilelight.h create mode 100644 krusader/DiskUsage/dulines.cpp create mode 100644 krusader/DiskUsage/dulines.h create mode 100644 krusader/DiskUsage/dulistview.cpp create mode 100644 krusader/DiskUsage/dulistview.h create mode 100644 krusader/DiskUsage/filelightParts/Config.cpp create mode 100644 krusader/DiskUsage/filelightParts/Config.h create mode 100644 krusader/DiskUsage/filelightParts/Makefile.am create mode 100644 krusader/DiskUsage/filelightParts/debug.h create mode 100644 krusader/DiskUsage/filelightParts/fileTree.cpp create mode 100644 krusader/DiskUsage/filelightParts/fileTree.h create mode 100644 krusader/DiskUsage/radialMap/Makefile.am create mode 100644 krusader/DiskUsage/radialMap/builder.cpp create mode 100644 krusader/DiskUsage/radialMap/builder.h create mode 100644 krusader/DiskUsage/radialMap/labels.cpp create mode 100644 krusader/DiskUsage/radialMap/map.cpp create mode 100644 krusader/DiskUsage/radialMap/radialMap.h create mode 100644 krusader/DiskUsage/radialMap/segmentTip.cpp create mode 100644 krusader/DiskUsage/radialMap/segmentTip.h create mode 100644 krusader/DiskUsage/radialMap/sincos.h create mode 100644 krusader/DiskUsage/radialMap/widget.cpp create mode 100644 krusader/DiskUsage/radialMap/widget.h create mode 100644 krusader/DiskUsage/radialMap/widgetEvents.cpp create mode 100644 krusader/Filter/Makefile.am create mode 100644 krusader/Filter/advancedfilter.cpp create mode 100644 krusader/Filter/advancedfilter.h create mode 100644 krusader/Filter/filterbase.h create mode 100644 krusader/Filter/filterdialog.cpp create mode 100644 krusader/Filter/filterdialog.h create mode 100644 krusader/Filter/filtertabs.cpp create mode 100644 krusader/Filter/filtertabs.h create mode 100644 krusader/Filter/generalfilter.cpp create mode 100644 krusader/Filter/generalfilter.h create mode 100644 krusader/GUI/Makefile.am create mode 100644 krusader/GUI/dirhistorybutton.cpp create mode 100644 krusader/GUI/dirhistorybutton.h create mode 100644 krusader/GUI/dirhistoryqueue.cpp create mode 100644 krusader/GUI/dirhistoryqueue.h create mode 100644 krusader/GUI/kcmdline.cpp create mode 100644 krusader/GUI/kcmdline.h create mode 100644 krusader/GUI/kcmdmodebutton.cpp create mode 100644 krusader/GUI/kcmdmodebutton.h create mode 100644 krusader/GUI/kfnkeys.cpp create mode 100644 krusader/GUI/kfnkeys.h create mode 100644 krusader/GUI/krremoteencodingmenu.cpp create mode 100644 krusader/GUI/krremoteencodingmenu.h create mode 100644 krusader/GUI/krusaderstatus.cpp create mode 100644 krusader/GUI/krusaderstatus.h create mode 100644 krusader/GUI/mediabutton.cpp create mode 100644 krusader/GUI/mediabutton.h create mode 100644 krusader/GUI/profilemanager.cpp create mode 100644 krusader/GUI/profilemanager.h create mode 100644 krusader/GUI/syncbrowsebutton.cpp create mode 100644 krusader/GUI/syncbrowsebutton.h create mode 100644 krusader/KViewer/Makefile.am create mode 100644 krusader/KViewer/diskusageviewer.cpp create mode 100644 krusader/KViewer/diskusageviewer.h create mode 100644 krusader/KViewer/kimagefilepreview.cpp create mode 100644 krusader/KViewer/kimagefilepreview.h create mode 100644 krusader/KViewer/krviewer.cpp create mode 100644 krusader/KViewer/krviewer.h create mode 100644 krusader/KViewer/panelviewer.cpp create mode 100644 krusader/KViewer/panelviewer.h create mode 100644 krusader/Konfigurator/Makefile.am create mode 100644 krusader/Konfigurator/kgadvanced.cpp create mode 100644 krusader/Konfigurator/kgadvanced.h create mode 100644 krusader/Konfigurator/kgarchives.cpp create mode 100644 krusader/Konfigurator/kgarchives.h create mode 100644 krusader/Konfigurator/kgcolors.cpp create mode 100644 krusader/Konfigurator/kgcolors.h create mode 100644 krusader/Konfigurator/kgdependencies.cpp create mode 100644 krusader/Konfigurator/kgdependencies.h create mode 100644 krusader/Konfigurator/kggeneral.cpp create mode 100644 krusader/Konfigurator/kggeneral.h create mode 100644 krusader/Konfigurator/kglookfeel.cpp create mode 100644 krusader/Konfigurator/kglookfeel.h create mode 100644 krusader/Konfigurator/kgprotocols.cpp create mode 100644 krusader/Konfigurator/kgprotocols.h create mode 100644 krusader/Konfigurator/kgstartup.cpp create mode 100644 krusader/Konfigurator/kgstartup.h create mode 100644 krusader/Konfigurator/kguseractions.cpp create mode 100644 krusader/Konfigurator/kguseractions.h create mode 100644 krusader/Konfigurator/kgwelcome.cpp create mode 100644 krusader/Konfigurator/kgwelcome.h create mode 100644 krusader/Konfigurator/konfigurator.cpp create mode 100644 krusader/Konfigurator/konfigurator.h create mode 100644 krusader/Konfigurator/konfiguratoritems.cpp create mode 100644 krusader/Konfigurator/konfiguratoritems.h create mode 100644 krusader/Konfigurator/konfiguratorpage.cpp create mode 100644 krusader/Konfigurator/konfiguratorpage.h create mode 100644 krusader/Konfigurator/krresulttable.cpp create mode 100644 krusader/Konfigurator/krresulttable.h create mode 100644 krusader/Konfigurator/krresulttabledialog.cpp create mode 100644 krusader/Konfigurator/krresulttabledialog.h create mode 100644 krusader/Konfigurator/searchobject.cpp create mode 100644 krusader/Konfigurator/searchobject.h create mode 100644 krusader/KrJS/Makefile.am create mode 100644 krusader/KrJS/krjs.cpp create mode 100644 krusader/KrJS/krjs.h create mode 100644 krusader/Locate/Makefile.am create mode 100755 krusader/Locate/locate.cpp create mode 100755 krusader/Locate/locate.h create mode 100644 krusader/Makefile.am create mode 100644 krusader/MountMan/Makefile.am create mode 100644 krusader/MountMan/kdiskfreesp.cpp create mode 100644 krusader/MountMan/kdiskfreesp.h create mode 100644 krusader/MountMan/kmountman.cpp create mode 100644 krusader/MountMan/kmountman.h create mode 100644 krusader/MountMan/kmountmangui.cpp create mode 100644 krusader/MountMan/kmountmangui.h create mode 100644 krusader/Panel/Makefile.am create mode 100644 krusader/Panel/krbriefview.cpp create mode 100644 krusader/Panel/krbriefview.h create mode 100644 krusader/Panel/krbriefviewitem.cpp create mode 100644 krusader/Panel/krbriefviewitem.h create mode 100644 krusader/Panel/krcalcspacedialog.cpp create mode 100644 krusader/Panel/krcalcspacedialog.h create mode 100644 krusader/Panel/krcolorcache.cpp create mode 100644 krusader/Panel/krcolorcache.h create mode 100644 krusader/Panel/krdetailedview.cpp create mode 100644 krusader/Panel/krdetailedview.h create mode 100644 krusader/Panel/krdetailedviewitem.cpp create mode 100644 krusader/Panel/krdetailedviewitem.h create mode 100644 krusader/Panel/krdrag.cpp create mode 100644 krusader/Panel/krdrag.h create mode 100644 krusader/Panel/krpopupmenu.cpp create mode 100644 krusader/Panel/krpopupmenu.h create mode 100644 krusader/Panel/krpreviewpopup.cpp create mode 100644 krusader/Panel/krpreviewpopup.h create mode 100644 krusader/Panel/krselectionmode.cpp create mode 100644 krusader/Panel/krselectionmode.h create mode 100644 krusader/Panel/krview.cpp create mode 100644 krusader/Panel/krview.h create mode 100644 krusader/Panel/krviewitem.cpp create mode 100644 krusader/Panel/krviewitem.h create mode 100644 krusader/Panel/listpanel.cpp create mode 100644 krusader/Panel/listpanel.h create mode 100755 krusader/Panel/panelfunc.cpp create mode 100644 krusader/Panel/panelfunc.h create mode 100644 krusader/Panel/panelpopup.cpp create mode 100644 krusader/Panel/panelpopup.h create mode 100644 krusader/Queue/Makefile.am create mode 100644 krusader/Queue/queue.cpp create mode 100644 krusader/Queue/queue.h create mode 100644 krusader/Queue/queue_mgr.cpp create mode 100644 krusader/Queue/queue_mgr.h create mode 100644 krusader/Queue/queuewidget.cpp create mode 100644 krusader/Queue/queuewidget.h create mode 100644 krusader/RemoteMan/Makefile.am create mode 100644 krusader/RemoteMan/remoteman.cpp create mode 100644 krusader/RemoteMan/remoteman.h create mode 100644 krusader/RemoteMan/remotemanbase.cpp create mode 100644 krusader/RemoteMan/remotemanbase.h create mode 100644 krusader/Search/Makefile.am create mode 100644 krusader/Search/krsearchdialog.cpp create mode 100644 krusader/Search/krsearchdialog.h create mode 100644 krusader/Search/krsearchmod.cpp create mode 100644 krusader/Search/krsearchmod.h create mode 100644 krusader/Splitter/Makefile.am create mode 100644 krusader/Splitter/combiner.cpp create mode 100644 krusader/Splitter/combiner.h create mode 100755 krusader/Splitter/crc32.cpp create mode 100755 krusader/Splitter/crc32.h create mode 100644 krusader/Splitter/splitter.cpp create mode 100644 krusader/Splitter/splitter.h create mode 100644 krusader/Splitter/splittergui.cpp create mode 100644 krusader/Splitter/splittergui.h create mode 100755 krusader/Synchronizer/Makefile.am create mode 100644 krusader/Synchronizer/feedtolistboxdialog.cpp create mode 100644 krusader/Synchronizer/feedtolistboxdialog.h create mode 100755 krusader/Synchronizer/synchronizedialog.cpp create mode 100755 krusader/Synchronizer/synchronizedialog.h create mode 100755 krusader/Synchronizer/synchronizer.cpp create mode 100755 krusader/Synchronizer/synchronizer.h create mode 100644 krusader/Synchronizer/synchronizerdirlist.cpp create mode 100644 krusader/Synchronizer/synchronizerdirlist.h create mode 100644 krusader/Synchronizer/synchronizerfileitem.h create mode 100755 krusader/Synchronizer/synchronizergui.cpp create mode 100755 krusader/Synchronizer/synchronizergui.h create mode 100644 krusader/Synchronizer/synchronizertask.cpp create mode 100644 krusader/Synchronizer/synchronizertask.h create mode 100644 krusader/UserAction/Makefile.am create mode 100644 krusader/UserAction/expander.cpp create mode 100644 krusader/UserAction/expander.h create mode 100644 krusader/UserAction/kraction.cpp create mode 100644 krusader/UserAction/kraction.h create mode 100644 krusader/UserAction/kractionbase.cpp create mode 100644 krusader/UserAction/kractionbase.h create mode 100644 krusader/UserAction/tstring.h create mode 100644 krusader/UserAction/useraction.cpp create mode 100644 krusader/UserAction/useraction.h create mode 100644 krusader/UserAction/useractionpopupmenu.cpp create mode 100644 krusader/UserAction/useractionpopupmenu.h create mode 100644 krusader/UserMenu/Makefile.am create mode 100644 krusader/UserMenu/usermenu.cpp create mode 100644 krusader/UserMenu/usermenu.h create mode 100644 krusader/VFS/Makefile.am create mode 100755 krusader/VFS/arc_vfs.cpp create mode 100644 krusader/VFS/arc_vfs.h create mode 100644 krusader/VFS/ftp_vfs.cpp create mode 100644 krusader/VFS/ftp_vfs.h create mode 100644 krusader/VFS/krarchandler.cpp create mode 100644 krusader/VFS/krarchandler.h create mode 100644 krusader/VFS/krdirwatch.cpp create mode 100644 krusader/VFS/krdirwatch.h create mode 100644 krusader/VFS/krpermhandler.cpp create mode 100644 krusader/VFS/krpermhandler.h create mode 100644 krusader/VFS/krquery.cpp create mode 100644 krusader/VFS/krquery.h create mode 100644 krusader/VFS/krvfshandler.cpp create mode 100644 krusader/VFS/krvfshandler.h create mode 100644 krusader/VFS/normal_vfs.cpp create mode 100644 krusader/VFS/normal_vfs.h create mode 100644 krusader/VFS/preservingcopyjob.cpp create mode 100644 krusader/VFS/preservingcopyjob.h create mode 100644 krusader/VFS/temp_vfs.cpp create mode 100644 krusader/VFS/temp_vfs.h create mode 100644 krusader/VFS/vfile.cpp create mode 100644 krusader/VFS/vfile.h create mode 100644 krusader/VFS/vfs.cpp create mode 100644 krusader/VFS/vfs.h create mode 100644 krusader/VFS/virt_vfs.cpp create mode 100644 krusader/VFS/virt_vfs.h create mode 100644 krusader/VFS/virtualcopyjob.cpp create mode 100644 krusader/VFS/virtualcopyjob.h create mode 100644 krusader/alpa-yellow.color create mode 100644 krusader/bash.color create mode 100644 krusader/calc.js create mode 100644 krusader/calc.ui create mode 100644 krusader/cr16-app-krusader_blue.png create mode 100644 krusader/cr16-app-krusader_red.png create mode 100644 krusader/cr16-app-krusader_root.png create mode 100644 krusader/cr16-app-krusader_user.png create mode 100644 krusader/cr22-app-krusader_blue.png create mode 100644 krusader/cr22-app-krusader_red.png create mode 100644 krusader/cr22-app-krusader_root.png create mode 100644 krusader/cr22-app-krusader_shield.png create mode 100644 krusader/cr22-app-krusader_user.png create mode 100644 krusader/cr32-app-krusader_blue.png create mode 100644 krusader/cr32-app-krusader_red.png create mode 100644 krusader/cr32-app-krusader_root.png create mode 100644 krusader/cr32-app-krusader_shield.png create mode 100644 krusader/cr32-app-krusader_user.png create mode 100644 krusader/cr48-app-krusader_blue.png create mode 100644 krusader/cr48-app-krusader_red.png create mode 100644 krusader/cr48-app-krusader_root.png create mode 100644 krusader/cr48-app-krusader_shield.png create mode 100644 krusader/cr48-app-krusader_user.png create mode 100644 krusader/cr64-app-krusader_blue.png create mode 100644 krusader/cr64-app-krusader_red.png create mode 100644 krusader/cr64-app-krusader_root.png create mode 100644 krusader/cr64-app-krusader_shield.png create mode 100644 krusader/cr64-app-krusader_user.png create mode 100644 krusader/defaults.h create mode 100644 krusader/dos_navigator.color create mode 100644 krusader/kicons.cpp create mode 100644 krusader/kicons.h create mode 100644 krusader/krservices.cpp create mode 100644 krusader/krservices.h create mode 100644 krusader/krslots.cpp create mode 100644 krusader/krslots.h create mode 100644 krusader/krusader.cpp create mode 100644 krusader/krusader.desktop create mode 100644 krusader/krusader.h create mode 100644 krusader/krusader_root-mode.desktop create mode 100644 krusader/krusaderapp.h create mode 100644 krusader/krusaderui.rc create mode 100644 krusader/krusaderview.cpp create mode 100644 krusader/krusaderview.h create mode 100644 krusader/lo16-app-krusader.png create mode 100644 krusader/lo32-app-krusader.png create mode 100644 krusader/lo32-app-krusader2.png create mode 100644 krusader/main.cpp create mode 100644 krusader/midnight_cmd_AHamann.color create mode 100644 krusader/midnight_commander.color create mode 100644 krusader/midnight_commander.keymap create mode 100644 krusader/midnight_commander.keymap.info create mode 100644 krusader/mount.js create mode 100644 krusader/mount.ui create mode 100644 krusader/panelmanager.cpp create mode 100644 krusader/panelmanager.h create mode 100644 krusader/paneltabbar.cpp create mode 100644 krusader/paneltabbar.h create mode 100644 krusader/recode.js create mode 100644 krusader/recode.ui create mode 100644 krusader/resources.h create mode 100644 krusader/select_from_file.js create mode 100644 krusader/splash.png create mode 100644 krusader/total_cmd_pleasent.color create mode 100644 krusader/total_commander.color create mode 100644 krusader/total_commander.keymap create mode 100644 krusader/total_commander.keymap.info create mode 100644 krusader/useraction_examples.xml create mode 100644 krusader/x-ace.desktop create mode 100644 pics/Makefile.am create mode 100644 pics/about.png create mode 100644 pics/cr16-action-kr_addbookmark.png create mode 100644 pics/cr16-action-kr_arc_pack.png create mode 100644 pics/cr16-action-kr_arc_test.png create mode 100644 pics/cr16-action-kr_arc_unpack.png create mode 100644 pics/cr16-action-kr_bookman.png create mode 100644 pics/cr16-action-kr_bookmark.png create mode 100644 pics/cr16-action-kr_calc.png create mode 100644 pics/cr16-action-kr_combine.png create mode 100644 pics/cr16-action-kr_compare.png create mode 100644 pics/cr16-action-kr_comparedirs.png create mode 100644 pics/cr16-action-kr_diskusage.png create mode 100644 pics/cr16-action-kr_ftp_connect.png create mode 100644 pics/cr16-action-kr_ftp_disconnect.png create mode 100644 pics/cr16-action-kr_ftp_new.png create mode 100644 pics/cr16-action-kr_fullview.png create mode 100644 pics/cr16-action-kr_hwinfo.png create mode 100644 pics/cr16-action-kr_invert.png create mode 100644 pics/cr16-action-kr_jumpback.png create mode 100644 pics/cr16-action-kr_mountman.png create mode 100644 pics/cr16-action-kr_profile.png create mode 100644 pics/cr16-action-kr_properties.png create mode 100644 pics/cr16-action-kr_select.png create mode 100644 pics/cr16-action-kr_selectall.png create mode 100644 pics/cr16-action-kr_setjumpback.png create mode 100644 pics/cr16-action-kr_split.png create mode 100644 pics/cr16-action-kr_syncbrowse_off.png create mode 100644 pics/cr16-action-kr_syncbrowse_on.png create mode 100644 pics/cr16-action-kr_syncdirs.png create mode 100644 pics/cr16-action-kr_terminal.png create mode 100644 pics/cr16-action-kr_treeview.png create mode 100644 pics/cr16-action-kr_unselect.png create mode 100644 pics/cr16-action-kr_unselectall.png create mode 100644 pics/cr16-app-krusader_root.xpm create mode 100644 pics/cr16-app-krusader_user.xpm create mode 100644 pics/cr22-action-kr_addbookmark.png create mode 100644 pics/cr22-action-kr_arc_pack.png create mode 100644 pics/cr22-action-kr_arc_test.png create mode 100644 pics/cr22-action-kr_arc_unpack.png create mode 100644 pics/cr22-action-kr_bookman.png create mode 100644 pics/cr22-action-kr_bookmark.png create mode 100644 pics/cr22-action-kr_calc.png create mode 100644 pics/cr22-action-kr_combine.png create mode 100644 pics/cr22-action-kr_compare.png create mode 100644 pics/cr22-action-kr_comparedirs.png create mode 100644 pics/cr22-action-kr_diskusage.png create mode 100644 pics/cr22-action-kr_ftp_connect.png create mode 100644 pics/cr22-action-kr_ftp_disconnect.png create mode 100644 pics/cr22-action-kr_ftp_new.png create mode 100644 pics/cr22-action-kr_fullview.png create mode 100644 pics/cr22-action-kr_hwinfo.png create mode 100644 pics/cr22-action-kr_invert.png create mode 100644 pics/cr22-action-kr_mountman.png create mode 100644 pics/cr22-action-kr_profile.png create mode 100644 pics/cr22-action-kr_properties.png create mode 100644 pics/cr22-action-kr_select.png create mode 100644 pics/cr22-action-kr_selectall.png create mode 100644 pics/cr22-action-kr_split.png create mode 100644 pics/cr22-action-kr_syncdirs.png create mode 100644 pics/cr22-action-kr_terminal.png create mode 100644 pics/cr22-action-kr_treeview.png create mode 100644 pics/cr22-action-kr_unselect.png create mode 100644 pics/cr22-action-kr_unselectall.png create mode 100644 pics/cr32-action-kr_addbookmark.png create mode 100644 pics/cr32-action-kr_arc_pack.png create mode 100644 pics/cr32-action-kr_arc_test.png create mode 100644 pics/cr32-action-kr_arc_unpack.png create mode 100644 pics/cr32-action-kr_bookman.png create mode 100644 pics/cr32-action-kr_bookmark.png create mode 100644 pics/cr32-action-kr_calc.png create mode 100644 pics/cr32-action-kr_combine.png create mode 100644 pics/cr32-action-kr_compare.png create mode 100644 pics/cr32-action-kr_comparedirs.png create mode 100644 pics/cr32-action-kr_dependencies.png create mode 100644 pics/cr32-action-kr_diskusage.png create mode 100644 pics/cr32-action-kr_ftp_connect.png create mode 100644 pics/cr32-action-kr_ftp_disconnect.png create mode 100644 pics/cr32-action-kr_ftp_new.png create mode 100644 pics/cr32-action-kr_fullview.png create mode 100644 pics/cr32-action-kr_hwinfo.png create mode 100644 pics/cr32-action-kr_invert.png create mode 100644 pics/cr32-action-kr_mountman.png create mode 100644 pics/cr32-action-kr_profile.png create mode 100644 pics/cr32-action-kr_properties.png create mode 100644 pics/cr32-action-kr_select.png create mode 100644 pics/cr32-action-kr_selectall.png create mode 100644 pics/cr32-action-kr_split.png create mode 100644 pics/cr32-action-kr_syncdirs.png create mode 100644 pics/cr32-action-kr_terminal.png create mode 100644 pics/cr32-action-kr_treeview.png create mode 100644 pics/cr32-action-kr_unselect.png create mode 100644 pics/cr32-action-kr_unselectall.png create mode 100644 pics/cr32-action-kr_useractions.png create mode 100644 pics/cr32-app-krusader_root.xpm create mode 100644 pics/cr32-app-krusader_user.xpm create mode 100644 pics/konfig_small.jpg create mode 100644 po/Makefile.am create mode 100644 po/bg.po create mode 100644 po/bs.po create mode 100644 po/ca.po create mode 100644 po/cs.po create mode 100644 po/da.po create mode 100644 po/de.po create mode 100644 po/el.po create mode 100644 po/es.po create mode 100644 po/fr.po create mode 100644 po/hu.po create mode 100644 po/it.po create mode 100644 po/ja.po create mode 100644 po/lt.po create mode 100644 po/nl.po create mode 100644 po/pl.po create mode 100644 po/pt.po create mode 100644 po/pt_BR.po create mode 100644 po/ru.po create mode 100644 po/sk.po create mode 100644 po/sl.po create mode 100644 po/sr.po create mode 100644 po/sr@Latn.po create mode 100644 po/sv.po create mode 100644 po/tr.po create mode 100644 po/uk.po create mode 100644 po/zh_CN.po create mode 100644 slack-desc create mode 100644 subdirs create mode 100644 tar/Makefile.am create mode 100644 tar/ar.protocol create mode 100644 tar/ktartest.cpp create mode 100644 tar/tar.cc create mode 100644 tar/tar.h create mode 100644 tar/tar.protocol create mode 100644 tar/zip.protocol create mode 100644 virt/Makefile.am create mode 100644 virt/virt.cc create mode 100644 virt/virt.h create mode 100644 virt/virt.protocol diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..304b668 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Shie Erlich [erlich {*} users {.} sourceforge {.} net] +Rafi Yanai [yanai {*} users {.} sourceforge {.} net] diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..c7aea18 --- /dev/null +++ b/COPYING @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/CVSNEWS b/CVSNEWS new file mode 100644 index 0000000..bd23928 --- /dev/null +++ b/CVSNEWS @@ -0,0 +1,340 @@ +------------------------------------------------------------------------ +- Krusader CVSNEWS +- http://www.krusader.org/text.php?t=CVSNEWS +------------------------------------------------------------------------ +- This file is only intended for krusader-cvs. +- It should contain a brief description of new features. In some way an +- extension to the ChangeLog. +------------------------------------------------------------------------ + +UserActions: Expander: Many fixes, better error handling, sensible + %_Each&-handling. Finally I managed to implement Jiri's 100k patch for + the useractions. This patch handles the Each-placeholder much better + (i.e. allows Each inside Copy and can deal with multiple Each's) and + provides a good base for future extensions. Thanks a lot! + +New feature: atomic extension. + - Extensions known to be atomic (like tar.gz) are now handled properly + both in the panel and during rename. The list of atomic extensions + can be provided through "Atomic Extensions" in [Look&Feel] in + krusaderrc. + +New feature: rename just the filename, without extension + - in the look&feel page, disable "rename selects extension", and then, + when you rename a file, only the filename will be selected, but not + the extension + +New feature: full screen terminal (mc style) + - if enabled in look&feel, pressing the required shortcut to show + the terminal emulator will hide all of krusader, just like midnight + commander. + +New feature: right click menu for bookmarks + - after right clicking on a bookmark, a popup menu appears with + + Open + Open in new tab + Delete + + menu items. + +New feature: enable/disable the special bookmarks + - right click on a special bookmark + (Popular URLs, Devices, Local Network, Virtual Filesystem, Jumb + back, Set jump back, Bookmark Current or Manage Bookmarks) + - a new rightclick menu appears containing the special bookmark items + if a menu item is checked then the bookmark is enabled + - one can enable/disable separately the following special bookmarks + - the "Popular URLs" bookmark + - the "Devices" bookmark + - the "Local Network" bookmark + - the "Virtual Filesystem" + - the "Jump back" and "Set jump back" bookmarks + +New feature: keeping the directory structure of copying/moving from + virtual folders + - assume we have 3 URL-s in a virtual subfolder + /home/myhome/mydir1/myfile1 + /home/myhome/mydir1/myfile2 + /home/myhome/mydir2/myfile3 + - in the destination folder we would like to get: + mydir1/myfile1 + mydir1/myfile2 + mydir2/myfile3 + - Just press F5 for copy (dialog appears) + source MUST be a virtual subfolder! + target MUST NOT be a virtual folder! + - in the dialog, there's a new option: + "Keep virtual directory structure" + - check it + - select /home/myhome/ for base URL + - start the copy / move + + - AND: the directory structure will be kept at copying! + that's it! :-) + +New option in look&feel: directories are always sorted by name + +Big cleanup in the UserAction module: + - dropped support of "same_as"-attribute in the description-tag + - dropped need for a manual name-conflict-resolution, now a nummer is + append on double names + - reduced the memory-consumption drasticly due to internal changes + - added copy actions to clipboard / past actions from clipboard + - multiselection for export/remove/copy + - renamed the actionfile we provide to useraction_examples.xml, + so that we can merge new examples with existing installations + - on export one can now choose between overwrite and merge is the + file already exists and contains useractions + - Actions are now manages with ActionMan; the list is now a + categorized tree with icon and title instead of the identifyer. + - On the UserAction page in Konfigurator you can now change the + Terminal for UserActions and the font for the output-collection. + +New archive handling: + supports passworded arj, ace, rar, zip + step into hidden archives by pressing on the archive + decompressing debian packages by Alt+U + using KWallet to store the passwords + writes out the error messages of the archiver + archive type autodetection by its header (first 512 byte) + +-------------------------------- 1.70.0 -------------------------------- + +New global calculate space function: + Used to calculate occupied space inside archives remote FS and in + virtual VFS need KDE >= 3.3 + for local FS the old (and faster) code is still used. + +New zip/tar slave - based on KDE's but support writing to archive + Modified KDE tar slave (which also handle ZIP archives) to support + writing. Compared to kr_arc: + Pros: Speed. No need for external binary. Speed. did I mentioned + speed? + Cons: does not support delete from archive. + (You need to change the protocol registration to use this slave) + +New configure-switches: + --without-konqueror - builds Krusader without Konqueror's servicemenus + --without-javascript - builds Krusader without JS support + In the past the support was always compiled in when the headers where + found. + +Jump-Back: + If you create a new tab the startup-path is saved. You can now step + deep into the dir-tree and Ctrl-J brings you back to your starting + position. It's also possible to set the current directory manually as + Jump-Back-Point. + +-------------------------------- 1.60.0 -------------------------------- + +Useraction: new placeholder: %_ListFile()% + is replaced by path/filename of a temporary file containing a list of + items usefull for external scripts + +Custom Selection Mode + +Popular Links - krusader's answer to google-ranking :-) + In the bookmarks menu, you'll see a new submenu called "popular urls" + From now on, krusader keeps track of every url you visit (also remote) + and keeps a ranking for every url. the more you visit the url, the + higher the ranking. clicking the popular links menu displays the top + 15 links sorted by popularity. the top is the most popular. this is + easy for when u need to visit urls often, but don't want to create a + bookmark. this is also a better "history" since unlike the 'history' + button, this ranking accumulates urls from all tabs. + + also use the two-enter dialog: + * open it + (ctrl-z or bookmarks->popular urls->popular urls(bottom of list)) + * type few letter to narrow the search + * hit enter (you'll go to the url list) + * hit enter again and the panel is refreshed! + + +Virtual VFS. + This is not a virtual folder ! + but more a container for URL's from different file system. + just perfect for displaying search results and so on... + Action you perform on the files in this VFS are performed on the + 'real' files. you don't just delete files from the VFS - you delete + them from your hard drive. + limitations:: you can't create directories inside a virtual VFS. + +Primitive scripting support. +condition: KJSEmbed is installed (package: KDEbindings) + Ctrl+Alt+J opens the JavaScript-console. There you can play around: + try 'Krusader.setCaption("Hey Ho, Let's go!");', + "Krusader.children();", "Krusader.child("help").slots();", + "alert(Krusader.properties())" and "Krusader.child("help").show();"... + In addition a new placeholder for the useraction, + %_Script(path/to/script.js)% executes an external file. + If the path is relative the file will be read from + /krusader/js/ + If a UserAction should execute the return of a script, set the second + parameter of %_Script()% to "return=cmd". + In this case the Variable 'cmd' will be read. + additional the second parameter can be used to pass variables to the + script: + "return=lala;foo=bar". here the variable foo will have at the + beginning of the execution the value 'bar' and the return-variable is + called lala instead of cmd. Warning: very alpha!! + +krusader has now a new toolbar: actions toolbar. you can show/hide it +using the view menu --> show actions toolbar. useful to put actions (and +later bookmarks), put in as a side toolbar with small icons. __you'll +have to overwrite krusaderui.rc__ + +color scheme can now be imported/exported. reacable in the colors page +in konfigurator + +disk usage (tools menu + 3rd panel) + +changing the coloumns by right clicking on the panel's header + +Refresh-in-the-background: from now on, reading a remote url or +the contents of an archive is done in the background. this means +that krusader remains responsive and can be used to do whatever you need +in any other panel or tab. + +useraction:new placeholder %_PanelSize% + This placeholder can change the ration between the two panels. + %aPanelSize("80")% makes the active panel use 80% of krusader's width + (height in vertical-mode) + ommiting the parameter means 50% + +useraction: new placeholder: %_Each% + This placeholder splitts the commandline into a list where + %_Each(...)% is replaced by one + list-item (all, all files, all dirs, all selected). These commands are + executed one after another. + +Full viewer in the 3rd hand (thanks to illissius) + +Shift-DEL will delete a file and not move it to the trash as DEL does. +(total commander like) + +Import/Export keyboard shortcuts from/to a file. want krusader to become +total commander in a single click? no problem! + +Mouse selection modes is back! check out the Look'N'Feel section + +-------------------------------- 1.51 ---------------------------------- + +The long awaited feature: Fn keys can be changed to different shortcuts + +Total-commander refresh: when krusader isn't focused, it is not refreshed +at all. + +Pressing ctrl-up arrow from the panel, jumps to the origin bar + +-------------------------------- 1.50 ---------------------------------- + +Human-readable file sizes is implemented (located in look&feel->panel) + +From now on, Konqueror's right click menu is imported to Krusader + +Cut (ctrl+x), Copy (ctrl+c) and Paste (ctrl+v) + are available. They even work with Konqueror. Please test it. + +Compare by content: you can now either: + - select (mark) one file in the left panel, and one in the right panel + - select exactly two files in the active panel + - make sure there is a file in the other panel with the same name as + the current file in the active panel + +Panel profiles: now it is possible to store environment profiles. + An environment profile contains the following: + - all the tabs path (left / right) + - the current tab (left / right) + - and the selected side (left or right) + You can save / restore these tabulator profiles. Please test it. + + Those users who use the CVS version of Krusader, should delete the + krusaderui.rc from their home directory, to make the new menu and + toolbar items visible. + (rm ~/.kde/share/apps/krusader/krusaderui.rc) + +Synchronizer: now you can use the search filters in the synchronizer + +Useraction: removed placeholder 'Bookmark'. It is deprecated now since +the new bookmark-system can be accessed directly like a user action. If +you need it anyway, use 'Goto' instead. + +TC like searching: if you type 'text' -> results the same as '*text*' +You can exclude files from the search with '|' +(ex. '*.cpp *.h | *.moc.cpp' ) + +Search is possible on remote file systems as well. + +If you have filesystems that you don't want to accidentally unmount (or +mount), just go to Konfigurator->Advanced, and enter a list of mount +points separated by commas, for example: /, /boot, /tmp) and mountman +won't try to (un)mount them. + +Mountman got a big nose-job ;-) please test it well. + +You can now drag'n'drop to the new tree view + +Shift+left/right changes tabs (thanks to Dmitry Suzdalev) + +New vfs_refresh() function only updates changes when you re-read a panel +and changes the content without the annoying full redraw effect. + +When closing Krusader, the tabs are saved and restored + +Synchronizer profiles: + Krusader handles synchronizer profiles. In synchronizer press + the 'profile' button, and you'll be able to add / load / save / remove + synchronizer profiles. + +Synchronize with Kget: + If you want to synchronize a local directory with an unstable ftp + server, Kget is a much better solution than simple file copying. After + comparing you may right click on the result list and select + 'Synchronize with kget' to execute the synchronization, after that the + listed files will be downloaded with kget instead of Krusader. + +Dropping URLs onto the status / totals line: + If a directory contains a lot of subdirectories, it may not be + possible to drop the URL onto the panel (on which only directories are + visible). Now the URL can be dropped onto the status / totals line + instead. + +Sync-browsing: + With a little toggle-button in the panel-level toolbar the SyncBrowse + mode is activated/deactivated. + When active, each directory change in the specific panel is performed + in the other panel also. + +User-Actions: + With the user action system the user can make his own actions on files + in the panel or access Krusader internal functions with parameters + directly using the placeholder. + The actions integrate seamless into KDE's action-system, so the + standard edit-toolbar/shortcut-dialogs can show/manipulate the user + actions, too. The user actions are stored in + ~/.kde/share/apps/krusader/useraction.xml (the file-structure is + documented in doxygen-headers of UserActionXML) User Actions can be + edited/added/im-/exported using a new Konfigurator module (although I + plan to move all action-related to a new ActionMan. For more info, see + http://www.jonas-baehr.de/forum/Krusader-ideas.txt) + Currently, these placeholder are implemented (for details see + UserAction/expander.cpp or doxygen): + Path replaced by the panels path + Count replaced by the number of + Filter replaced by the panels filter-mask + Current replaced by the current item + List replaced by a list of all + Select manipulates the selection in a panel + Goto changes the panels's path to + Ask asks the user for a some text and is replaced by the + answer + Clipboard manipulates the clipboard + Copy copies a file, useful for quick, local, backups + Sync opens the Synchronizer with a given profile + NewSearch opens the search-windows with a given profile + Profile loads a given panel-profile + + A GUI-based helper for placeholder-adding is provided. + In Path, Current and List spaces are per default automaticly escaped. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..7ee0df1 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,1277 @@ +1.90.0 "Power Stone" +==================== + + ADDED: Useraction, Unpack multiple zip archives + (thanks to Ernest Beinrohr OERNii, and Jonas) + ADDED: Useraction, uuencode and uudecode (thanks to Andrew Svet) + ADDED: Useraction, Unpack current tar.7z + ADDED: Useraction, tar.7z selected files + ADDED: Useraction, Unpack current tar.lzma + ADDED: Useraction, tar.lzma selected files + ADDED: Useraction, Unpack current lzma + ADDED: Useraction, Lzma current file + ADDED: Useraction, 7zip current (thanks to Vaclav Juza) + ADDED: Javascript useraction, select from file + ADDED: Useraction, tar.gz selected files (thanks to Fathi Boudra) + ADDED: Useraction, gzip current (thanks to Vaclav Juza) + ADDED: Useraction, Eject cd/dvd (thanks to Andrew Svet) + ADDED: Javascript useraction, calculator + ADDED: Javascript useraction, Mount as root + ADDED: Javascript useraction, Recode files using GNU recode + thanks to Vaclav Juza + ADDED: Javascript useraction, Recode files using iconv + thanks to Vaclav Juza + ADDED: Useraction, (Un)Pack an ar archive (.a, .deb,...) + thanks to Vaclav Juza + ADDED: Useraction, Verify signature with kgpg + ADDED: Useraction, Sign with kgpg + ADDED: Useraction, Decrypt with kgpg + ADDED: Useraction, Encrypt with kgpg + ADDED: Useraction, Split large mp3 (thanks to Andrew Svet) + ADDED: Useraction, Archive to Dir + ADDED: Useraction, Copy as root (thanks to Andrew Svet and MaxiPunkt) + ADDED: Useraction, Unmount (thanks to Stefan Endrullis) + ADDED: Useraction, Search and Replace in file + ADDED: midnight commander keymap, thanks Alejandro Hamann + ADDED: alpa-yellow color scheme, thanks aldo palmeri [alpa] + ADDED: bash color scheme, thanks Alejandro Hamann + ADDED: improved midnight commander color scheme, thanks Alejandro Hamann + ADDED: pleasent total commander color scheme + ADDED: dos navigator color scheme, thanks to Vovan [Koqep] + + FIXED: Useractions, after pwd command current workdir was not changed, + thanks to Vaclav Juza + FIXED: Eject DVD with right-click menu + FIXED: Actionman, sometimes the command field is empty, + patch by Vaclav Juza, thanks + FIXED: GCC 4.3: missing #includes thanks to Fathi Boudra + FIXED: krpermhandler.cpp didn't compile on kde 3.2.x + + I18N: Updated Catalan translation (thanks Joaquim Perez) + I18N: Updated French translation (thanks Tourneur Henry-Nicolas) + + +1.80.0 "Final 3rd Stone" +======================== + + FIXED: searcher doesn't always find content in binary files + FIXED: [ 1619452 ] Profile doesn't save status of sync-browse mode + FIXED: [ 1681270 ] right clicking pops context menu immediately + FIXED: [ 1645179 ] shortcut keys are not sent to the terminal + FIXED: [ 1736496 ] always sort dirs by name not working + + I18N: Updated Hungarian translation + I18N: Updated French translation (thanks Henry Nicolas) + I18N: Fixed [ 1725003 ] bad spanish translation + I18N: Fixed untranslatable strings, patch by Vaclav Juza, thanks + + +1.80.0-beta2 "Last Unstable Stone" +================================== + + ADDED: Terminal Emulator, paste with SHIFT+INSERT and CTRL+V + ADDED: Vaclav's checksum patches (added sha* tools, fixed bugs etc...) + ADDED: Synchronizer: ignore hidden files option + ADDED: Synchronizer-results: drag [left], SHIFT+drag [right], + Copy left/right selected items to clipboard + ADDED: Locate-results: dragging items, copy to clipboard (CTRL+C) + ADDED: Searcher-results: dragging items, copy to clipboard (CTRL+C) + ADDED: Support for useraction placeholders in Krusader's commandline + patches by Jiri Palacek and Vaclav Juza, thanks a lot! + ADDED: New default user action "Backup current" + http://www.kde-files.org/content/show.php?content=29801 + ADDED: ALT+C as default shortcut for compare directories + ADDED: Brief view + ADDED: GUI for configuring the atomic extensions in Konfigurator + + CHANGED: Useractions: much better handling of the Each-placeholder + patch by Jiri Palacek, thanks! + CHANGED: Icons in the 3rd hand (preview, quick and view) + + FIXED: [ 1684478 ] buggy configure check for klineedit + FIXED: Krusader wouldn't start after the "first time wizard" was launched + FIXED: krarc, problem with application/x-zip-compressed mime + FIXED: [ 1665209 ] can't see the modified flag (*) if many tabs are used + FIXED: [ 1678927 ] archive operation - copy to relative path fails + FIXED: [ 1659215 ] does not Quit when using Mac Menu style + FIXED: [ 1629447 ] can not view file in an archive with perm 600 + FIXED: KrServices::separateArgs bug, thanks to Jiri Palacek + FIXED: Broken 3rd hand disk usage icon on systems with basic installation + FIXED: [ 1649705 ] "Deleting non-empty directories" confirmation bug + FIXED: keyboard problems in synchronizer, locate, searcher + FIXED: [ 1601632 ] Esc don't work in KrViewer on SVG files + FIXED: 'preserve attributes' sometimes fails setting the file mode + FIXED: clicking on the 3rd hand widget's header, doesn't set focus + FIXED: [ 1647279 ] out-of-bounds array access in the Filelight widget + FIXED: Broken view panel icon in 3rd hand when Crystal icon theme is used + FIXED: [ 1629450 ] Editing files in a separate window + FIXED: Valgrind: Invalid Read at switching to a panel profile + FIXED: [ 1631578 ] Config error (caused by italian handbook) + FIXED: Problems with zip file names containing '[' character + FIXED: Autoconfigure doesn't tell that packing is enabled by 7z + FIXED: Problem with unpacking passworded ZIP files + FIXED: Compile problem with automake-1.10 (thanks to Sausi at the forums) + FIXED: FTP crash at slow servers + FIXED: ACL compile problem on FreeBSD + FIXED: in pack dialog, if two passwords are empty, a message would say + "passwords are equal" + + I18N: Fixed [ 1650677 ] German: Wrong apostrophs + I18N: Broke and fixed the plurals again! (in the latter case, thanks to + Vaclav Juza for the help ;)) + I18N: Updated a feature description in Konfigurator to match the new + menubar (thanks Doutor Zero) + + REMOVED: Outdated and unused Italian handbook translation + + +1.80.0-beta1 "The Last Krusade" +=============================== + + ADDED: quotation mark handling at search (ex. "Program Files") + ADDED: full support for ACL permissions (properties, preserve attrs, + synchronizer) + ADDED: credit for Vaclav Juza and Jiri Palecek in the about box + ADDED: Experimental input method support in quick search + (patch by Jiri Palecek) + ADDED: TerminalEmulator: Ctrl+F switches between full-widget TE, normal TE + (thanks to Vaclav Juza) + ADDED: Ctrl+Up from panel focuses the origin editbox, Ctrl+Down from origin + editbox focuses the panel (thanks to Vaclav Juza) + ADDED: TerminalEmulator: Ctrl+Shift+Up/Down always focus/unfocus TE + independently whether the command line is shown or not + ADDED: TerminalEmulator: if the command line is hidden, + TE receives Ctrl+Up / Ctrl+Down (thanks to Vaclav Juza) + ADDED: Pimped KDE's KeyDialog in order to provide import/export abilities + ADDED: UserAction: Outputcollectionwindow can now save the buffer + ADDED: UserAction: Outputcollection now supports fonts with fixed or + variable width + ADDED: synchronizer: double click on a file calls the diff utility (kompare) + ADDED: terminal emulator: Ctrl+Enter,Ctrl+Shift+Enter paste the filename + ADDED: atomic extensions (see CVSNEWS) + ADDED: archive packing / unpacking are now in the background + ADDED: renaming of just the filename, without extension + ADDED: full screen terminal window (mc-style) + ADDED: Inactive panel color dimming (thanks to Heiner) + ADDED: ActionMan for useraction configuration + ADDED: single instance mode + ADDED: start to system tray + ADDED: right click menu for bookmarks + ADDED: enable/disable special bookmarks by right clicking on them + ADDED: keeping the directory structures for virt folders at copy/move + ADDED: synchronizer, parallel threads for slow FTP servers + ADDED: an option for directories to be always sorted by name + ADDED: packing with encryption, multiple volume archives, compress level + ADDED: krarc, 7z, 7za handling + ADDED: media button + ADDED: swap panels / swap sides + ADDED: synchronizer, threshold for equality, time offset between sides + ADDED: synchronizer, faster "compare by content" for local files + ADDED: synchronizer, Feed to listbox + ADDED: searcher, synchronizer: directory name filters (ex. '* | CVS/') + ADDED: searcher is able to search content on remote URLs + ADDED: panel splitter shows the percent values at moving + ADDED: Copy/Move: preserve all attributes (time, owner, group) + ADDED: viewer, print + copy actions + ADDED: new krarc (password handling, type autodetection, writing + out archiver error messages, step into hidden archives,...) + + ARCH: refactoring in the useractions, see CVSNEWS + + CHANGED: atomic extensions are configurable through krusaderrc + CHANGED: Better quick navigation: first move mouse over subdir, then + press ctrl + left mouse button (patch by Jiri Palecek) + CHANGED: Better subdir calculation on quick navigation + CHANGED: Color cache redesigned. Konfigurator preview and actual colors + should now match + CHANGED: Heavily extended and reordered menubar (honouring the KDE HIG where + possible). All available actions are connected to the menus now. + CHANGED: Konfigurator: MouseMode got now it's own Tab in Look&Feel + CHANGED: Shortcut- and Toolbardialogs are removed from Konfigurator + CHANGED: Shortcuts are now exported in as plaintext, legacy import still + works. + CHANGED: UserActions are now managed with ActionMan. In Konfigurator + you can change settings _about_ useractions. + + FIXED: problems at starting maximized, without splash screen + FIXED: [ 1500411 ] Crash when R-click on free space and drag on files + FIXED: [ 1579847 ] launch command line in console not saved + FIXED: media button would display encoded paths + (http://krusader.sourceforge.net/phpBB/viewtopic.php?t=1789) + FIXED: crash when viewing file properties due to class name clash + (thanks to Stephan Binner) + FIXED: .tar.bz2 was not treated as atomic extension, while .tar.gz.test was + FIXED: disk usage: other filelight bugfixes + FIXED: disk usage: filelight crash because of missing null pointer checks + FIXED: media button always writes out the mounted location + FIXED: [ 1495465 ] packing dialog, 'MIN' and 'MAX' labels below the slider + FIXED: [ 1436725 ] Status bar is not updated after RIGHT-ARROW is pressed + FIXED: [ 1578768 ] Wrong sorting by Date column in search dialog + FIXED: [ 1599142 ] problem with "Rename selects extension" and directories + FIXED: wrong name after cancelling inplace rename by Esc + FIXED: locate jumps onto the file after double click + FIXED: When a refresh fails, the attempted URL is kept in the origin bar, + and focus remains there for the user to fix. Idea by Vaclav Juza + FIXED: TerminalEmulator didn't hide for all shortcuts + FIXED: Konfigurator layout: should fit into 800x600 again + FIXED: KeyDialog: alternative shortcuts are ex-/imported as well + FIXED: KeyDialog: canceling the dialog undoes import + FIXED: ActionMan: creating a new actions doesn't seem to modify the current + FIXED: ActionMan: Save modifications on current action + FIXED: [Debian: 378138] Changed the location of the .desktop-files to match + freedesktop.org's standards + FIXED: Useractions: outputcollections works again + FIXED: inconsistences and possible memoryleaks in useractions + (thanks to Jiri Palacek) + FIXED: Nice shutdown at SIGTERM,SIGHUP,SIGQUIT (thanks toJiri Palacek) + FIXED: QLayout warnings in ListPanel (patch by Jiri Palecek) + FIXED: memory leaks in KRpermHandler (patch by Jiri Palecek) + FIXED: shutdown bugs (thanks to Jiri Palacek) + FIXED: const char * compiler warnings removed (patch by Jiri Palecek) + FIXED: memory leaks in KrDetailedView (patch by Jiri Palecek) + FIXED: terminal emulator sends the CD commands too frequently + FIXED: terminal emulator scrolls up its content after hide/show + FIXED: [ 1501740 ] can not link from a search result's virtfs + FIXED: rare compile problem where exit() isn't defined + FIXED: [ 1519955 ] wrong permission handling in vfs::vfs_calcSpaceLocal + FIXED: viewer gives back the focus to the search/locate widgets after ESC + FIXED: problems with local directory names containing '@' character + FIXED: security: sometimes the passwords are stored in cleartext in + bookmarks.xml + FIXED: cannot close Krusader when "menubar on top of the screen" is chosen + FIXED: URL duplication is disabled in the virtual URL collection + FIXED: cut/copy/paste also works for virtual URLs + FIXED: [ 1483172 ] crash at refreshing the view during rename + FIXED: [ 1144729 ] Krusader doesn't remember popup panel splitter position + FIXED: [ 1479034 ] Crashes after clicking home button, when quicksearch is + active (patch by Heiner Eichmann) + FIXED: wrong character set is used on the radial map labels + FIXED: TC style rename does not work with "Obey KDE's global selection + policy" + FIXED: [ 1189341 ] minimize to tray problems with GNOME + FIXED: set duplicate exclusion and maximum count for all KHistoryCombos + FIXED: [ 984936 ] Wrong file cursor position when entering protected + directory + FIXED: [ 1232507 ] panel focus change problems at using the keyboard + FIXED: bookmark separators get corrupted after adding a new bookmark + FIXED: [ 1116161 ] more detailed error message at opening FTP URLs via HTTP + proxy + FIXED: [ 1103646 ] MountMan exits after umount and a fast click on the + device + FIXED: single click doesn't work in TC selection mode + FIXED: disk usage crash at deleting files + FIXED: valgrind: Free Memory Read - KMountManGUI::clicked() + FIXED: valgrind: Free Memory Read - SynchronizerGUI::loadFromProfile() + FIXED: valgrind: Free Memory Read - RadialMap::Widget::paintExplodedLabels() + FIXED: valgrind: Free Memory Read - DULines::slotChanged() + FIXED: valgrind: Free Memory Read - DULines::slotDeleted() + FIXED: valgrind: Free Memory Read - KrDetailedView::contentsMousePressEvent() + FIXED: valgrind: Mismatched delete/delete[]- RadialMap::Builder::Builder() + FIXED: valgrind: Uninitialized Memory Read - DUFileLight::slotAboutToShow() + FIXED: valgrind: Free Memory Read - KViewer::tabCloseRequest() + FIXED: valgrind: Uninitialized Memory Read - KViewer::tabChanged() + FIXED: valgrind: Free Memory Read - PanelManager::slotCloseTab() + FIXED: [ 1435352 ] crash after NewPanel->Ctrl+U->DeletePanel + FIXED: HTML tags cause problem to the searcher + FIXED: [ 1415250 ] searching large directories, doesn't process UI events + FIXED: search by content goes into infinite loop if the file cannot be + opened + FIXED: after exiting the pending jobs stall + FIXED: [ 1193239 ] crash at 'Closing Current Session' + FIXED: synchronizer is always on the top of the panels + FIXED: [Debian: 352367] useractions with terminal output ignores configured + terminal + FIXED: last tabs are not saved, if an old config value is present + FIXED: panel popup gets focus at opening, gives focus to panel at hiding + FIXED: viewer, detaching tab changes 'Editing' to 'Viewing' + + I18N: Added a russian handbook (translation is work in progress) + (thanks to Roman Batejkin) + I18N: Fixed clash with unpack shortcut in useractions string (Alt+U) + (thanks Hideki Kimura) + I18N: Updated Japanese translation (thanks Hideki Kimura) + I18N: Renamed remaining instances of 'mark' to 'select' + I18N: Many consistency changes in the menu names + I18N: Fixed [ 1480646 ] Home button tooltip has a wrong default translation + I18N: Updated Russian translation (thanks Dmitry A. Bugay) + I18N: Updated Swedish translation (thanks Peter Landgren) + I18N: Updated Serbian translations (thanks Sasa Tomic) + I18N: Updated Brazilian Portuguese translation (thanks Doutor Zero) + I18N: Updated French translation (thanks Guillerm David) + I18N: Updated Polish translation + (thanks Tomek Grzejszczyk and Marcin Garski) + I18N: Updated Lithuanian translation (thanks Dovydas Sankauskas) + I18N: Menu items which open a new window, indicate that with trailing dots + (KDE standard) + I18N: Plural fixes in Synchronizer + I18N: Updated Dutch translation + I18N: Updated Slovenian translation (thanks Matej Urbancic) + I18N: Added Turkish translation (thanks Bekir Sonat) + I18N: Updated Greek translation (thanks Spiros Georgaras) + I18N: Updated Czech translation (thanks Vaclav Juza) + I18N: Updated Spanish translation (thanks Alejandro Araiza Alvarado) + I18N: Updated German translation + I18N: viewer: 'Editing', 'Viewing' can be translated + I18N: Don't omit paragraphs and close all tags in strings to avoid errors + in translation tools (based on patch by Giuseppe Bordoni) + + +1.70.0 "Round Robin" +========================== + ADDED: new splashscreen + button to disable it in the look&feel section + ADDED: winning icons, SVGs and fixed code to use them + ADDED: DUMMY splash screen (krusader/splash.jpg) which will be replaced + later + + CHANGED: UserActions: addPlaceholderButton now only adds a space after + an executable. Not after normal placeholders. + + FIXED: [ 1413503 ] detach tab shortcut changed Ctrl+Shift+D + FIXED: [ 1407656 ] bookmark problem with identical names in different + folders + FIXED: [ 1421473 ] viewer doesn't notice that the URL was changed + FIXED: [ 1235959 ] problems at viewing 600 permission files + FIXED: cannot umount devices because of a watcher bug (thanks to vaclavj) + FIXED: 1076857 & 1384529 - thanks to heiner + FIXED: [ 1409160 ] Edited bookmarks require restart to become fully updated + FIXED: missing dpkg from Konfigurator-Dependencies + FIXED: [ 1234213 ] synchronizer keeps owner,group if possible + FIXED: [ 1365423 ] synchronizer does not copy symlinks + FIXED: [ 1393227 ] KURLListRequester uses url completion instead of + shell completion (caused problems at spaces) + FIXED: [ 1391892 ] problem with international characters in the + destination of a symlink + FIXED: [ 1393215 ] searcher, synchronizer: ~,$HOME,... is accepted now + FIXED: [ 1413503 ] viewer: detach wasn't disabled when 1 tab remained + FIXED: [ 1417969 ] Keybindings: reset to default keybinding fails + FIXED: Konfigurator 'Defaults' button works only on the actual subpage + FIXED: [ 1411561 ] renaming bug (thanks Heiner Eichmann) + FIXED: [ 1381770 ] Status bar is not updated after TAB is pressed + (thanks Heiner Eichmann) + FIXED: [ 1365053 ] krservices.h: invalid member function declaration + (thanks Heiner Eichmann) + FIXED: [ 1400642 ] possible data loss (thanks Heiner Eichmann) + FIXED: [ 1352107 ] File search "as you type" (thanks Heiner Eichmann) + FIXED: [ 1401005 ] F10 doesn't close KrViewer + FIXED: [ 1390116 ] CTRL+G duplicate action in viewer + FIXED: [ 1362632 ] Ctrl-Alt-C does not work + FIXED: [Debian: 343960] outdated libtool prevents from building + (thanks to Aurelien Jarno ) + FIXED: [ 1398540 ] wrong font in the new network connection dialog + FIXED: [ 1398442 ] Column 'rwx' wrong data when column 'Type' is on + (thanks Spiros Georgaras) + FIXED: UserActions: addPlaceholderButton's popup-position + FIXED: 'match whole word only' flag doesn't work in search + FIXED: [ 1352107 ] File search "as you type" + FIXED: [ 1351641 ] Krusader 1.70.0-beta2 on Sparc/Solaris: checksumdlg.h + FIXED: terminal emulator saves its size from now + FIXED: hiding the full size terminal emulator cannot restore the panels + FIXED: terminal emulator has no focus after toggling it on + FIXED: preserve dates doesn't copy the dates of folders + + I18N: [ 1397828 ] i18n: "dir" is not translated + I18N: Added Greek translation (thanks Spiros Georgaras) + I18N: Updated French translation (thanks Guillerm David) + I18N: Updated Danish translation (thanks Peter H. Sorensen) + I18N: Updated Hungarian translation (thanks Arpad Biro) + + +1.70.0-beta2 "Afterburner" +========================== + ADDED: you can now cancel creating and verifying checksums + ADDED: a (missing) shortcut to bookmark current item (ctrl-shift-d) + ADDED: you can turn off sending CDs to the terminal emulator (general tab) + ADDED: unpacking from RPM packages (much faster than using krarc) + + CHANGED: our write-enabled tar KIO-slave is only build when --with-kiotar is + passed to ./configure. In this case the KDE-version will may be + overwritten! + + FIXED: [ 1345220 ] bookmarks: separators shown as folders + FIXED: new viewer tabs were sometimes added to windows different from the + previously used ones + FIXED: [ 1323613 ] SECURITY!!! PopularUrls stores cleartext passwords in + krusaderrc + FIXED: [ 1329044 ] krarc, missed similar file names belonging to different + rpm-s + FIXED: krarc doesn't notice the change of the rpm file to create new + contents.cpio + FIXED: iso protocol cannot step into files larger than 2 GByte + FIXED: KDE 3.4, starting from profile misses the active tab which causes + inconsistent state + FIXED: krarc reports 000 permission for bz2 files + FIXED: bug in checksum module regarding names with spaces + FIXED: konfigurator minor fixes + FIXED: viewer, the tabs were identified by its page index, which can change + FIXED: searcher: space means logical OR + "text1 text2" == "*text1* || *text2*" + FIXED: krarc cannot step into those archives which name contains '#' + FIXED: viewer doesn't warning to save the window at close, and ignores + "Cancel" button + FIXED: locate dialog doesn't close when exiting krusader + FIXED: UserAction: Crash when a programm wrote to stderr but only stdout + was collected (Thanks to Shao Lo) + FIXED: searcher crash when clicking onto an empty field after the results + FIXED: disk usage crash on remote vfs because of recursion + FIXED: [ 1262907 ] crash when closing an sftp tab which is loading + + I18N: Added Lithuanian translation (thanks Dovydas Sankauskas) + + +1.70.0-beta1 "Hellfire" +========================== + ADDED: KrSqueezedTextLabel can now specify the area in the string to be + always visible + ADDED: when searching for text inside file, the first line containing the + text is displayed + ADDED: checksum module now supports the cfv tool (for md5 and sha1) + ADDED: QuickNavigation: hold ctrl and move the mouse over the url bar to + see! + ADDED: new checksum creation/verification mechanism + (see mail titled "new checksum feature" to krusader-devel) + ADDED: alt-ctrl-s creates a new symlink + ADDED: ctrl-h opens history on the current panel + ADDED: Nicer application search results + ADDED: right click menu -> trash, delete, shred options + ADDED: column types can be changed and saved individually to each panel + (each side) + ADDED: select remote encoding menu for fish, ftp and sftp protocols + ADDED: clear-location-bar button a-la konqueror (configurable) + ADDED: permissions column as octal numbers + ADDED: right-click menu now has a "create new..." submenu + ADDED: ctrl-alt-enter opens the current folder in a new tab + ADDED: calculate space in archives and remote FS (KDE >= 3.3.0) + ADDED: experimental support for mimetype-on-demand + ADDED: experimental support for icon-on-demand + ADDED: when custom filter is set, the Totals line will show the filter. + example: [*.cpp] + ADDED: useraction: Drop a warning on JavaScript-errors + ADDED: set krusaders icon acording to the users privileges + ADDED: preserve date for local targets at copy / move + ADDED: useraction: For JS-extensions the global variable scriptDir is + available, indicating the location of the current script + ADDED: synchronize selected files + ADDED: colorful synchronizer :-) + ADDED: starting more tabs with --left=tab1,tab2,tab3 --right=tab4,tab5 + ADDED: vertical mode is saved with 'ui save settings' or 'save position' + and restored + ADDED: A Safari-like Jump-Back feature (Ctrl-J and in the bookmark-menu) + ADDED: CTRL-L shortcut to go to the location bar (origin) as in firefox and + konqueror + ADDED: filters for selecting files + ADDED: New zip/tar slave - based on KDE's but support writing to archive + + ARCH: refactoring in the view. enforcement of getVfile and getMutableVfile + ARCH: removed a lot of KrViewItem's API + ARCH: right-click menu code moved to a new class KrPopupMenu + ARCH: moved JavaScript-stuff into it's own module KrJS + ARCH: Makefile.am's for /krusader and /pics revised + + CHANGED: Use WhatsThis in favour of tooltips where reasonable + CHANGED: the panel startup is profile based instead of directory based + + FIXED: krarc error, when the filename contains '$' or '&' + FIXED: synchronizer, compare by content can be terminated by + FIXED: preserve date fails at moving + FIXED: bookmark issues (http://www.krusader.org/phpBB/viewtopic.php?p=6357#6357) + FIXED: [ 1278534 ] Krusader hangs when packing search results + FIXED: [ 1169980 ] User Actions Titles are not stored in system encoding + (thanks Vaclav Juza) + FIXED: '-icon' as well as '--icon' as command-line arguments are handled + FIXED: [ 1272583 ] fixes on the .desktop files, thanks Marcin Garski + FIXED: [ 1253323 ] middle click crash on ".." directory + FIXED: burst refresh if FAM is enabled + FIXED: crash when "run in terminal mode" was active on a directory with + insufficient permissions (thanks Oleksandr Shneyder) + FIXED: [ 1213137 ] javascript self.close() causes crash in the viewer + FIXED: Control+Delete can be used in those distributions where Shift+Delete + doesn't work + FIXED: [ 1186534 ] problems with the new network connection (port, path, + password, username) + FIXED: renaming does not change the view, until VFS sends a signal about the + rename actually being done + FIXED: [ 1174273 ] updating the status bar at pressing the arrow keys + FIXED: calcspace and diskusage shows the same size + FIXED: [ 1180202 ] calcspace calculates wrong size for symbolic links + FIXED: [ 1196779 ] searcher, sorting by size is broken + FIXED: changing the 'show hidden files' sets the active tab to right, + untouches the inactive ones + FIXED: the default value of moving to trash is wrong in Konfigurator + FIXED: problems with moving to trash at virt_fs and diskusage module + FIXED: gcc 2.95 compiler fix + FIXED: changed locate-gui shortcut from ctrl-l to shift+ctrl+l + FIXED: bookmark icons were not saved correctly + FIXED: clicking a search result won't jump to it, if it's in the current + directory (patch by Thomas Jarosch) + + I18N: [ 1201586 ] Wrong encoding of slovenian translation + I18N: [ 1243409 ] Encoding problem and bad plural in trash files dialog + I18N: [ 1217697 ] Can't translate some Bookman II menu entries + I18N: Added multiple plural support + (thanks Vaclav Juza for all the help) + I18N: Added Serbian translation (thanks Sasa Tomic) + I18N: Added Brazilian Portuguese translation (thanks Doutor Zero) + I18N: Updated Russian translation (thanks Denis Koryavov) + I18N: Updated Portuguese translation (thanks Bruno Queiros) + I18N: Updated Czech translation (thanks Vaclav Juza) + I18N: Updated Dutch translation + I18N: Updated French translation (thanks David Guillerm) + I18N: Updated Spanish translation (thanks Alejandro Araiza Alvarado) + I18N: Updated Swedish translation (thanks Peter Landgren) + I18N: Updated Chinese Simplified translation (thanks Jinghua Luo) + I18N: Updated Italian translation (thanks Giuseppe Bordoni) + I18N: Updated Polish translation (thanks Pawel Salawa) + I18N: Updated Slovenian translation (thanks Matej Urbancic) + I18N: Updated German translation + + +1.60.0 +====================== + ADDED: New Gorilla-style icon by www.OnExige.com + + FIXED: Crash if the useractions.xml contains invalid data + FIXED: quick selection doesn't work + FIXED: synchronizer, content filter doesn't work + FIXED: synchronizer, consistency bug of the filter combos + FIXED: advanced filter hides the searcher window at errors + FIXED: combiner, smoother interoperability with Total Commander + FIXED: UserActionMenu gets updated after Konfigurator applys + FIXED: can't sort by extension when "Case Sensitive sort" is on + FIXED: move to trash didn't work on kde 3.4.0 + FIXED: [ 1123995 ] custom selection mode misfunction + + UPDATED: Italian translation (thanks Giuseppe Bordoni) + UPDATED: Hungarian translation (thanks Arpad Biro) + UPDATED: Chinese Simplified translation (thanks Jinghua Luo) + UPDATED: Bulgarian translation (thanks Milen Ivanov) + + +1.60.0-beta2 +====================== + FIXED: devices:/ is changed to media:/ in 3.4 + FIXED: konfigurator crash on KDE 3.4 at checking 'save settings' + FIXED: no refresh after splitting files + FIXED: splitter doesn't handle sizes bigger than 2 GB properly + FIXED: problem at restart if virtual folders were saved at last exit + FIXED: locate / search feed to listbox number generation + + +1.60.0-beta1 +====================== + ADDED: useraction: new placeholder: %_ListFile()% + ADDED: total commander color scheme + ADDED: Custom Selection Mode. dirk: a dream comming true? ;-) + ADDED: synchronizer, exclude directories from the comparation + ADDED: some nice sample useractions + ADDED: PopularUrls was rewritten for a nice-like algorithm + ADDED: Useractions in the menubar (need an update of krusaderui.rc) + ADDED: searcher: ask for a collection-name on feed to listbox + ADDED: popular urls is now persistent + ADDED: popular-urls - krusader's answer to google-ranking ;-) + ADDED: better completion in the origin box: constructs such as ~/src and + $QTDIR/bin should work now. + ADDED: Slovenian translation (thanks Matej Urbancic) + ADDED: bookmarks can now be placed into toolbars + ADDED: searcher, feed to listbox (with virtual folders) + ADDED: Primitive scripting support; Warning: very alpha!! + ADDED: new toolbar for actions. use view->show actions toolbar. you'll need + to remove ~/.kde/share/apps/krusaderui.rc to see it + ADDED: refresh-in-the-background for remote urls and for archives + ADDED: changing the coloumns by right clicking on the panel's header + ADDED: color scheme export/import + ADDED: an other .desktop-file with the red icon that starts krusader as root + ADDED: useraction: now every placeholder can cancel the execution. + (-> %_ask(..)%) + ADDED: useraction: new placeholder: %_PanelSize(percent)% + ADDED: Synchronizer, pause/resume button for synchronize with kget + ADDED: disk usage (tools menu + 3rd panel) + ADDED: useraction: new placeholder: %_Move(src, dest)% + ADDED: useraction: new placeholder: %_Each% + ADDED: full viewer in the 3rd hand + ADDED: shift-del deletes and doesn't move to trash + ADDED: splitter: pre-defined 650MB and 700MB CD-R + ADDED: more Konfigurator Tooltips + ADDED: usermenu: entry to open konfigurator with the useraction-page + directly + ADDED: import/export of keyboard shortcuts + ADDED: mouse selection modes are back! thanks to heiner for doing the work + ADDED: virtual VFS (try virt:/somthing/) + + ARCH: KChooseDir was rewritten. plz have a look at the code/email + ARCH: move listpanel from qstring to kurl. plz read email before + continuing! + + FIXED: useraction: cancel a useraction now works for recursive expansion too + FIXED: useraction: problems with international characters + FIXED: panel profiles sometimes hang + FIXED: new ftp dialog was broken + FIXED: [ 1073940 ] no refresh after the exclusion filter is modified + FIXED: [ 1108444 ] no error message if copy or move fails + FIXED: auto filesystems cannot be mounted + FIXED: krusader fails to refresh at copying to the source directory on + different name + FIXED: color "Inactive Marked Current Foreground" was ignored (thx heiner) + FIXED: searcher gets behind the main window, if file browse is pressed + FIXED: [ 1120827 ] dir copy / move with F5 / F6 doesn't work + FIXED: [ 1064578 ] remote URL-s are saved in panel profiles + FIXED: Creatring dir-trees on the fly (mkdir /foo/bar/test) is working again + FIXED: Syncbrowse is working again and is deactivated automaticly if no + longer possible + FIXED: [ 1107141 ] view throws error at editing new files on remote fs + FIXED: [ 1110507 ] cannot open rpm package if path contains space + FIXED: command line alters its height at opening/closing the popup panel + FIXED: [ 1037003 ] konqueror style drag and drop + FIXED: [ 1076865 ] the default search text is '*' + FIXED: [ 976598 ] krusader occasionally crashes at closing the viewer + FIXED: [ 1033319 ] Relative paths dont get auto-completed + FIXED: [ 971831 ] space calculation failure if the file is bigger than + 4 GByte + FIXED: [ 1089450 ] synchronizer copies the date information for local files + FIXED: [ 1109249 ] drag and drop doesn't work with international characters + FIXED: viewer cannot open 600 files, when the owner column is enabled + FIXED: ftp_vfs overloads the CPU at stepping into a slow server on the + network + FIXED: krusader's detection of old or incompatible versions + FIXED: dirk's patch for better looking icons + FIXED: cannot open FTP proxy bookmarks + FIXED: [ 1101237 ] the reload shortcut is always set to Ctrl+R at startup + FIXED: rename extension bug in kde 3.3 + FIXED: crash on startup due to restoring of last size and position + FIXED: couldn't sort case sensative on some systems (see KDE bug #40131) + FIXED: resizing of the main window produces strange effencts + FIXED: double dragging in Krusader and Konqueror selection modes + FIXED: right click menu and user action ID turmoil + FIXED: [ 1074393 ] Crashes sometimes on startup (thanks Heiner) + FIXED: custom icons in bookmarks weren't shown + FIXED: All openUrl() calls are now delayed to avoid deadlocks... + + UPDATED: remoteman was disabled. from now on, bookmark manager only + UPDATED: Hungarian translation (thanks Arpad Biro) + UPDATED: Catalan translation (thanks Quim Perez Noguer) + UPDATED: Portuguese translation (thanks Bruno Queiros) + UPDATED: Dutch translation + UPDATED: Swedish translation (thanks Peter Landgren) + UPDATED: Russian translation + UPDATED: German translation + + +1.51 +====================== + ADDED: Portuguese translation (thanks Bruno Queiros) + ADDED: Fn keys can have custom shortcuts + ADDED: krusader can be resized to a small size even with Fn keys showing + ADDED: Total-commander style refresh (at last) + ADDED: ctrl-up arrow (from the panel) goes up to the origin bar + ADDED: New commandline option: --profile + ADDED: Heiner's selection mode patch. Still alpha. + ADDED: Ukrainian translation (thanks Ivan Petrouchtchak) + ADDED: disk usage tool (alpha version) + ADDED: vertical krusader: hit alt+ctrl+v to test + ADDED: extra information in the totals bar + + FIXED: separators were not displayed in the bookmarks list + FIXED: deleting a folder didn't update the bottom stats correctly + FIXED: useraction: parse the default-value "__goto" again + FIXED: useraction: Crash when filename contained brackets '(...)' + FIXED: world-class-annoying-bug when sometimes while using quicksearch, + the file that was selected by quicksearch got hidden beneath the bar + FIXED: mime types are shown only in english + FIXED: when using quicksearch, current item wasn't visible + FIXED: a crash when packing/unpacking to partial URL + + UPDATED: Dutch translation (thanks Frank Schoolmeesters) + UPDATED: Hungarian translation (thanks Arpad Biro) + UPDATED: German translation + + +1.50 +====================== + FIXED: mountman now blocks and wait for mount/umount to complete + FIXED: sorting got borked because locale-aware-compare isn't handling files + that start with '.' well + FIXED: possible opendir leakage, fish works only when moving the mouse + FIXED: taken KDE's KDiskFreeSp class to optimize DF handling + FIXED: Krusader overloads the CPU with panel refreshing + FIXED: Wrong Danish language code (dk.po->da.po) + + UPDATED: Catalan translation (thanks Quim Perez) + UPDATED: Italian translation (thanks Giuseppe Bordoni) + UPDATED: Bulgarian translation (thanks Milen Ivanov) + UPDATED: Slovak translation (thanks Zdenko Podobny) + UPDATED: Hungarian translation (thanks Arpad Biro) + UPDATED: German translation + UPDATED: Dutch translation (thanks Frank Schoolmeesters) + + +1.50-beta1 +====================== + ADDED: if view is human-readable, status bar is normal (bytes) and vice + versa + ADDED: Human-readable file sizes is implemented + (located in look&feel->panel) + ADDED: useraction: available via rightclick-menu + ADDED: importing the right click menu of konqueror + ADDED: cut(CTRL+X), copy(CTRL+C), paste(CTRL+V) + ADDED: useraction: new Placeholder %_Profile("panel-profile")% + ADDED: useraction: new Placeholder %_NewSearch("search-profile")% + ADDED: useraction: run as different user + ADDED: alt-O now sync the panels (like ctrl-left/right arrows) + ADDED: new shortcut (ctrl-d) to open bookmarks on current panel + ADDED: panel costum colors: new Current Marked Foreground + ADDED: compare by content: the action is now smarter in finding the right + files + ADDED: profiles for the panels + ADDED: mkdir (F7) can now create whole trees on the fly ("foo/bar/test") + ADDED: synchronizer uses the search filters + ADDED: search profiles + ADDED: searcher: TC like search ( 'text' == '*text*' ) + excluding files with '|' (ex. '*.cpp *.h | *.moc.cpp' ) + ADDED: search on remote file systems + ADDED: konfigurator|advanced has a new entry: just enter mountpoints + there, and mountman won't try to mount/unmount them. + ADDED: mountman got a big nose-job ;-) plz test + ADDED: dropping on the tree panel (copy,move,link) + ADDED: packing / unpacking to/from remote URL-s + ADDED: short tab names + ADDED: compare directories (mark menu) + ADDED: shift+left/right changes tabs (thanks to Dmitry Suzdalev) + ADDED: linking mimes and protocols + ADDED: new delete dialog box: lists the file names to be deleted + (thanks to dirk for the idea) + ADDED: iso protocol for viewing .iso cd/dvd images + (thanks to Szombathelyi Gyorgy) + ADDED: full handling of arj, ace and lha packers + ADDED: useraction: new Placeholder %_Sync("synchronizer-profile")% + ADDED: synchronizer: profile handling + ADDED: synchronizer: swap sides + ADDED: useraction: new Placeholder %_Copy("from", "to")% + ADDED: 3rd hand: new panel that does quick selection + ADDED: 3rd hand: look n feel changed to fit krusader + ADDED: credit for jonas in the about box + ADDED: panels now save the tabs at shutdown (thanks to Donat Martin) + ADDED: dropping URL-s onto the status / totals line + ADDED: Bosnian translation + ADDED: synchronizer: excluding files with '|' in the file filter + (ex. '*.cpp *.h | *.moc.cpp' ) + ADDED: tooltips for squeezed tabs + ADDED: sync-browse mode (if on, a directory-change in the active is also + performed in the inactive panel) + ADDED: beta-state incremental refresh. test it with fam enabled! + ADDED: synchronizer: ability to give more files in the file filter + (ex. '*.cpp *.h') + ADDED: Two single click rename (Total Commander rename) + ADDED: The 3rd hand of krusader. click the litle arrow below the panel's + scrollbar to see.. + ADDED: showing suid, sgid and sticky bits in the permissions column + ADDED: New useraction-system (partly based on Shies usermenu-prototype) + + REACTIVATED: usermenu (now using the new useraction-system) + + FIXED: synchronizer fails at case insensitive (Windows) file systems + FIXED: crash when deleting an useraction created in the same session + FIXED: locale aware ABC sorting (for non-english languages) + FIXED: useraction: startpath is now working + FIXED: useraction: i18n is now working in the add-placeholder-menu + FIXED: searcher corrupts international characters + FIXED: searcher cannot open remote URL-s for editing/viewing (archives) + FIXED: the File/Properties function writes incorrect group name + FIXED: krarc doesn't keep the date/time information at extracting to + local fs + FIXED: jar files aren't handled + problems with dirs in windows zips + FIXED: problem with the windows created rar permissions + FIXED: performance increasing: faster sorting, directory leaving + FIXED: compare content error at remote urls (problem with sleep 2) + FIXED: totals bar didn't update when an incremental refresh happened + FIXED: locate doesn't report the errors occured during the search + FIXED: the viewer size is forgotten in maximized mode (KDE hack) + FIXED: internationalization bugs, illegal usage of QString::latin1() + FIXED: krarc, ignores the packer dependencies + FIXED: krarc, rar: mkdir does not work, illegal time and permission info + FIXED: krarc, problem with copying / moving inside the archive + FIXED: krarc, problem with international characters in put/mkdir + FIXED: krarc, problems at copying subdirectories from the archive + FIXED: [ 1005533 ] stepping onto a subfs device crashes krusader + FIXED: [ 988835 ] window size of synchronize dirs is not stored + FIXED: [ 946567 ] krusader minimizes to tray on desktop change + FIXED: mountman changes... read the email ;-) + + REMOVED: Dupe Japanese translation (ja.po is used nowadays) + + UPDATED: Bosnian translation (thanks Asim Husanovic) + UPDATED: Chinese Simplified translation (thanks Jinghua Luo) + UPDATED: Hungarian translation (thanks Kukk Zolt�) + UPDATED: German translation + + +1.40 +====================== + ADDED: when searching in files (grep), push the string we're searching for + into the clipboard when pressing F3 or F4. this saves an extra copy + when searching inside the file + ADDED: Catalan translation + + DISABLED: usermenu for 1.40 + + FIXED: [ 962340 ] Alt-T broken to call Tools menu + FIXED: [ 980252 ] Compare by Content: right/left position swapped + FIXED: [ 990141 ] F3/F4 in root mode trouble with permissions + FIXED: [ 959916 ] Krusader window too large on startup + FIXED: username and group information are wrong for ftp_vfs + FIXED: UMR (uninitialized memory read) in vfs::fromPathOrURL + + UPDATED: Polish translation + + +1.40-beta2 +====================== + ADDED: Chinese Simplified translation + + FIXED: the new ftp dialog URLs are saved into a stochastic configuration + group + FIXED: [ 960003 ] Swapped letters in quick-search + FIXED: KIO::Slave url redirection handling + (e.g. now devices:/ and settings:/ works !) + FIXED: [ 962598 ] viewer didn't display XML files + FIXED: [ 960595 ] problem with paths containing more '@' characters + (FTP proxy hack) + FIXED: [ 957145 ] krusader closes editor without asking + FIXED: ports cannot be added for fish, sftp in the new connection GUI + FIXED: [ 943962 ] the summary status is not updated after calc space + FIXED: [ 950762 ] missing pemission check on entering a folder + FIXED: setting "xterm -e vim" as editor didn't work... + FIXED: [ 953874 ] allowing editors which are not url-aware to be used as + default editor + FIXED: [ 948315 ] security hole, krusader changes its temp directory's + rights to 0777 + FIXED: the UI settings are not saved at exit + FIXED: [ 951274 ] shift+home and shift+end does not work + FIXED: [ 948726 ] problem with ctrl+left from the left panel and ctrl+right + from the right panel + FIXED: extension is separated from the dirname after renaming directories + containing '.' + FIXED: locate does not call kdesu any more + FIXED: [ 950052 ] synchronizer: the left and right side depends of the + active panel + FIXED: [ 770676 ] krarc does not handle password zips + FIXED: [ 928746 ] symlinks pointing to directories using fish protocol fail + FIXED: [ 939214 ] synchronizer, wrong behaviour of compare by content + FIXED: moving into archives is dangerous. it is disabled (for now at least) + FIXED: synchronizer gui size policy bugs + FIXED: [ 934498 ] problem at dropping files into the '..' directory + FIXED: [ 939612 ] F9 moves file, if new name already exists as directory + FIXED: krusader does not handle filenames containing '#' character + FIXED: krusader exits at viewing dvi files (missing arguments from KPart). + FIXED: drag line remains visible after dropping an URL + FIXED: panel swapping corrupts ctrl+arrow and alt+arrow + FIXED: error at dropping URLs containing non-english characters from + konqueror + FIXED: KDE 3.2, right justified tabs bug + FIXED: dragging over a new tab changes active tab + FIXED: crash at pressing space on the '..' directory + + UPDATED: Bulgarian translation + UPDATED: Czech translation + UPDATED: Danish translation + UPDATED: Dutch translation + UPDATED: French translation + UPDATED: German translation + UPDATED: Hungarian translation + UPDATED: Italian translation + UPDATED: Slovak translation + + +1.40-beta1 +====================== + ADDED: configuring the colors of the panel + ADDED: (a bug fix really) ability to "not test archives before unpacking" + ADDED: new icons (thanks to adios for providing them) + ADDED: quickmode for mountman. press and HOLD the mountman icon for new + functionality + ADDED: Bulgarian translation (thanks to Milen Ivanov) + ADDED: krusader restart is not necessary from now after changing the + configuration + ADDED: ability to give arguments for the terminal + ADDED: enable/disable icons in the filenames + ADDED: ability to configure the fields of the panel (Ext, Size, Perm, ...) + ADDED: single click selects / executes + ADDED: panel level toolbar ('..', '/', '~', '=' buttons), thanks to David + Harel + ADDED: Locate (integrating the findutils-locate package of GNU into + Krusader). TEST IT + ADDED: Heiner's patch for 'logical selection mode' is applied and used as + default. TEST IT + ADDED: application dependency setting in konfigurator + ADDED: Csaba's new konfigurator is here, boys and girls! + ADDED: heiner's quicksearch patch + ADDED: calculate occupied space prints the directory's size (wincmd-style) + - thanks heiner! + ADDED: current directory in history menu is checked + ADDED: a working user menu (try alt+~), but a bit rough on the edges + ADDED: KrSearch edit/view file in the result list window (F3, F4, right + click) + ADDED: a folder-history button, a-la-total commander. thanks to Hans + Loffler! + ADDED: selectall at rename + ADDED: new shortcuts to search dialog (heiner) + ADDED: directory synchronizer + ADDED: file splitter + ADDED: a missing credit for Frank in the about box + + FIXED: krusader exits at closing the viewer when minimized to tray + FIXED: KDE 3.2 terminal exit at Ctrl+C + FIXED: bug [ 906386 ] regarding refreshes of dirwatch with fam enabled + FIXED: bug [ 906538 ] which now makes a faster unpacking process + FIXED: bug [ 894771 ] regarding over-expanding window due to long command + line + FIXED: edit new file on KDE 3.2 + FIXED: permission handling for FTP URL-s + FIXED: calc space crash at vfs refresh (thanks to Heiner) + FIXED: krarc created non-executable directories (0666) + FIXED: reimplementing the 'allow move into archive' setting + FIXED: no restart at changing the icon tray's state in konfigurator + FIXED: krusader freezes if the `df` process does not terminate (at network + errors, IO wait) + FIXED: krusaderui.rc bug, new menuitems does not appear after a krusader + update + FIXED: sort by EXT did not obey the 'case sensative sort' flag + FIXED: 2 items on the view menu had the same shortcuts + FIXED: increased speed of search, by emitting lesssignals (thanks to Lars) + FIXED: statusbar updated only on mouse clicks, not on keyboard + FIXED: translation: forcing non-english languages with a strange structure + FIXED: freeze at modal dialogs and icon tray + FIXED: crash at rename if the directory is refreshed by the watcher + FIXED: stepping to the file below after delete (heiner) + FIXED: window size and position saving at maximized mode + FIXED: more freedom to give FTP proxy URL-s in "New FTP Connection" menu + FIXED: crash at ftp://user@server@proxy:port FTP URL-s + FIXED: no parent directory at tar://... and zip://... URL-s + FIXED: font size problems in KCmdLine and KrMaskChoice + FIXED: internal editor quits without notification even if the edited file + was not saved + FIXED: no i18n for Name, Ext, Size, Modified + FIXED: obsolete QT header files + FIXED: crash at closing the progressbar window at packing + FIXED: no or uninformative error message at packing to a readonly directory + FIXED: crash at middle clicking on the last tab + FIXED: KrSearch permissions panel placing bug + FIXED: ftp port limit changed from 999 to 65535 + + REMOVED: arc_vfs support completly replaced with KIO:Slave technolegy. + + UPDATED: new package description - Thanks to Jonas B�r + UPDATED: Krusader Handbook (read ./doc/ChangeLog for more info) + UPDATED: Japanese translation + UPDATED: Dutch translation + UPDATED: Czech translation (thanks to Martin Sixta) + UPDATED: Spanish translation + UPDATED: Krename url http://www.krename.net + + +1.30 +====================== + ADDED: middle mouse button: click on a folder, and create a new tab. + ADDED: middle mouse button: click on a tab, and close it + + FIXED: krarc QByteArray buffer freeing bug + FIXED: mountman watches 'mount' instead of the directories + FIXED: keyboard-shortcuts issues for new-tab(alt+ctrl+n), + close-tab(alt+ctrl+c) and duplicate-tab(alt+ctrl+shift+n) + FIXED: mountman FreeBSD bug (/etc/mtab does not exist in FreeBSD) + FIXED: All files / Custom files. Executable was removed. + FIXED: when selecting something from the combobox in "mark files" dialog, + combo doesn't close immediatly + FIXED: mark files dialog added the same selection more than once + FIXED: disabled panel-types in konfigurator + FIXED: font size problems with the Select dialog, and New Net Connection + FIXED: mountman detects those devices as supermount, which are mounted and + missing from fstab + FIXED: mountman inserts '/dev/' before NFS shares and mounted devices which + are missing from fstab + FIXED: mountman does not watch readonly directories (mount can change its + permissions!) + FIXED: mountman does not stop dirwatch after close + memory leak + FIXED: compare fix at directories with escape characters + FIXED: Sorry - Archive test passed + FIXED: FTP proxy bug (more than one @ characters in the URL) + + REMOVED: SortByExtention menu item (which did nothing) + REMOVED: KrSearch-Help + Pack-Move into archive (did nothing) + + UPDATED: Dutch translation + UPDATED: Danish translation + UPDATED: Hungarian translation + UPDATED: Italian translation + UPDATED: Slovak translation + + +1.29-beta +====================== + ADDED: KrSearch Match whole word only feature + ADDED: Tab-browsing shortens tabs when more tabs are created + ADDED: Starting Krusader with root privileges by pressing Alt+K + ADDED: Open-in-a-new-tab available in right-click menu + ADDED: Creating new files with SHIFT+F4 + ADDED: Russian translation (thanks to Dmitry Chernyak) + ADDED: Ctrl+Enter and Ctrl+Shift+Enter keyboard shortcuts + ADDED: default shortcut for refreshing the panel is Ctrl+R + ADDED: ctrl-left/right arrow checks if we're on a folder, if so it refreshes + the other panel with the contents of the folder, otherwise to the + same path as current one (Wincmd style) + ADDED: tabbed-browsing beta + ADDED: SHIFT-F3 view dialog. + ADDED: The internal viewer follow links on HTML pages. + ADDED: panel swapping by Ctrl+U + ADDED: command line improvments: ctrl+/ opens history list, up&down keys + work again, and general usability + ADDED: krusader can now be started from commandline with new options: + try: krusader --left=/mnt/cdrom --right=ftp://downloads@myserver.net! + ADDED: new command line widget. should fix some issues and requests + ADDED: Missing WhatsThis information (thanks to Mikolaj!) + ADDED: a new shortcut for 'show hidden files' - ctrl+. (ctrl plus dot) + ADDED: rar support to krArc KIO slave. + ADDED: open with in the right click menu for multiple files with the same + mimetype. + ADDED: Patch by Heiner which adds a cancel button to + the calculate space action. + FIXED: KrSearch does not find texts at the last row + FIXED: Strange KrSearch GUI (SearchIn and DontSearchIn adding) + FIXED: KrSearch crash at pressing Escape or Closing the window during search + FIXED: cmdline would start-up focused on the wrong panel + FIXED: when pressing ctrl-enter (or ctrl-shift-enter), focus goes to command + line + FIXED: Terminal Emulator bug at ` and Backspace keys + FIXED: internal editor / viewer crash at invalid symlinks + FIXED: run-in-terminal would cause the terminal to close prematuraly and + results would be lost. + FIXED: free disk capacity miscalculation for Ext2 and Ext3 file systems. + FIXED: crash when editing a file with # in the filename + FIXED: inplace renaming bug with extention when pressing ctrl+click + FIXED: whenever the folder gets refreshed, the current file would be lost + FIXED: problematic behavior when trying to SPACE a folder without + permissions + FIXED: Ctrl-A didn't work properly + FIXED: crash when unmounting a busy mountpoint + FIXED: date-time sorting bug + FIXED: changed pop-up delay of the history button on the command line to + zero + FIXED: right-click menu via keyboard appeared in the wrong place + FIXED: crash when using spacebar on the ".." (thanks to heiner) + FIXED: automark directories didn't work (thanks to Anarky) + FIXED: bug when using space to calculate space of directory + FIXED: crash when viewing files with # in their name. + FIXED: compilation problem with GCC >= 3.3 (thanks to Adios) + FIXED: Force refresh when creating a new directory. + FIXED: a crash when trying to repaint when the VFS was deleted. + + REMOVED: Device Manager action + + UPDATED: many usability issues (thanks to Mikolaj) + UPDATED: German translation + UPDATED: Hungarian translation + UPDATED: Dutch translation + UPDATED: Spanish translation + + +1.25-beta1 +====================== + ADDED: Finally, the new bookmark system is here! courtasy of Jan Halasa + ADDED: new Hungarian translation, thanks to Kukk Zolt� + + FIXED: mountMan bug - didn't allow to umount/mount filesystem with + trailing / + FIXED: width of modified column for i18n (thanks to heiner) + FIXED: dirUp() bug - selection goes to top. + FIXED: the @ in ftp passwords bug. + + UPDATED: Slovak translation + UPDATED: Dutch translation + + +1.21-beta1 +====================== + ADDED: Opening left/right bookmarks (alt+left/right arrow) is now an action, + and can be remapped. + ADDED: In-place renaming (thanks to Heiner Eichmann) + ADDED: New KIO slaves to handle archives. + ADDED: multi-file properties. + ADDED: Krusader now obeys KDE's date time format + ADDED: Total-Commander style directory selection. Press SPACE to check it + out! Thanks goes (again) to Heiner Eichmann! + + FIXED: column sizes are saved when doing 'save postion', or if + 'save settings' is set in konfigurator. + FIXED: double-catching of the ~ (tilda) key + FIXED: double-catching of the backspace key + FIXED: closing krusader using Alt-F4 or clicking X didn't save settings + FIXED: Wrong focus after renaming + FIXED: Error using KRename with filenames containing spaces (thanks to + Tobias Vogele) + FIXED: FreeBSD compatability in KrARC (thanks to Heiner Eichmann) + FIXED: a crash in the dirUp() function. + FIXED: when opening bookmarks using keyboard, active panel didn't change + properly + FIXED: in search dialog - you can now simply click text, and press ENTER. + no need to click Search + FIXED: a lot of usability issues (thanks to Mikolaj Machowski) + FIXED: double-click in search dialog bug (thanks to heiner eichmann for the + patch) + FIXED: i18n issues - thanks to Frank Schoolmeesters + FIXED: Panel flicker patch (thanks to Gabor Takacs for the patch) + FIXED: Krusader failed to report permission errors while deleting files + FIXED: issue with Japanesse translation + FIXED: ctrl+arrows is caught by panel and not the view + FIXED: removed unsafe debug messages + FIXED: proper properties and owner/group for non-local files + + UPDATED: Dutch translation + UPDATED: German translation + + BUG: krArc slow when unpacking large files + + +1.20 - KDE 3 +====================== + ADDED: Clicking on the status or totals bars (above and below file list) + changes focus + ADDED: Each panel remembers the way it was sorted (might be different for + each) + ADDED: Each panel remembers the column width (might be different for each) + ADDED: Dutch translation, thanks to Frank Schoolmeesters + + FIXED: Crash when saying NO to "really exit krusader?" + + UPDATED: German translation + UPDATED: Polish translation + + +1.20 +====================== + ADDED: Japanese translation, thanks to UTUMI Hirosi + ADDED: error window when attempting to drag-n-drop to a target without + enough permissions + + FIXED: crash when viewing/editing a file without permissions to read + FIXED: icon touchup - to make the thing look more consistent + FIXED: removed the ftp disconnect and root actions from the toolbar + FIXED: updated polish translation + FIXED: date sorting with files older than the year 2000 + FIXED: crash on remote connections if there is a @ in the password + FIXED: the remote connections rename function + FIXED: blank hex viewer with short text files + FIXED: anonymous checkbox in remote-man not respected + + +1.12 beta2 +====================== + ADDED: Introducing extention column + ADDED: Italian translation (thanks to Giuseppe Bordoni) + ADDED: Preview to the right-click menu. + + FIXED: minimize to tray didn't behave correctly + FIXED: crash when mounting failed (no cdrom in drive) + FIXED: icon too big when minimized to tray + FIXED: origin bar now accepts local urls (file:/) gracefully + FIXED: origin bug, which caused the focus to go to the panel too soon. + FIXED: right click menu in mountman (thanx to Heiner). + FIXED: new 'admin' folder (support automake 1.7). + FIXED: ESC key close the viewer. + FIXED: crash when trying to open non-existing directory. + FIXED: directory sorting. + + TODO: automark directories won't work in 1.12!!! + TODO: can we add a krProgress to normal-vfs refreshes ? + TODO: dragn'drop quirky. + TODO: add progressbar to totals (?) + TODO: COMPAREMODE + + +1.12 beta1 +====================== + ADDED: some GUI touch-ups: make buttons smaller, and bars leaner. all in + all, the thing should look better. + ADDED: FreeBSD compatability issues - patchs by Heiner, thanks man! + ADDED: move to next-gen view (at last) + + FIXED: popup-menu poping out of place. + FIXED: Panel & PanelFunc permission clean up. + FIXED: krBack() clean up. + FIXED: moved all the logic from ListPanel to ListPanelFunc + FIXED: integrated the openUrl() API. + FIXED: minor bug in mountman + FIXED: bug in arc_vfs, concerning full-paths in tars (thanks Heiner) + FIXED: right align size column + + REMOVED: Tree & Quickview panels. + + +1.11 KDE 3 +====================== + ADDED: updated Swedish translation, thanks to Anders Linden. + ADDED: new Spanish translation, thanks to Rafa Munoz. + ADDED: new Polish translation, thanks to Lukasz Janyst. + + FIXED: Changed the internal viewer default from Hex to Text. + FIXED: Crash when Krusader is called with open viewer/internal editor. + FIXED: Keyboard shortcuts not saved in Konfigurator. + + +1.10 - KDE 3 +====================== + ADDED: new and improved viewer. + ADDED: Krename support ! (more info at: http://krename.sf.net ) + ADDED: you can now use the command line to "cd" into konqi-supported urls. + ( try: cd audiocd:/?dev=/dev/cdrom ) + ADDED: you can try to execute files in remote filesystem. + ADDED: new command detection function instead of using 'which' + + FIXED: rewritten the panel sorting function, it should be better and faster + now. + FIXED: back to KRDirWatch, since KDirWatch crashed us on systems with FAM + enabled. + FIXED: removed the "panel start path is invalid" error message. if the + start path is invalid try to find the closest path (the previous + solution was '/'); + FIXED: don't watch read-only/not-readable directories - this should improve + performance and avoid a loooong wait time on super-mounted cdroms. + FIXED: multiple selctions modes are no-more. default mode is Konqueror. + the multi-mode become unstable after the kde3 porting and we had to + disable it. + FIXED: memory leak when starting konfigurator. + + +1.0.2 - KDE 3 +====================== + ADDED: new icon. + ADDED: sftp & scp support. + ADDED: multi-protocol and history to the new connection dialog. + + FIXED: normal_vfs now uses the KDE dir watch, in other words: better + directory refresh. + FIXED: new 'admin' folder. + + +1.0.1 - KDE 3 +====================== + ADDED: Krusader now compiles on KDE 3 (tested with RC3). + ADDED: New ftp/smb vfs due to KDE 3 API changes. + + +1.0.1 +====================== + ADDED: When compare-mode is active, pressing the 'Select Files' icon (or the + equivelent keyboard short-cut), will open the usual dialog with 4 new + options in the predefined selections. This allows automatic selection + of files according to their compare-mode status - newer, older, etc. + ADDED: Terminal emulator now "follows mouse" - konqueror style. + ADDED: French translation. + ADDED: A new icon for Krusader. new we've got krusader.png and + krusader2.png! + + FIXED: errors compiling on kde 2.1 - convertSizeFromKB + FIXED: compatability issue with installing to debian + FIXED: compatability issue with Solaris + FIXED: keyboard settings are not saved. + FIXED: a small bug causing 'rrr' to show instead of 'rwx'. + +1/1/02 - 1.00 +===================== diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..6e61d97 --- /dev/null +++ b/FAQ @@ -0,0 +1,813 @@ +-------------------------------------------- +- Documentation version: 1.90.0 +- Documentation date: 2008-03-06 +- Parsing date: Thu Mar 6 22:31:20 UTC 2008 +-------------------------------------------- + + +This file contains the Krusader FAQ +This file is parsed from Docbook/XML source files +with the 'make_doc' script (krusader-handbook-1.80.0.source.tar.gz ). + + +Note: +----- +after the parsing process to generate this TXT file all te URL's are gone, +to see the URL's again please take a look at the HTML version of this file. + + +Feedback: +--------- +Feedback for the documentation is always welcome. + +Frank Schoolmeesters, documentation coordinator +[frank_schoolmeesters {*} yahoo {.} com] + +Latest version: +--------------- +The latest version of this document is available online at: +http://krusader.sourceforge.net/handbook/faq.html + +Latest version of the Krusader documentation should always be available: +- online reading (Krusader-CVS): + http://krusader.sourceforge.net/handbook/index.html +- most recent documentation tarball + http://sourceforge.net/project/showfiles.php?group_id=6488&package_id=125990 +- when downloading and installing the most recent Krusader from the + CVS repository (the doc's will be available via the Help menu) + http://krusader.sourceforge.net/cvs.php + http://krusader.sourceforge.net/handbook/installation.html + + + as always, enjoy + Krusader Krew. + + http://krusader.sourceforge.net + + +db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. +88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D +88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' +88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b +88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. +YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + +------------------------------------------------------------------------ + + +IMPORTANT: Crashes in Krusader caused by Qt 3.3.5 +************************************************* +We've been getting a lot of emails and bug reports regarding random +crashes in Krusader, especially during some file operations (copy/move +etc.). These crashes are related to Qt 3.3.5 and NOT Krusader. It seems +that Qt 3.3.5 introduced a serious bug which is now causing random +crashes in many KDE applications including Konqueror. You can google for +it to find out more. + +As far as we know, debian and suse already posted new Qt binaries that +fix the problem, and gentoo has masked Qt 3.3.5 completely. As for now, +you either need Qt 3.3.4 or a fixed Qt 3.3.5, depending on your +distribution. For more information is available on our website at +http://krusader.sourceforge.net/phpBB/viewtopic.php?t=1407 + + +------------------------------------------------------------------------ + + +Chapter 13. Frequently Asked Questions (FAQ) +Table of Contents + Installation_FAQ + Usage_FAQ + General_FAQ +If you have problems with Krusader please check the Installation_procedure, as +your problem may be caused by a bad installation. +The FAQ is divided into three sections: + * Installation_FAQ (this page) + * Usage_FAQ (issues with running/using Krusader) + * General_FAQ (bug reports, forum, mailing list, ...) +If you feel that a FAQ is missing or if something is not clear to you, please +let_us_know. +Installation FAQ + 1. Does_Krusader_need_KDE_to_run? + 2. Which_libraries_does_Krusader_need_to_run? + 3. I_have_followed_all_the_steps_but_configurecomplains_about_missing_libs_or + headers._What_do_I_need_to_do? + 4. How_do_I_compile_Krusader_when_I'm_using_a_64_bit_processor_? + 5. I_have_downloaded_the_Source_RPM_krusader-x.xx.dist.src.rpm,_what_to_do + now? + 6. I'm_trying_to_install_binary_foo_(RPM_or_DEB_package),_but_it_fails. + What's_wrong? + 7. I_can't_find_an_RPM_or_DEB_package_for_Krusader,_what_to_do? + 8. I've_installed_Krusader,_but_when_I_start,_only_the_"Help"_menu_appears. + Why? + 9. Some_new_menu_items_are_missing_after_updating_Krusader,_what's_wrong? + 10. When_I_run_make,_it_complains_about_libfam.la,_what's_wrong? + 11. Debian_complains_about_Qt_when_running_./configure,_what's_wrong? + 12. I_have_a_libGLcore.so.1_compile_error_after_using_the_NVIDIA_installer, + what_to_do? + 13. Why_Krusader-1.60.x_does_not_compile_with_gcc4? + 14. I_am_having_trouble_compiling_and_installing_Krusader,_how_do_I_send_a + help_request? + 15. How_can_I_build_an_RPM_package_for_Krusader? + 16. Why_does_Krusader-cvs_show_an_old_version_number_in_the_about_box? +1. Does Krusader need KDE to run? + No, Krusader does not need the KDE window manager to run on your computer + but Krusader's natural environment is KDE, because it relies on services + provided by the KDE base libraries. Only some shared libraries are needed + e.g. KDE libraries, Qt™ libraries, etc. This means that Krusader runs + on GNOME, AfterStep, XFce and other window managers provided the approriate + libraries are installed on your computer. All this is not a problem since + the apt-get world can resolve these dependencies instantly. + You do not need to switch to the KDE window manager to use Krusader; you + can still use GNOME, AfterStep, XFce or another window manager. However, + the configuration of the Krusader fonts and some behavior is done by + running kcontrol. + A lot depends on what you want to do with Krusader. You should know that + Krusader uses the KDE KIOSlaves to access remote file systems, and support + for only a limited number of file system types are shipped with KDElibs, + most of the KIOSlaves are bundled with KDEbase (including fish, sftp and + tar). However, if you want the property-dialog to show EXIF-data for + .jpeg's, you need KDEgraphics. If you want ID3-infos, you need + KDEmultimedia, and so on. + To summarize, if you want a working Krusader - install KDElibs. If you want + a functional Krusader then you need KDElibs + KDEbase. For maximum + functionality, Krusader needs all of the KDE package libraries, but the KDE + window manager is optional. +2. Which libraries does Krusader need to run? + For running Krusader (e.g. when you have installed Krusader with a binary + RPM) you need less libraries than if you compile Krusader from source. e.g. + you only need the C-compliler gcc when you compile Krusader from source + (see the next question). + Here is a list of the required shared libraries when you run Krusader: + * kdelibs (for the required KDE version see the Installation_procedure) + * libacl1 libart-2.0 libattr1 libaudio2 libc6 libfam0 libfontconfig1 + * libfreetype6 libgcc1 libgcc2 libice6 libidn11 libjpeg62 libkjsembed1 + * libkonq4 libpcre3 libpng12 libqt3-mt libsm6 libstdc++6 libunwind7 + libx11-6 + * libxcursor1 libxext6 libxft2 libxi6 libxinerama1 libxrandr2 + libxrender1 libxt6 zlib1g + If you need more info please take a look at the requirements_on_Debian� . +3. I have followed all the steps but configurecomplains about missing libs or + headers. What do I need to do? + Install the missing packages. + Here is a list of the required packages to compile Krusader from source: + * gcc-cpp gcc-c++ glibc libgcc1 (other compilers may work but haven't + been tested) + * autoconf automake XFree + * libqt3 libqt-devel + * kdelibs kdelibs-devel + * libjpeg62 libjpeg-devel libpng3 libmng1 + * fam libfam-devel + * zlib1 arts libart_lgpl2 libstdc++5 libpcre0 + * libkjsembed, if you use the JavaScript_console, often found in a + package called KDEbindings(-devel) and libkonq-dev for the Konqueror + right-click menu entries. + Most RPM-based distributions separate the headers from the libs. The + headers are needed to compile Krusader. Look for packages in the form foo- + devel-*.rpm (e.g. kdelibs-devel-foo.i586.rpm) or foo-dev-*.deb for Debian� + based distributions. These are usually included with your distribution. + **** Tip **** + If you ca not find the needed package, use rpmfind and click 'missing lib + or header' in the search line. Or use apt-cache search foo to find the + corresponding package for Debian� based distributions. +4. How do I compile Krusader when I'm using a 64 bit processor ? + As far as we know, there are no issues. Krusader is also available on many + other_architectures. +5. I have downloaded the Source RPM krusader-x.xx.dist.src.rpm, what to do + now? + 1. Check the ownership and the permissions on /usr/src/RPM/ and all + recursive directories that your normal user can read-write-execute in + these directories. + 2. To produce the binary RPM for your computer, do this: + $ rpm --rebuild krusader-x.xx.dist.src.rpm + 3. If all dependencies are OK, a binary RPM krusader-x.xx.dist.rpm will + be created at /usr/src/RPM/RPMS/i586 (replace i586 with your + architecture). + 4. Test the binary RPM for errors before installing: + $ rpm -i --test krusader-x.xx.dist.rpm + If the prompt returns without any message, then everything is OK. + 5. Install the binary RPM as usual, for example: + $ su -c 'rpm -Uvh krusader-x.xx.dist.rpm' + You will be asked to enter your root password. + 6. Now you can start Krusader. + **** Tip **** + For more information about RPM, visit rpm.org and read the RPM_Guide by + Eric Foster-Johnson. +6. I'm trying to install binary foo (RPM or DEB package), but it fails. What's + wrong? + Since we only prepare (and use) the source, we have no way of knowing this. + Did you test the binary RPM before installing? + $ rpm -i --test krusader-x.xx.dist.rpm + If the prompt returns without any message, then everything is OK. RPM's + downloaded from our website are usually provided by Krusader users. Visit + your distro website and search for an updated RPM. + If the RPM is not OK, try to find another package at Linux� software + archives such as freshmeat.net or KDE-APPS.org. If you still can't find the + appropriate package for your Linux� distribution, we recommend searching + for it with rpmfind or rpmpbone. + In general, a package for an older version of your distrubution or even for + another distribution might work on your computer (e.g. FC RPM's often work + on Mdk and RH, and vice versa), but it is always the best that you install + only RPM's that exactly match your distribution. If you can't find a + package that matches your distribution version, architecture or + distribution, then use a source RPM. When you use a source RPM, the + Krusader sources will be built, on your computer, guaranteeing a suitable + binary RPM for your specific distribution and architecture. In addition, + this method results in maximum system speed, since the resulting binary is + customized for your computer. Please read the previous question, it + explains how to install a source RPM. The best solution is explained in the + next question. +7. I can't find an RPM or DEB package for Krusader, what to do? + Check if your distribution provides Krusader, if it doesn't then contact + your distribution creator and ask them to include Krusader! + Did you take a look at the URL's on the Installation_procedure page? If you + have and found nothing, you can always compile Krusader from source. Even + if you feel you haven't got the necessary skills, you will probably succeed + in compiling Krusader: we provide a very detailed installation procedure. + This HowTo enables newcomers to compile Krusader from source, even if they + have never done a compilation from source before, just follow the + instructions carefully. Feel free to post a help_request if you encounter + problems. +8. I've installed Krusader, but when I start, only the "Help" menu appears. + Why? + In this case only the Help menu is visible and all other menu items like + e.g. File and Select are missing. This is because some distributions put + the krusaderui.rc file in the wrong directory. To solve the problem, just + copy the krusaderui.rc file from the package krusader_kde3/krusader/ + krusaderui.rc to $KDEDIR/share/apps/krusader/krusaderui.rc and ~/.kde/ + share/apps/krusader/krusaderui.rc and re-run Krusader. If you have compiled + Krusader from sources this is often caused if the KDEDIR_-_QTDIR + environment variables are not correctly set. The result is that the + krusaderui.rc file is installed in the wrong directory. Please read the + following question, as well. +9. Some new menu items are missing after updating Krusader, what's wrong? + The krusaderui.rc file is stored in $KDEDIR/share/apps/krusader/ + krusaderui.rc. When you change the "Toolbar", KDE makes a copy of that file + in the home directory at ~/.kde/share/apps/krusader/krusaderui.rc. If + Krusader was previously installed on your computer, and you install a newer + Krusader version the ~/.kde/share/apps/krusader/krusaderui.rc file must be + replaced with the newer version. Note: this will also reset all your + changes on toolbars and shortcuts! + The first line of krusaderui.rc contains the version number. After + installing a newer Krusader version, KDE will automatically replace the old + ~/.kde/share/apps/krusader/krusaderui.rc with the newer version when + starting the new Krusader for the first time (KDE will detect the newer + version number in the first line). + If you install a CVS or beta version and Krusader was already installed on + your computer then you should delete the krusaderui.rc file from your home + directory to activate the new menu entries $ rm ~/.kde/share/apps/krusader/ + krusaderui.rc + If the ~/.kde/share/apps/krusader/krusaderui.rc file is older, then the new + menu elements will not be shown. Read the previous question for information + on how to update the krusaderui.rc file. If krusaderui.rc is missing or in + a wrong directory, only the "Help" menu appears, please read the previous + question. +10. When I run make, it complains about libfam.la, what's wrong? + The ./configure script does not check for the presence of libfam.la, and + make needs libfam.la to compile Krusader. If you know how this can be + solved, please let us know. Install libfam0-devel-foo.rpm. Note: when you + install Mandrake™-Linux� 9.2 with the default settings, this package + is not installed. If you need more information take a look at FAQ_missing + libs_or_headers. +11. Debian� complains about Qt™ when running ./configure, what's wrong? + This problem occurs when you use gcc 2.95, you need to install gcc 3.2 (or + higher). You also need to set the enviroment variables "CC, CPP and CXX" + before running the ./configure script. + $ export CC=/usr/bin/gcc-3.2 + $ export CXX=/usr/bin/g++-3.2 + $ export CPP=/usr/bin/cpp-3.2 + For more information please take a look in_our_forum and at the + instructions on how to build a Qt™/KDE3 application on Debian�. +12. I have a libGLcore.so.1 compile error after using the NVIDIA� installer, + what to do? + This problem occurs when you use the NVIDIA� installer and not the official + NVIDIA� packages of your distribution. Krusader is based on Qt™ which + can be linked against the X OpenGL libraries. As a result Krusader may look + for OpenGL as well. The problem is that the NVIDIA� installer (prior to + version 7xxx) doesn't perform it's task properly: it replaces the OpenGL + header files (which get included into Krusader) but doesn't set the libGL + links correctly. The best solution is to use the NVIDIA� packages provided + by your distributor or a new NVIDIA� installer, the current version at the + moment of writing is 7114. If, for some reason, you must use an old NVIDIA� + driver, one solution is the following hack, the exact commands depend on + the distribution used and the version of the NVIDIA� driver (6111 in this + example), but it should read something like this: + $ ln -s libGLcore.so.1.0.6111 libGLcore.so.0 + $ ln -s libGLcore.so.1.0.6111 libGLcore.so + $ ln -s libGLcore.so.1.0.6111 libGLcore.so.1.0.0 + $ ln -s libGLcore.so.1.0.6111 libGLcore.so.0.0.0 + $ ln -s libGLcore.so.1.0.6111 libGL.so + $ ln -s libGLcore.so.1.0.6111 libGL.so.0 + $ ln -s libGLcore.so.1.0.6111 libGL.so.0.0.0 + $ ln -s libGLcore.so.1.0.6111 libGL.so.1 + $ ln -s libGLcore.so.1.0.6111 libGL.so.1.0.0 + $ ln -s /usr/lib/libGLU.la /usr/X11R6/lib/libGLU.la +13. Why Krusader-1.60.x does not compile with gcc4? + Because Krusader-1.60.x was not gcc4 compatible, it first needs some + patches: + * add 'class ListPanelFunc;' in krusader/Panel/listpanel.h + * add 'class KMountManGUI;' in krusader/MountMan/kmountman.h + * add 'class KrDetailedViewItem;' in krusader/Panel/krdetailedview.h + More information can be found in our forum. +14. I am having trouble compiling and installing Krusader, how do I send a help + request? + Please read our detailed installation_procedure and the FAQ. If you can't + find a solution to your problem then feel free to post a help request at + our Krusader forum or use the Krusader-users mailing list. But before + posting a help request, please try the following: + 1. Use the Search function on the Krusader_Forum, your problem might be + solved or discussed already. + 2. If you can't find a solution, please make a note of the following + issues: + * the Krusader version used + * the Linux� distribution + version used + * a good description of the problem + Without this information, it is very difficult for us to help you. + **** Note **** + If you give us the error messages (e.g. make error messages) please + start with the FIRST error message, all the error messages which + follow the first error message are consequences and not the cause of + your problem. + 3. Send out your help request. + Thank you for your co-operation! +15. How can I build an RPM package for Krusader? + If you have experience with compiling from source, you will probably be + able to build a Krusader RPM too. Information about RPM can be found at + rpm.org and in the RPM_Guide by Eric Foster-Johnson. The following is the + short procedure howto on building an RPM. + **** Warning **** + NEVER build RPMs when logged in as root. Mistakes in building packages + (e.g. a bad krusader.spec file) can do serious damage to your system when + logged in as root. + 1. Compile Krusader from source to check that the compilation works + fine. + 2. Check the ownership and the permissions on /usr/src/RPM/ and all + recursive directories that your normal user can read-write-execute in + these directories. + 3. Copy kusader-1.xx.tar.gz to /usr/scr/RPM/SOURCE + 4. Copy kusader.spec to /usr/scr/RPM/SPECS Tip: the latest kusader.spec + can be found in CVS. + 5. Edit kusader.spec and add your name, your e-mail address, the rpm + name, ... Other changes may be needed if rpmbuild fails. + 6. Build the binary and the source RPM with: + $ rpmbuild -ba /usr/scr/RPM/SPECS/krusader.spec + If everything went OK you will have a binary RPM in /usr/src/RPM/ + RPMS/i586 (depending on your architecture) and a source RPM in /usr/ + src/RPM/SRPMS/ e.g. krusader-1.70-beta1.suse10.i586.rpm and krusader- + 1.70-beta1.suse10.src.rpm + 7. If the build is not OK you will receive an error message during the + rpmbuild process, try to fix it and run rpmbuild again. + 8. And finally: test the RPM before sending it in. +16. Why does Krusader-cvs show an old version number in the about box? + Because we only change the version number just before we do a new release. + Krusader-cvs will show an older version number, so ignore the version + number and check the download date. We simply haven't yet decided what the + next version number will be. +Usage FAQ + 1. Krusader_keeps_crashing,_why? + 2. When_I_try_to_mount/unmount_my_cdrom/floppy,_Krusader_reports_something + about_a_supermount,_what's_this_about? + 3. Why_does_Krusader_freeze_or_hang_on_a_dead_mountpoint? + 4. When_I_try_to_resize_Krusader_to_make_it_smaller,_I_discover_that_I_can't + resize_it_below_a_certain_size._Why? + 5. When_I_perform_some_file_operations,_Krusader's_panel_doesn't_refresh_/ + I'm_using_Krusader_with_fam_installed,_but_updates_to_the_panel_are_not + shown._Why? + 6. Samba_ISO_8859-x_codepage_/_What_to_do_if_Krusader_does_not_read_shared + directories_containing_special_international_characters? + 7. Krusader_reports_"krarc:..._protocol_not_supported"_error_at_opening_an + archive_file,_what_to_do? + 8. I_get_the_error_message_"Protocol_not_supported_by_Krusader:_"krarc:/path/ + to/foo-archive",_when_I_try_to_open_foo-Archive,_what_to_do? + 9. What_todo_if_an_extenal_tool_doesn't_seem_to_work? + 10. Howto_executing_jar_files_(and_not_enter_the_jar_archive)? + 11. Why_do_I_have_trouble_with_my_FTP_connection? + 12. I_get_"FTP_protocol_not_supported_by_Krusader"_error_when_trying_to_open + a_remote_FTP_directory,_what_to_do? + 13. How_don't_add_".part"_suffix_when_copying_files_via_ftp? + 14. How_can_I_close_a_remote_connection_(e.g._a_FTP_connection)? + 15. I_am_experiencing_problems_with_the_media://_protocol,_why? + 16. How_can_I_disable_the_default_sounds,_e.g._when_I_do_a_delete_action_? + 17. Where_is_RemoteMan,_the_remote_connection_manager_? + 18. Why_doesn't_mimetype_magic_sometimes_work_inside_archives? + 19. Where_is_Konfigurator,_do_i_need_to_install_the_KDE_Desktop_Enviroment_to + use_it? + 20. How_can_I_set_the_look_&_feel_of_2_different_users_to_be_the_same? + 21. Why_doesn't_"save_last_location"_work? + 22. Why_doesn't_the_handbook_work? +1. Krusader keeps crashing, why? + We've been receiving a lot of emails and bug reports (December 2005) + regarding random crashes, especially during file operations such as copy, + move, etc. These crashes are related to Qt™ 3.3.5 and NOT Krusader. + It seems that Qt™ 3.3.5 introduced a serious bug which is currently + (December 2005) causing random crashes in many KDE applications including + Konqueror. You can use Google to find out more. As far as we know, Debian�- + Sid and SuSE� already posted new Qt™ binaries that fix the problem, + and Gentoo� has masked Qt™ 3.3.5 completely. As for now, you either + need Qt™ 3.3.4 or a fixed Qt™ 3.3.5 or a higer version, + depending on your distribution. More information is available on our + website. +2. When I try to mount/unmount my cdrom/floppy, Krusader reports something + about a supermount, what's this about? + Supermount is a daemon which handles the mounting/unmounting of removable + filesystems for you. Just insert a floppy, and do cd /mnt/floppysupermount + will do the mount for you automatically and transparently. Usually this + works fine. However, supermount misleads the system into thinking that the + floppy/cdrom is mounted at all times! This creates some problems for + Krusader, as it cannot really know when the floppy or CD has been removed + because the system information is not correctly updated by supermount - is + there really a floppy in the drive? Of course, this can be solved, but as + for now, we don't consider it a priority. +3. Why does Krusader freeze or hang on a dead mountpoint? + When Krusader is e.g. browsing an NFS share and the NFS server goes down, + Krusader will freeze. This Krusader (and all other open internal viewers/ + editors) freeze is fatal, and can only be corrected with the kill -9. We + have no solution for this. This is an issue not confined to file managers, + or even the Linux� OS! The problem is that you "hang" on the first access + to the dead share - so there is no way around it, no check to avoid it, + even ls will freeze. Just trying to read something - anything - is enough + to get you stuck. The one and only way around this architectural problem is + using a multi-threaded design - this way if we get stuck, we don't hang the + entire application event loop, but we don't think that the time is right + for adding threads, we are not sure that *all* the KDE systems out there + are using Qt™-mt (the multi threaded version of the Qt™ + library), and the Krusader Krew may not be the right people to address this + major issue in any case; so currently this is just a bug we have to learn + to live with. +4. When I try to resize Krusader to make it smaller, I discover that I can't + resize it below a certain size. Why? + See the F1, F2 (etc.) buttons? They are not allowing Krusader to downsize + as they have a minimum size. Just disable them View->Show FN Keys Bar and + you'll be able to resize Krusader to your liking. Since version 1.51 we + have improved this greatly: when downsizing the buttons will look like 'F5 + ..py'. When the button faces are too small to read a tooltip will give the + complete text. The minimum width is 45 pixels for each button. +5. When I perform some file operations, Krusader's panel doesn't refresh / I'm + using Krusader with fam installed, but updates to the panel are not shown. + Why? + The bad news is that we're not sure why, but it seems that fam (file + alteration monitor) sometimes refuses to work. We are looking into this + problem to make sure it is not our problem. We've tried the same source + code on two different Gentoo installations: one worked, the other did not. + The good news is that if you disable fam, Krusader will automatically + revert to its internal update mechanism (which is less efficient, but + works) without needing to recompile. You can disable fam with: + $ su -c 'fam -l' + Look at the manpages for more information about fam. +6. Samba ISO 8859-x codepage / What to do if Krusader does not read shared + directories containing special international characters? + Krusader does not handle (yet) Samba ISO 8859-x codepages, if you use a + codepage different than 8859-1 you will have to do a manual configuration. + Create or modify the file: ~/.smb/smb.conf + [global] + workgroup = MyWorkGroup (ex. WORKGROUP) + client code page = MyCodePage (ex. 852) + character set = MyCharSet (ex. ISO8859-2) + Unfortunately kcontrol (KDE 3.1.1) fails to configure smb.conf properly, so + this must be done manually with a text editor. +7. Krusader reports "krarc:... protocol not supported" error at opening an + archive file, what to do? + Install the krarc slave properly: + Copy the kio_krarc.so, kio_krarc.la files into $KDEDIR/lib/kde3 + Copy the krarc.protocol file into $KDEDIR/share/services + or the directory where the KIO slaves are placed in your Linux� + distribution. +8. I get the error message "Protocol not supported by Krusader: "krarc:/path/ + to/foo-archive", when I try to open foo-Archive, what to do? + The icons, kio_slaves and documentation must be installed in the correct + places in the KDE directory tree. The kio_krarc.* files must be in the same + directory with the other KIO slaves. Try this: locate kio_tar.* and copy/ + link the kio_krarc.* files to the same location. Don't forget to run # + ldconfig on this directory when you're done. For more information click + here. +9. What todo if an extenal tool doesn't seem to work? + Krusader uses several programs as external_tools, and sometimes they appear + not to work. Open a terminal and check if tool foo is installed. + $ foo + Check if tool foo is properly configured in the Konfigurator_Dependencies + page. For Archiving tools: autodetect the archives again with the Auto + Configure button in the Konfigurator_archive_page. Check the Konfigurator + Protocol_page If it doesn't work, backup your ~/.kde/share/config/ + krusaderrc configuration file and remove it from this location, Restart + Krusader, Krusader will now start the first start configuration wizard, + follow these guidelines. +10. Howto executing jar files (and not enter the jar archive)? + Go to the Konfigurator_Protocol_page and remove application/x-jar from the + krarc node, Krusader should no longer enter the archive. Global file + associations are handled by KDE and not by Krusader. To assosiate the jar + extension: + * Open KDEs control center: kcontrol + * KDE Components->File Associations + * Enter jar as filename pattern + * Add java as application +11. Why do I have trouble with my FTP connection? + This problem often occurs when you are behind a firewall or proxy. Open KDE + Control Center->Network->Preferences, "Enable Passive Mode (PASV)" has to + be turned on or off, depending on it's current setting. Now try your FTP + session again to see if it works. Also, make sure you have no other FTP + sessions open (using web browsers, etc.), they can cause complications. + More information can be found in Active_FTP_vs._Passive_FTP,_a_Definitive + Explanation. +12. I get "FTP protocol not supported by Krusader" error when trying to open a + remote FTP directory, what to do? + The reason for this error is that 'FTP via HTTP proxy' feature is not yet + supported by Krusader. This error may be caused by a misconfiguration of + the proxy settings in KDE Control Center. Modify the proxy settings to not + use HTTP proxy and FTP will work. +13. How don't add ".part" suffix when copying files via ftp? + When uploading files a .part suffix is added to the filename, once the + upload is complete the filename is renamed automagically to remove the + .part suffix. This works great but sometimes some ftp-servers don't allow a + rename operation. You can solve this by unchecking the checkbox Mark + partially uploaded files in KDE's control center. The checkbox is located + at Internet and Network->Connection Preferences. +14. How can I close a remote connection (e.g. a FTP connection)? + It's explained in the remote_connections_chapter. +15. I am experiencing problems with the media:// protocol, why? + At the moment of writing the media:// protocol is instable, we need to wait + until the KDE team corrects it, every other protocol works properly with + Krusader, only media fails. More information regarding this issue is + available in our_forum. +16. How can I disable the default sounds, e.g. when I do a delete action ? + Those are the default KDE System sounds, and not related to Krusader. If + you want to disable them globally open your KDE KDE Control Center + ( kcontrol): KDE Control Center->Sound & Multimedia->System Notifications, + Event Source: "KDE System Notifications" and uncheck sound items you don't + like. +17. Where is RemoteMan, the remote connection manager ? + RemoteMan has been replaced by our Bookmark Manager since Krusader 1.25- + beta1. The Bookmark Manager handles local files and remote_URL's the same + way. RemoteMan was left as a selection until Krusader-1.51 to allow an + easier transition and give you a chance to move your Bookmarks. RemoteMan + was disabled, as announced, in Krusader-1.60. + URL transition procedure: + 1. install Krusader-1.51 + 2. open the RemoteMan and connect to an FTP + 3. once inside, bookmark the current location, select a name and save. + 4. do this for all your connections, all the Bookmarks are now stored in + krbookmarks.xml + 5. install Krusader-1.60, it will use krbookmarks.xml or import it if + needed. +18. Why doesn't mimetype magic sometimes work inside archives? + When you enter an archive and press F3 to view a file that has no known + extension, e.g. README, INSTALL etc.. And if the viewer opens in hex-mode + instead of the usual mode, than you need to configure: KDE Control Center- + >KDE components->File Associations->Application->octet-stream, binary + viewer needs to be removed. +19. Where is Konfigurator, do i need to install the KDE Desktop Enviroment to + use it? + Konfigurator is Krusaders configuration module, when you have installed + Krusader than you have also Konfigurator. For some reason some people think + it's an other KDE application, but it is not, so you don't need to install + the KDE Desktop Enviroment to use Konfigurator. When runnig Krusader, use + Settings->Configure Krusader, and it will start Konfigurator. Please read + the manual, Krusader has many many configuration options, a lot of things + can be customized to your needs with Konfigurator. +20. How can I set the look & feel of 2 different users to be the same? + Presuming that the current setup is the good configuration, you can copy + the configuration to the other user. + # cp ~/.kde/share/config/krusaderrc /home/foo_user/.kde/share/config + And when the other user is Root use: + # cp ~/.kde/share/config/krusaderrc /root/.kde/share/config +21. Why doesn't "save last location" work? + Unfortunately the 1.70.x version contains a bug. The tabs are not saved if + a "Panels Save Settings=Tabs" item is present in the configuration files. + The fix is easy: + * open and edit ~/.kde/share/config/krusaderrc + * remove the "Panels Save Settings" item + and it'll work with the feature in Konfigurator. More info + can be found in our_forum. +22. Why doesn't the handbook work? + This error will happen on Debian� (or Debian� based) distro with the + krusader_1.51-1_i386.deb package. You will see the next error message if + you try to open the handbook: "The requested help file could not be found. + Check that you have installed the documentation." To fix it go to /usr/ + share/doc/kde/HTML/en/krusader/, you will see the foo.docbook.gz files. + Now, you need to extract all these files with root privileges ("File- + >Unpack" with Krusader) to create foo.docbook files. Now the handbook will + work. This error is fixed in the krusader_1.60.0-1_i386.deb package and + higher versions. +General FAQ + 1. How_can_I_report_a_wish,_a_suggestion,_or_a_comment? + 2. How_can_I_send_a_patch? + 3. How_can_I_report_a_bug? + 4. How_can_i_send_good_debug_or_crash_reports? + 5. What_todo_if_the_KDEcrashhandler_sends_no_usefull_backtrace_information? + 6. Does_Krusader_have_a_mailing_list? + 7. Does_Krusader_provide_newsfeeds? + 8. Does_Krusader_have_an_IRC_channel? + 9. How_does_the_Krusader_forum_work? + 10. How_can_I_translate_Krusader_into_my_native_language? + 11. How_can_I_support_Krusader? + 12. Is_there_a_Mac_OS_X_port? + 13. Is_there_a_Windows_port? + 14. Why_is_Konqueror_in_"midnight_commander_style"_not_an_OFM? + 15. Why_should_I_use_an_OFM? +1. How can I report a wish, a suggestion, or a comment? + An open source project's greatest strength is derived from getting user + feedback. That is why we love to hear what you have to say. Your "gripes" + are our instructions. After about 6 months, programmers can no longer see + their own mistakes. It's natural. We want the ideas, qritiques, and + feedback because we all want to make Krusader the best and most useful file + manager available anywhere. + The most convenient way to contact us is to use the Krusader_Forum, or the + krusader-users mailing_lists. For information on what remains to be done + look at the ToDo_Forum. Adding ToDo items into the ToDo_Forum is for + developers only, but feel free to post to the New_Features_Discussion/ + Requests_Forum for things that aren't on the ToDo_Forum, but should be. If + you have a nice feature request, the Krusader Krew will add your request to + the ToDo_Forum. We review and discuss every submission. For more + information how the forum works click here. +2. How can I send a patch? + It's not easy to write patch guidelines, but here are some. + 1. Patches, new code or new features are always welcome! + 2. Focus only on one problem at a time, so the developers can easily + understand you, and commit your patch it works. + 3. Preferrably, you can start a discussion with the developers on the + krusader-devel mailing_lists or on the Krusader_Forum. Unfortunatly, + we can't apply a patch if the patch is in conflict with the "general + design" of the Krusader code (read for more instructions in this + FAQ). Please send only one change request per mail, so that the + discussion is easier to follow. The modifications should be committed + step by step, checking each line. + 4. Submit your patch files into our Patch_Tracker, so that all patch + proposals stay organised and don't get lost, tar.gz archives or diffs + are usually ok. Do not copy changes into a mail. Most mailers will + change the white spaces, so that the diff will not apply or the code + snipped does not diff. In the past, patch mails went lost or + disorganized in many many mails, so please use the Patch_Tracker, + thanks! + 5. Use portable solutions, Krusader should run on: + * All POSIX (Linux�/BSD/UNIX�-like OSes), Solaris™. + * All BSD Platforms (FreeBSD�/NetBSD�/OpenBSD�/Mac� OS). + * KDE 3.3- KDE 3.5 and even on GNOME with KDElibs (for krusader- + 2.x KDE 4) . + * GCC 2.95 - GCC 4.1 + Architecture changes are made by the team only. + 6. A final note: always keep in mind a patch might be rejected. Either + it has side effects, which we could not fix or it contradicts with + the idea behind the patched module. In this sense, a software project + differs from, let's say a wiki: a software project has to have + someone to make all the final decisions. Otherwise the software will + not work. Furthermore: keep in mind that the examination of patches + might take time, as we all have private lives. +3. How can I report a bug? + Bugs?!?!? Well, ok.... We have an online Bug Tracking System. + Using the online bug-tracker helps us have a clear and orderly way to know + how many bugs are open, bug priority and follow-ups. It saves us from + browsing through the entire Krusader forum, searching for yesterdays bug. + Please use this system. + Before reporting a bug, please read the following: + 1. Use the Krusader_Forum's Search function , your bug might be already + solved . Please DO NOT post new bugs to the Bug_Discussion_Forum + (except if you are not sure that you have found a bug). We use it for + bug discussions. + 2. Check if the bug is already posted in the online_bug_list of the Bug + Tracking System. + 3. If you can't find this bug mentioned, please submit it into the bug + tracker by clicking the Submit New button in the bug-tracker window. + Please submit the following issues: the Krusader version used, the + Linux� distribution + version used, processor type, and as good a + description of the problem as you can manage. + Thank you for your co-operation! + **** Note **** + If possible, try to do the same operation with Konqueror or another KDE + application. If you encounter the same problem then it is possibly a + KIOSlaves or KDE (kdelibs) bug, and not a Krusader bug. Krusader uses the + KDE libraries and the KIOSlaves for many operations. In some cases you can + encounter problems if your distribution is incorrectly configured, please + test it first as explained above. + **** Note **** + If you've got bugs to report please do not use KDE's bugzilla http:// + bugs.kde.org/, KDE's Bug Tracking System. Report Krusader bugs directly to + us. +4. How can i send good debug or crash reports? + Usually binary packages that are been used by your distribution do not + contain debug information. Since we usually only develop and fix Krusader- + cvs, compile Krusader-cvs in debugmode and install it, than check if the + bug still exist. + $ ./configure --enable-debug=full + Install valgrind, a suite of tools for debugging and profiling Linux� + programs. Run Valgrind/Krusader + $ valgrind --tool=memcheck {foo_path}/krusader + The valgrind tool will write to stdout, what really happens. If you could + send these informations before the crash, it's almost sure, that we may fix + or tell you what to do. +5. What todo if the KDEcrashhandler sends no usefull backtrace information? + Usually binary packages that are been used by your distribution do not + contain debug information. Since we usually only develop and fix Krusader- + cvs, compile Krusader-cvs in debugmode and install it, than check if the + bug still exist. + $ ./configure --enable-debug=full + If the KDEKrashhandler still doesn't provide usefull backtrace information, + than sometimes a coredump will give better information. Run Krusader, with + disabled crashhandler. + $ krusader --nocrashhandler + On a crash you will get a .core file, usually in your home directory. Run + gdb, the GNU Project Debugger + $ gdb -c corefile krusader + Now type bt to get the backtrace and type q to quit gdb. Often the best + debug results will be given when using the valgrint tool. +6. Does Krusader have a mailing list? + Yes, currently we have 6 mailing_lists. No spam, no bother, just Krusader. + Feel free to subscribe and unsubscribe. + Tip. our mailing lists can be browsed online or read with a newsreader, so + that you don't even need to subscribe to follow the action on the mailing + lists. + * Krusader-news is a very low volume list, used for newsletters and + announcements of new versions or critical bugfixes. The news can also + be read online at latest_news and in the News_and_Announcements_Forum + which are basically the same but displayed in another format. + * Krusader-devel is the developer mailing list (read-only). If you want + to follow the development of Krusader on the cutting edge, this is + the list to follow. + * Krusader-users is the Krusader users mailing list. Here you can ask + for help and talk with the Krusader users and developers. + * Krusader-i18n is the translations mailing list. + * Krusader-doc is the documentation mailing list. + * Krusader-commits (read-only): when the Krusader Krew commits code + into CVS, it will be reported in this mailing list. Want to keep + track? Waiting for a certain feature/bugfix? Follow Krusader's + development here. +7. Does Krusader provide newsfeeds? + Yes, we do. Several newsfeeds in various formats are available. rss- + filerelease_feed, rss-forumfeed, krusader-news_feed, krusader-devel_feed + and even additional_feeds by gmane.org. krusader-users_feed, krusader-i18n + feed, krusader-doc_feed. +8. Does Krusader have an IRC channel? + Yes, we do. Feel free to talk to the Krusader Krew and fellow-users via + freenode.org servers. The server is irc.freenode.org, the channel is + #krusader. Everyone is welcome. +9. How does the Krusader forum work? + In the spirit of freedom of speech, everything that is Krusader related can + be discussed in our forum. It does not matter if you are a newcomer or an + advanced user, everyone is welcome. An open source project's greatest + strength is derived from getting user feedback. That is why we love to hear + what you have to say. With your feedback we can make Krusader better and + better; otherwise, we are not aware of issues and ideas you may have. But + please remember the following, so that we can maintain some order in the + chaos. + If the Documentation, FAQ, Krusader_Forum and Krusader-devel (please use + the search function ) can't help you, do not hesitate to post on our forum. + The Krusader Krew or the Krusader community is always available to help + you. + Please use the Search function of the Krusader_Forum, your issue may have + been previously discussed (this allows us to minimize the double/triple/... + postings). If your issue has already been discussed in the past there is a + great chance that you will have an instant solution to your problem. If the + issue is currently being discussed, you can join in the discussion. Some + questions are asked over and over again, that's why we have created this + FAQ. This allows us to spend more time developing Krusader. + The Krusader_Forum is split into seven sections: + * News_and_Announcements_Forum: all the latest news. + * NewsLetter_Forum: all newsletters. + * Bug_Discussion_Forum: discussions about bugs, please DO NOT use the + forum for bug_reports (except if you are unsure if you have found a + bug). + * New_Features_Discussion/Requests_Forum: discussions about new + features for future Krusader versions. + * ToDo_Forum here you will find the list of the planned features. + Registered users will be able to VOTE and COMMENT on the TODO items. + Here you get the chance to push your favourite features (+3) and + still prefer certain features over others (+1), if you don't care + about a feature just simply don't vote on that feature. Unregistered + users may only browse the ToDo_Forum. The ToDo_ranking_system + contains the results based on the votes. Adding_ToDo_items or + removing ToDo items which have been implemented will be done by the + Krusader Krew. + * UserActions_Forum: discussions about UserActions. Posting your own + User Actions is greatly appreciated. We plan to include the best ones + in the next Krusader releases. + * General_Discussion_Forum: everything that is Krusader related and + doesn't belong in the other forums. + Thank you for your co-operation! + We provide RSS feeds for our forums. You don't have to check for new posts + all the time, instead the news will come to you! To make use of them, + simply point your RSS aggregator to here. +10. How can I translate Krusader into my native language? + Please read the i18n_page. It's not difficult to translate! Most anyone can + do it, it just takes some time. +11. How can I support Krusader? + You can support Krusader in many different ways. Please send us feedback, + bug_reports, patches, donations, translations, ... +12. Is there a Mac� OS X port? + Yes, there is Mac� OS X port, but you will not have the all the power you + would have on Linux�. Please read the Mac�_OS_X_port_section for more + information. A recommended native file manager for Mac� OS is Disk_Order� + (shareware). +13. Is there a Windows� port? + No, but this might change in the future. Please help_us with this project, + contributions are greatly appreciated. A recommended native file manager + for Windows� is Total_Commander� (shareware). +14. Why is Konqueror in "midnight commander style" not an OFM? + The two panels and a commandline are available, all the other stuff like + OFM_features and the OFM interaction with the user is missing from this + profile. +15. Why should I use an OFM? + An Orthodox_File_Manager_(OFM) is much faster than a one panel filemanager + and faster than the command line. If you would like to know how_Krusader + feels, there is only one way to discover: install it on your computer and + use it for a while. If you prefer to waste time and lose productivity, + continue to use one panel filemanagers which are based on Windows� + Explorer. Matej Urbančič has written a blogon why OFM is better + than a one panel filemanager. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..3092c95 --- /dev/null +++ b/INSTALL @@ -0,0 +1,780 @@ +-------------------------------------------- +- Documentation version: 1.90.0 +- Documentation date: 2008-03-06 +- Parsing date: Thu Mar 6 22:31:20 UTC 2008 +-------------------------------------------- + + +This file contains the Krusader INSTALL instructions +This file is parsed from Docbook/XML source files +with the 'make_doc' script (krusader-handbook-1.80.0.source.tar.gz ). + + +Note: +----- +after the parsing process to generate this TXT file all te URL's are gone, +to see the URL's again please take a look at the HTML version of this file. + + +Feedback: +--------- +Feedback for the documentation is always welcome. + +Frank Schoolmeesters, documentation coordinator +[frank_schoolmeesters {*} yahoo {.} com] + +Latest version: +--------------- +The latest version of this document is available online at: +http://krusader.sourceforge.net/handbook/installation.html + +Latest version of the Krusader documentation should always be available: +- online reading (Krusader-CVS): + http://krusader.sourceforge.net/handbook/index.html +- most recent documentation tarball + http://sourceforge.net/project/showfiles.php?group_id=6488&package_id=125990 +- when downloading and installing the most recent Krusader from the + CVS repository (the doc's will be available via the Help menu) + http://krusader.sourceforge.net/cvs.php + http://krusader.sourceforge.net/handbook/installation.html + + + as always, enjoy + Krusader Krew. + + http://krusader.sourceforge.net + + +db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. +88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D +88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' +88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b +88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. +YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + +------------------------------------------------------------------------ + +Chapter 3. Installation on KDE3.x +Table of Contents + Requirements + Obtaining_Krusader + Krusader_Downloads + Version_Scheme + Stable_Version + Development_Version_(beta_release) + CVS_Builds + Subversion + Older_Releases + Compiling_and_Installing + Compiling_Krusader._What_now? + Quickstart_Installation_Tutorial + Detailed_Installation_Tutorial + Installing_on_Mac_OS-X + Starting_Krusader + Configuring_Krusader + Making_Krusader_the_default_file_manager +Requirements +In order to successfully use the most recent Krusader, you need KDElibs >= 3.4 +Required KDE version: + * Krusader v1.01: KDE 2 + * Krusader v1.02 - 1.40: KDE 3.0 - KDE 3.2 + * Krusader 1.40: prefers KDE 3.2 (otherwise all features will not be + available) + * Krusader v1.50 - v1.51: KDE 3.2 - KDE 3.3 (Konfigurator crash on KDE 3.4) + * Krusader v1.60.0 - v1.70.0: KDE 3.3 - KDE 3.5 + * Krusader 1.70.x: prefers KDE >= 3.4 (otherwise all features will not be + available) + * Krusader 1.80.0: KDE 3.4 - KDE 3.5 + * Krusader v2.xx.x: KDE 4 - Qt™ 4 The big challenge, a first release + in 2008 +NOTE: there are no installation instructions for KDE4 yet available since at +moment of writing Krusader was not ported yet to KDE4. +Platforms: + * All POSIX (Linux/BSD/UNIX-like OSes), Solaris™ + * All BSD Platforms (FreeBSD/NetBSD/OpenBSD/Mac OS) +Krusader uses about 3-4 Mbyte of memory to run and about 15 Mbyte of shared +memory, which is also used by other processes, but this may vary depending on +your platform and configuration. In order to handle archives the archivers must +be configured here. +A package of popular (un)packers, Krusader itself and add-ons can be found on +the Krusader_downloadpage. +For more requirements, see below. Have a look at the FAQ section as well. +Obtaining Krusader +The latest information about Krusader can be found on the Krusader_website . +Krusader Downloads +it is recommended to use the Krusader package that is provided by your +distribution. Distrowatch.com is a great resource to check the availability. If +your distribution does not offer Krusader, please contact the creators of your +distribution and ask them to provide a Krusader package +The latest version, as well as the older versions, can be found on the Krusader +downloadpage and on the Sourceforge_mirrors. It contains the source tarballs, +RPM and DEB packages to whatever distro the Krusader-Krew is using and packages +build by Krusader users and third parties. +Distributions who provide Krusader: + * SuSE >= 9.3, Note: please use Krusader-1.60.0 instead of Krusader-1.51 + (might be unstable on SuSE9.3-KDE3.4). + * Fedora™ via Fedora™_Extras # yum install krusader will do the + job, thanks to Marcin Garski. Red Hat RPM packages can usually found on + the Krusader_downloadpage or at dag.wieers.com and Dries_Verachtert_RPM + Repository . + * Debian, on our Krusader_downloadpage you might find more recent DEB + packages. Note: usually Debian packages work also on distributions that + are "based on Debian", and some of these provide their own + (incompatible) packages. Ubuntu/Kubuntu, Linspire, Knoppix 4.x DVD, + Kanotix, etc. + * Mandriva via the contrib repository # urpmi krusader will do the job, + Gentoo, Yoper™. + * Arch_Linux, Frugalware_Linux, PCLinuxOS, altlinux. + * FreeBSD, the port is maintained by Heiner_Eichmann. + * NetBSD, Lunar_Linux ,Ark Linux, OpenLX™, Source Mage. + * Even more distributions can be found with Distrowatch.com. +Use the installation tools included in your distro to install the Krusader +package. You might need an internet connection if Krusader is not included on +the CD or DVD. There are probably other distributions which include Krusader. +If you know of one, please send feedback so that we can include it on the +distrolist. +Others + * Slackware tgz binaries can usually be found on the Krusader + downloadpage. You can also use Portpkg that contains a Krusader + SlackBuild, # portpkg krusader will do the job. + * There is a Mac_OS-X_port with the help of fink , the port is maintained + by Catalin_Hritcu. +Installation via the klik_protocol + * klik://krusader downloads Krusader provided by Debian stable, more + information is available . + * klik://krusader-latest downloads the latest stable_Krusader provided by + the Krusader Krew. + * klik://krusader-cvs downloads a cvs_snapshot_of_Krusader provided by the + Krusader Krew. +Search engines + * You can also find packages on Linux software archives such as + freshmeat.net or KDE-APPS.org . + * If you can notfind a package for your distribution, we recommend + searching for it with rpmfind, rpmpbone or rpmseek. +If you enjoy using Krusader, we would appreciate it if you went to one of these +sites and rated it. +If you still can not find a package, follow the installation procedure on how +to compile Krusader from source. This very thorough HowTo describes the process +in such detail that even newcomers should not have any problems. +Version Scheme +A new version scheme has been used since Krusader-1.60.0 + * First digit - the major version + * Second digit(s) - percentage of features completed for this major version + * Third digit(s) - bugfixes. +In essence, releasing Krusader-1.60.0 means that we believe that Krusader is +about 60% done with all the features we had scheduled for the 1.x.x series. +Series 2.x.x will be KDE 4.x releases. Hopefully, it is easy to understand. +Stable Version +krusader-x.xx.tar.gz +**** Note **** +Krusader is released under the GNU_General_Public_License_(GPL). This means +that THE PROGRAM IS PROVIDED "AS IS" WITH NO WARRANTY OF ANY KIND, even when it +is marked as a stable release. +Development Version (beta release) +krusader-x.xx-betax.tar.gz +Before every stable release we release at least one development version in +order to hunt down the bugs. +**** Warning **** +These releases are beta releases and will probably contain some bugs. +**** Note **** +If you are using a development or CVS version, it is possible that the latest +new features are not yet in the "The Krusader Handbook". Please read the +ChangeLog file online or in the Krusader sources to find out more about the new +features. For a brief description, please read the CVSNEWS file online or in +the Krusader sources. User_feedback and Bug_reports are always welcome! +The beta release has 3 goals: + * Apply a feature-freeze until the stable is released, only bugs will be + fixed. New features have to wait until the stable is released. + * Obtain feedback from Krusader users so that we can fix the bugs. + * Give translators time to update the translations for the coming stable. + Please read the i18n_page. +CVS Builds +krusader-cvs-yyyymmdd.tar.gz +**** Warning **** +These builds are untested and come without any warranty. They may contain +bugfixes, new features, or even new bugs. +We provide daily snapshots of Krusader's CVS version. For those who are +interested, the nightly tarball can be found on the Krusader's_Cutting_Edge +page. Depending on the stage of development, this version will either be stable +or unstable. Just before a stable release, the CVS version is almost stable. +After a stable release new features will be committed into CVS, which might +lead to the appearance of bugs. In some rare cases, the build will not even +compile if we make a mistake. In that case we try to fix the error as soon as +possible. +Krusader provides 2 nightly snapshots: + 1. krusader-cvs-yyyymmdd.tar.gz: make -f Makefile.cvs must be run before the + ./configure script is available. + 2. krusader-cvs2-yyyymmdd.tar.gz: for users who have problems with the make + -f Makefile.cvs command, we have already done this for you and the ./ + configure script is included in the tarball. This tarball is a bit bigger + than the first one. +check out from CVS. Krusader can be checked out through anonymous (pserver) CVS +with the following instruction set. The module you wish to check out must be +specified as the module name. When prompted for a password for anonymous, press +the Enter key. +Currently, there are two module options: + * krusader_kde2: the KDE2 branch, stable but it is basically v1.01 and + there are no planned changes + * krusader_kde3: the KDE3 branch that we currently use +To check out Krusader from CVS: +$ cvs -d:pserver:anonymous@krusader.cvs.sourceforge.net:/cvsroot/krusader login +$ cvs -z3 -d:pserver:anonymous@krusader.cvs.sourceforge.net:/cvsroot/krusader +co krusader_kde3 +(note: updates from within the modules directory do not need the -d parameter) +If you want to check out a specific version of Krusader from CVS (e.g. +Krusader-1.60.0) : +$ cvs -z3 -d:pserver:anonymous@krusader.cvs.sourceforge.net:/cvsroot/krusader +co -rversion_1_60_0 krusader_kde3 +If you want to check out a specific date of Krusader from CVS (e.g. Krusader- +2006-10-29) : +$ cvs -z3 -d:pserver:anonymous@krusader.cvs.sourceforge.net:/cvsroot/krusader +co -D2006-10-29 krusader_kde3 +Mostly being Gentoo users, we provide a Gentoo_Live_Ebuild for all those who +want to stay on the bleeding edge of file management and do not want to miss +the advantages of portage. Please take a look at our Krusader's_Cutting_Edge +page for more installation details. +We also provide ViewCVS to browse the CVS repository. +Subversion +Subversion is used for the Krusader 2.x series for KDE4. it is also possible to +Browse_the_Subversion_Repository. +To check out the latest Krusader 1.x for KDE 3 from SVN: (NOTE: at moment of +writing use CVS for krusader_kde3, since krusader_kde3 is developed in CVS and +NOT in SVN, currently you will get an old version in SVN) +$ svn co https://krusader.svn.sourceforge.net/svnroot/krusader/trunk/ +krusader_kde3 +To check out the latest Krusader 2.x for KDE 4 from SVN: +$ svn co https://krusader.svn.sourceforge.net/svnroot/krusader/trunk/ +krusader_kde4 +Older Releases +If you are looking for older releases we recommend the Sourceforge_mirrors, +available from our project page. +Compiling and Installing +Compiling Krusader. What now? +Check the environment variables KDEDIR_-_QTDIR. +To compile and install Krusader on your system, type the following in the base +directory of the Krusader package: + $ ./configure + $ make + $ su -c 'make install' +If you install a CVS or beta version and if Krusader was previously installed +on your computer, then you should delete the krusaderui.rc file in your home +directory to activate the new menu entries $ rm ~/.kde/share/apps/krusader/ +krusaderui.rc , click here for more info. +Since Krusader uses autoconf and automake you should have no trouble compiling +it. If you run into problems, read the detailed installation instructions +below. +Quickstart Installation Tutorial +Debian +These instructions should work as well on Debian based distributions like: +Ubuntu, Kubuntu, Linspire, Kanotix, ... +Add the next lines in the ~/.bashrc configuration file +export QTDIR=/usr +export KDEDIR=/usr +export export KDEDIRS=/opt/krusader:/usr +Install the build_dependencies for Krusader +# apt-get build-dep krusader +Download the Krusader sourcecode, unpack and enter the krusader_kde3 directory. +The next command will create ./configure +$ make -f Makefile.cvs +NOTE: you might need to upgrade automake and/or autoconf, if an error message +appears. +Install Krusader in the /opt directory to not overwrite the official Debian +binary /usr/bin/krusader, so that krusader will run the official Debian +package and /opt/bin/krusader runs the compiled version. It's recommended to +use enable the full debug, so that you can possible problems at us. Run +configure. +$ ./configure --prefix=/opt/krusader --enable-debug=full +Compile Krusader +$ make +Install Krusader +$ su -c "make install" +/opt/bin/krusader runs the compiled Krusader version. +SuSE +Install the build_dependencies for Krusader +Download the Krusader sourcecode, unpack and enter the krusader_kde3 directory. +Now you can compile and install Krusader +$ make -f Makefile.cvs +$ ./configure --prefix=/opt/krusader --enable-debug=full +$ make +$ su -c "make install" +For other Linuxes +Ofcource it's impossible to cover all Linuxes, but here are the general +installation instructions. +Usually ./configure --prefix=/usr should be used, though options like /opt/ +krusader are usually better so that you don't overwrite files that are +installed by your package managment system. Please don't use the /usr/local +directory as it simply won't work. +Install the build_dependencies for Krusader +Download the Krusader sourcecode, unpack and enter the krusader_kde3 directory. +Now you can compile and install Krusader +$ make -f Makefile.cvs +$ ./configure --prefix=/usr +$ make +$ su -c "make install" +Detailed Installation Tutorial +The next section will explain how to install Krusader step by step. Questions +about the installation process have been asked many times and especially users +new to Linux often have problems compiling software from source. Therefore, we +are trying to keep the explanations as detailed as possible even if they are +mostly not Krusader specific. Experienced users may easily skip most of the +steps. +Unfortunately, because not all Linux distributions follow the Filesystem +Hierarchy_Standard_(FHS) it is impossible to write a tutorial that would cover +all circumstances. However, these guidelines will help you in the right +direction. +**** Note **** +If you encountered problems, please read first this installation procedure and +the FAQ. If the problem persists, use the help_request to ask for help. + 1. Install all packages and libraries that are needed for the compilation, + please read the FAQ. + **** Tip **** + If you install Kdevelop, (almost) everything that you need to compile + Krusader will be installed on your computer. However, if you are not a + developer, please follow the instructions and do not use Kdevelop to + compile Krusader. + 2. Open your favourite terminal emulator (e.g. Konsole). + 3. We recommend you create a separate directory to keep all the sources you + compile in. This way you will have a better overview of the installed + programs and it will be easier to uninstall them later. + $ mkdir ~/source + The chosen directory is just an example, any other will work. + 4. Copy the sources to the ~/source directory and unpack them. + $ cp /"your_dir" /krusader-x.xx.tar.gz ~/source + $ cd ~/source + $ tar -xzvf krusader-x.xx.tar.gz + 5. Optional step: if you wish you can delete the tarball at this point as it + is no longer needed. + $ rm krusader-x.xx.tar.gz + 6. Change to the directory containing the sources. + $ cd krusader-x.xx + 7. Check the environment variables QTDIRand KDEDIR. Krusader's ./configure + script needs to know where the Qt™ and KDE directories are. + QTDIR: e.g. /usr/lib/qt3 or /usr/qt3 + KDEDIR: e.g. /usr or /opt/kde3 + Normally your distribution will set them for you, but experience has + shown that some do not. You can easily check the values with the echo + command. + $ echo $QTDIR/usr/lib/qt3 + $ echo $KDEDIR/usr + If both commands give an output, the enviroment variables are set (the + above example are the settings of Mandriva-Linux). In case you receive + empty lines, the variables are not set and you have to set them manually. + If you do not know what to set the variables to, or if you want to check + if the variables are correctly set, ask your distributor or use the find + command. + $ find /usr /opt -name qtconfig -type f 2>/dev/null + /usr/lib/qt3/bin/qtconfig + $ find /usr /opt -name kdeinit -type f 2>/dev/null + /usr/bin/kdeinit + In this case /usr/lib/qt3 is your QTDIR and /usr is your KDEDIR. The + installed binaries will go to /usr/bin. Now we will set the enviroment + variables with the export command. + $ export QTDIR= + $ export KDEDIR= + **** Note **** + These enviroment variables are only set for the lifetime of your current + shell. When you close your terminal and open a new one they will be gone. + Assuming Krusader is not the only Qt™/KDE program you want to + compile, we recommend to make these settings permanent (e.g. append both + export commands to your /etc/profile) file. + If you can notdetermine your KDEDIR, kde-config --prefix might help you. + 8. If you have downloaded a stable version "krusader-x.xx.tar.gz" or a beta + version "krusader-x.xx-betax.tar.gz", you can skip this step. In this + case the ./configure script is provided. + If you have downloaded a CVS build or nightly tarball "krusader-cvs-yyyy- + mm-dd.tar.gz"", you will have to run the following command to create the + ./configure script: + $ make -fMakefile.cvs + If everything is OK you will see the following output on your screen: + $ make -f Makefile.cvs + This Makefile is only for the CVS repository + This will be deleted before making the distribution + *** Creating acinclude.m4 + *** Creating list of subdirectories + *** Creating configure.in + *** Creating aclocal.m4 + *** Creating configure + *** Creating config.h template + *** Creating Makefile templates + *** Postprocessing Makefile templates + *** Creating date/time stamp + *** Finished + Don't forget to run ./configure + If you haven't done so in a while, run ./configure --help + $ + **** Note **** + You will need to have autoconf 2.52, 2.53 or 2.54 and automake 1.6 (or + higher) to run the make -f Makefile.cvs command + **** Tip **** + If you encounter problems with this command click here. Krusader provides + two nightly builds (snapshots) one with a ./configure script and one + without. + 9. Your Linux distro Krusader RPM or DEB package will normally install + Krusader in the KDEDIR/bin directory. According to the Filesystem + Hierarchy_Standard_(FHS), any user installed files go to the /usr/local + directory. If you wish Krusader to be installed in another directory, it + can be determed with the prefix option. If you do not have root access, / + home/YOUR_USERNAME/.kde is probably a good choice. + foo + + Krusader Project: + ----------------- + Source code location: . + C Compiler: gcc + C Compiler flags: -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow + -Wpointer-arith + -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE - + O2 + -Wformat-security -Wmissing-format-attribute + C++ Compiler: g++ + prefix: /usr/local + kde_libraries: /usr/include + kde_includes: /usr/lib + kde_locale: /usr/share/locale + qt_libraries: /usr/lib/qt3/lib + qt_includes: /usr/lib/qt3/include + KDEDIR: /usr + QTDIR: /usr/lib/qt3 + Install path: /usr/local/bin + krusader version: 1.80.0 + krusader binary: /usr/local/bin/krusader (after 'make install') + Thank you for using Krusader + + Good - your configure finished. Start make now + bash$ + This is the output for Mandrake™-Linux 10, other distributions may + give a different output. + **** Tip **** + At the end of the ./configure script you will find a summary of the most + important settings, e.g. where the Krusader binary will be installed + (after the 'make install' command). This part will also display a warning + if the environment variables KDEDIR_-_QTDIR are empty. + Since Krusader-1.70.0 ./configure has two specific Krusader options: + * ./configure --without-konqueror: build Krusader without support + Konqueror's servicemenus, default=with. This means that Konqueror's + right-click menu entries will not be available. + * ./configure --without-javascript: build Krusader without JavaScript + support, default=with. This means that the JavaScript_console will + not be available. + * ./configure --without-acl: build Krusader without ACL support + default=with. Sometimes this option is needed if you get a ACL + compile error when running make. + In the past the support was always compiled in when the headers where + found, now you have the choice. + Use ./configure --helpto see more options or read the INSTALL file in the + Krusader sources. + If you used another --prefix= than $KDEDIR or /usr/local, it is + recommended to do an extra check: + $ kde-config --path exe + /home/frank/.kde/bin/:/usr/bin/:/usr/local/bin/ + $ + If the directory is not shown, you need to use e.g. + export KDEDIRS=/usr/local:/usr. To make these settings permanent you can + e.g. append this export command to your /etc/profile file. After that you + need to restart KDE. + **** Note **** + If ./configure fails, take a look at FAQ_missing_libs_or_headers. + 10. Start the compilation process with the make command. + $ make + This will take about 3 - 40 minutes depending on how fast your computer + runs. If everything goes well, it will e.g. end with the following + messages: + foo + make[2]: Leaving directory `/home/source/krusader_kde3/tar' + make[2]: Entering directory `/home/source/krusader_kde3' + make[2]: Leaving directory `/home/source/krusader_kde3' + make[1]: Leaving directory `/home/source/krusader_kde3' + bash$ + If ./configure was successful and make failed for some reason, continue + to read this page. If you can not find a solution to your problem, feel + free to post a help request at our Krusader_Forum. + 11. If everything is correct, you can now install Krusader. + $ su -c 'make install' + You will be asked to enter your root password. + 12. If you install a CVS or beta version and if Krusader was previously + installed on your computer, then you should delete the krusaderui.rc file + in your home directory to activate the new menu entries $ rm ~/.kde/ + share/apps/krusader/krusaderui.rc , click here for more info. + 13. Now you can start Krusader. + 14. Optional step: Cleaning up to save disk space. Note: All compiled files + created with the makecommand will be deleted. + $ make clean + 15. If you ever want to uninstall Krusader, use + $ su -c 'make uninstall' + You will be asked to enter your root password. +If you followed the installation procedure and still encountered problems +installing Krusader, refer to FAQ. If the problem persists, use the help +request to ask for help. +Installing on Mac OS-X +**** Note **** +Since June 2006 Krusader is added into the Krusader_finkproject.org_repository +Please check this url for the latest information about the Mac OS-X port, +please read the fink documentation for more information, all information below +could be outdated, though they should still work :) From now on the port is +maintained by Catalin_Hritcu. +Krusader is ported to Mac OS thanks the fink-project and Jonas Bhr and Bodo +Tasche . Unfortunately the only *stable* kdelib-binaries which fink has to +offer is currenly 3.1.4 which means you need to use Krusader-1.40 . +Unfortunately the Mac OS X Krusader port does not have the same power as in a +native Linux-KDE environment. To run Krusader you need also X11, which doesn't +interact with the rest of the Mac OS desktop. We hope that Qt™4/KDE4 +will solve most of these problems. If you want a more recent Krusader version +you need to compile KDE. With fink it is rather easy but it takes some CPU +cycles. +Installation Instructions for Krusader-1.40 + 1. Download and install fink with the KDE3.1 binaries provided by fink and + read the documentation. + 2. Extract the krusader-1.40.fink.darwin-ppc.tar.bz2 package to /sw/fink/ + dist/local/main/ Only root can write here. You may have to create 'local' + and 'main'. + 3. Run as root: fink install krusader +Follow these instructions if you wish to compile more source code or use a more +recent version of Krusader: + 1. Install Apple_X11 + 2. Install the Apple_X11_SDK developer-tools with X11 headers (gcc is + included) + 3. Install the fink-base + 4. Compile kdelibs 3.4.1 or higher (fink provides the necessary .info files) + 5. Compile the Krusader-tarball or follow steps 2 and 3 of the previous + section if a recent Krusader-package e.g. krusader-1.70.0.fink.darwin- + ppc.tar.bz2 is available +Follow these instructions if you wish to compile Krusader-1.80.0 : + 1. Install Apple_X11 + 2. nstall fink and enable_fink_unstable. + 3. Compile and install the KDE bundle in fink: fink install bundle-kde-ssl + (if you get “no package found” the previous step did not + succeed). + 4. Use krusader.info (provided in the Krusader-sourcecode) and then copy to + /sw/fink/dists/local/main/finkinfo . + 5. Compile and install Krusader in fink: fink install krusader + 6. Start X11 (startx) and in xterm run Krusader +Thanks to Catalin_Hritcu for these install instructions. +Starting Krusader +Type krusader (lower case) at a command prompt. You can create shortcut on your +desktop or create an entry in the (KDE) menu. Read the previous page and the +FAQ if Krusader doesn't start. +When Krusader is started from the command line, various options can be +specified to modify its behavior. + $ krusader + WARNING: Mt.Man: Born, looking around to get familiar. foo +**** Note **** +Do not worry about the messages you get in the Konsole. These messages are log +messages that can be used for debugging Krusader. +You can also use Alt+F2 to open the Run Command dialog box, type krusader +(lower case) and press Enter or click on the Run button. +If Krusader is installed by an RPM or DEB package then usually Krusader can be +started from the K menu. e.g. on Mandrake™-Linux 10.0 click on the [K] +icon button and choose Applications->File tools->Krusader. +Command-line options: + --left + start left panel at + --right + start right panel at + --left ,, + start left panel at ,,, with tabs. + --profile + load a panel-profile on startup (this overrides the default_startup + profile). +Examples: +$ krusader --left= --right= +$ krusader --left=/mnt/cdrom --right=ftp://downloads@myserver.net +$ krusader --left=, --right=,, +$ krusader--profile +$ krusader --profile ftp-managment +The standard Qt™ and KDE command-line options are available, and can be +listed by entering krusader --help. +Other command-line options: + --help-qt + List Qt-specific options + --help-kde + List KDE-specific options + --help-all + List all options + --author + Show the authors names + -v,--version + Show the version number + --license + Show license information +Configuring Krusader +When you run Krusader for the first time, the Krusader configuration module +Konfigurator will show up and allow you to configure Krusader as well as detect +installed packers and tools. You can always run Konfigurator again from the +Settings_menu. +Making Krusader the default file manager +To make Krusader the default file manager in Gnome, click_here for more +information. +To make Krusader the default file manager in KDE, click_here for more +information. + +The following text are generic installation instructions for KDE applications +(normally you will not need it). The following text is not written by us, +but is automaticly generated by Kdevelop. + + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Type `make install' to install the programs and any data files and + documentation. + + 4. You can remove the program binaries and object files from the + source code directory by typing `make clean'. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/Krusader.kdevelop b/Krusader.kdevelop new file mode 100644 index 0000000..a2ace8d --- /dev/null +++ b/Krusader.kdevelop @@ -0,0 +1,213 @@ + + + + Shie Erlich and Rafi Yanai + + 1.20 + KDevAutoProject + C++ + + kdevabbrev + kdevsnippet + kdevdoxygen + kdevdistpart + kdevvalgrind + + . + false + + + kdevcvsservice + Krusader + + + + krusader/krusader + default + + + krusader/krusader + + false + + true + executable + / + + + + + + + true + 2 + false + + 0 + + + + + + + -DQT_THREAD_SUPPORT + + kdevgccoptions + kdevgppoptions + kdevpgf77options + + -DQT_THREAD_SUPPORT + + + -DQT_THREAD_SUPPORT + + + + + + + + libtool + + + true + false + false + true + + + + + + false + true + 10 + + + + + + + + + + + + + html/ + html/ + + + + + + + + + + + false + + + .h + .cpp + true + + + + true + 2 + + + + + + + + false + false + + + true + + true + + + + -f -z3 + + -dP + + -f + -u3 -p + + + -C -d -P + + + + true + true + true + true + true + true + 250 + 400 + true + 250 + false + 0 + true + true + false + std=_GLIBCXX_STD;__gnu_cxx=std + true + false + false + false + true + true + true + false + .; + + + + + set + m_,_ + theValue + true + true + + + false + 3 + 3 + /usr/share/qt3 + EmbeddedKDevDesigner + /usr/bin/qmake-qt3 + + + + + + true + true + true + true + -C + + + + + + + + + + + + + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..58950c3 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,27 @@ +####### kdevelop will overwrite this part!!! (begin)########## + +# the condition for this is found in configure.in.in +if with_tar +TARDIR = tar +endif + +SUBDIRS = krusader po pics doc krArc iso virt $(TARDIR) + +EXTRA_DIST = krusader.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README TODO krusader.lsm krusader.spec + +####### kdevelop will overwrite this part!!! (end)############ +# not a GNU package. You can remove this line, if +# have all needed files, that a GNU package needs +AUTOMAKE_OPTIONS = foreign + +MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files + +package-messages: + $(MAKE) -f admin/Makefile.common package-messages + $(MAKE) -C po merge + +dist-hook: + cd $(top_distdir) && perl admin/am_edit -padmin + cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs + +include admin/deps.am diff --git a/Makefile.cvs b/Makefile.cvs new file mode 100644 index 0000000..be59a86 --- /dev/null +++ b/Makefile.cvs @@ -0,0 +1,14 @@ +all: + @echo "This Makefile is only for the CVS repository" + @echo "This will be deleted before making the distribution" + @echo "" + @if test ! -d admin; then \ + echo "Please recheckout this module!" ;\ + echo "for cvs: use checkout once and after that update again" ;\ + echo "for cvsup: checkout kde-common from cvsup and" ;\ + echo " link kde-common/admin to ./admin" ;\ + exit 1 ;\ + fi + $(MAKE) -f admin/Makefile.common cvs + +.SILENT: diff --git a/Makefile.dist b/Makefile.dist new file mode 100644 index 0000000..be59a86 --- /dev/null +++ b/Makefile.dist @@ -0,0 +1,14 @@ +all: + @echo "This Makefile is only for the CVS repository" + @echo "This will be deleted before making the distribution" + @echo "" + @if test ! -d admin; then \ + echo "Please recheckout this module!" ;\ + echo "for cvs: use checkout once and after that update again" ;\ + echo "for cvsup: checkout kde-common from cvsup and" ;\ + echo " link kde-common/admin to ./admin" ;\ + exit 1 ;\ + fi + $(MAKE) -f admin/Makefile.common cvs + +.SILENT: diff --git a/README b/README new file mode 100644 index 0000000..869bfe5 --- /dev/null +++ b/README @@ -0,0 +1,405 @@ +Krusader 1.90.0 "Power Stone" +================================= +Well, here we are! + +The Krew is finally bringing you the _last_ release of Krusader the +file manager for the KDE 3.x series. In this release you can expect +many new Krusader Extensions sent in by our users + bugfixes. +We would like to thank all of the community for keeping us sharp all these +years throughout our release cycles. + +IMPORTANT: Crashes in Krusader caused by Qt 3.3.5 +------------------------------------------------------------------------ +We've been getting a lot of emails and bug reports regarding random +crashes in Krusader, especially during some file operations (copy/move +etc.). These crashes are related to Qt 3.3.5 and NOT Krusader. +It seems that Qt 3.3.5 introduced a serious bug which is now causing +random crashes in many KDE applications including Konqueror. You can +google for it to find out more. + +As far as we know, Debian and SUSE already posted new Qt binaries that +fix the problem, and Gentoo has masked Qt 3.3.5 completely. +As for now, you either need Qt 3.3.4 or a fixed Qt 3.3.5, depending on +your distribution. For more information is available on our website at +http://krusader.sourceforge.net/phpBB/viewtopic.php?t=1407 +------------------------------------------------------------------------ + +Krusader 1.90.0 contains plenty of changes, bug fixes and updates +in response to reports and requests from our users. +Special thanks goes to Václav Juza for testing, debugging and general help! + + +The highlights are: + +Basically, Krusader-1.90.0 = Krusader-1.80.0 + bugfixes + +Krusader Extensions sent in by our loyal users. Thanks! ++ Improvements: + - GCC 4.3 compatibility + - KDE 3.2 through KDE 3.5 compatibility + - bugfixes ++ Many Krusader Extensions: + - Keymaps, use keybindings of other commanders or customized keybindings! + - Colormaps, use colors of other commanders or customized colors! + - Useractions, create actions for your own needs! + - Javascript useractions, create actions with additional javascript power + for your own needs! ++ Krusader Extensions highlights: + + Color schemes: Total Commander, Dos Navigator, Midnight Commander, bash + + Keymap: Midnight Commander + + Useractions: + - Search and Replace in file + - Split large mp3 files + - Copy as root + - Archive foo to dir + - lzma and tar.lzma archive support + - tar.7z archive support + - ar (.a, .deb,...) archive support + - Unpack multiple zip archives + - kgpg: encrypt, decrypt, sign, verify signature + - .uue file support (uuencode and uudecode) + + Javascript useractions: + - Recode files using iconv or GNU recode + - Mount as root + - Select from file + - Calculator ++ Check the changelog for a complete overview of changes and Extensions. + +Krusader 1.80.0 contained many changes, bug fixes and updates +in response to reports and requests from our users. The highlights are: + +- Full support for ACL permissions like properties, preserve + attributes, synchronizer and others +- Many terminal emulator enhancements bringing new functions, new + usages and a new look +- Many improvements of the UserAction system +- Countless usability enhancements, especially in Konfigurator and the + improved, reordered menubar +- Comparing in the synchronizer interface and parallel threading over + slower servers +- Atomic extensions and ability to rename the filename, without extension +- Numerous archive enhancements like handling packing and unpacking in + the background, encryption support, multiple volume archives, compression + level +- Complete list of changes and enhancements is in the ChangeLog +- Next cycle with all our energy and efforts begins for Krusader on KDE4: + +Changes since Krusader 1.80.0-beta2 +- Many bugfixes +- Translation updates + +Changes since Krusader 1.80.0-beta1 (but not limited to): + +- Added the long-awaited brief view! +- A new GUI to configure the atomic extensions introduced in beta1 +- ACL and documentation related compile fixes +- More usability and feature enhancements in the synchronizer, search + and locate modules +- Bugfixes all over the place + +Enjoy! +Krusader Krew + +Notice: if you've got bugs to report, please do so using Krusader's + website, and not with KDE's bugzilla (bugs.kde.org). + + as always, enjoy + Krusader Krew. + + http://www.krusader.org + + ++----------------------------------------------------------------------+ +| To learn what's new, read the ChangeLog file. | +| For bug reports, fixes, patches and comments: please read the FAQ | +| section of the Krusader Handbook. | +| You can reach us by mail [krusader * users sourceforge net] | +| or drop us a note in our Krusader forum. | ++----------------------------------------------------------------------+ + + +Installation +============ +Check the environment variables KDEDIR - QTDIR. + +Unpack the tarball and go to the Krusader source directory. +If you have downloaded from CVS you will have to run the following +command to create the "./configure" script: +$ make -f Makefile.cvs + +Installation procedure: +$ ./configure +$ make +$ su -c 'make install' + +When you install a Krusader cvs or beta version and if Krusader was +previously installed on your computer, there is a possibility that you +will have to update the krusaderui.rc file. please read the FAQ for more +info. + + +Need more help? +For detailed installation instructions, please read the INSTALL and FAQ +file. Or read it online at: +http://krusader.sourceforge.net/handbook/installation.html +The FAQ are available at: +http://krusader.sourceforge.net/handbook/faq.html + +Mac OS-X port +------------- +There is a Mac OS-X port with the help of finkproject.org +http://pdb.finkproject.org/pdb/package.php/krusader + + +To checkout the Krusader KDE3 version from cvs: +=============================================== +$ cvs -d:pserver:anonymous@krusader.cvs.sourceforge.net:/cvsroot/krusader login +$ cvs -z3 -d:pserver:anonymous@krusader.cvs.sourceforge.net:/cvsroot/krusader \ +co krusader_kde3 + +(Note: updates from within the modules directory do not need the -d +parameter) + +Or download the nightly tarball from: +http://krusader.sourceforge.net/cvs.php + +Klik Krusader +============= +If you want to find out if Krusader is right for you and don't want to +go through the whole installation-compilation process. Thanks to the +guys at http://klik.atekon.de/ this is possible. After installing the +klik client, Krusader is just one mouse click away! + +klik://krusader = the krusader release in Debian Stable +klik://krusader-latest = latest available krusader-stable +klik://krusader-cvs = snapshot of krusader-cvs + +The latter 2 klik packages are provided by the Krusader Krew. + + +Krusader Handbook +================= +Documentation, detailed install procedure, FAQ, ... +The Krusader Handbook is available in the Help menu of Krusader. +Or read it online at: +http://krusader.sourceforge.net/handbook/index.html + +Help Krusader +============= +http://krusader.sourceforge.net/help.php +Here you get a chance to contribute to the Krusader project. From time +to time we'll post things that need to be done, but can't be done by us. +If you feel you can help, click the appropriate link on the website. +All help is welcome. +Thanks! + +GUI-Translators +--------------- +Krusader is currently available in about 27 languages: +Some of these translations can use an update, please read the next url +for more information. +http://krusader.sourceforge.net/i18n.php + +Documentation Translators +------------------------- +Recently the Krusader documentation is made translatable! +Please contact Frank if you want to translate the documentation. + +Documentation +------------- +Help is needed (we are looking for documentation writers) for keeping +the Krusader documentation up to date. +Please contact Frank. + +FAQ +--- +If you have a question for the FAQ. +Please contact Frank. + +Extensions +---------- +Krusader supports a wide varity of extensions. We are always glad to see +someone creating something new. Please upload your extensions at +kde-files.org. +http://www.kde-files.org/index.php?xcontentmode=660x661x662x663 + +Feature Requests +---------------- +Discussions about new features for future Krusader versions. Please +visit our "New Features Requests" forum. + +Packagers +--------- +We are always in need of packagers. +Please contact Dirk Eschler. + +Donations +--------- +http://sourceforge.net/project/project_donations.php?group_id=6488 +Honestly, we didn't consider donations, until users asked us for a way +to donate to the project. Developing Krusader can be a full time job at +times, and even though it is very time consuming, we all enjoy it, and +want to see the project become even better. Donations for this project +will be used for further development of Krusader, be it by purchasing +hardware, or promoting of the project. + +Spread the Word +--------------- +If you like Krusader, let people know! Write articles and reviews for +internet or print publications. Encourage your friends to give Krusader +a try. Participate in forums to help others in the community. +Help us spreading the word about Krusader! + + +For GUI Translators +=================== +Translation procedure +--------------------- +Before we release a stable version of Krusader, we bring out at least +one beta version. From that moment on there is a feature freeze and only +bugs will be fixed. This means that translators can update their +translations for the coming stable. Normally, all the Krusader +translators will receive an e-mail from Dirk Eschler, to invite you for +translating Krusader. We will update all foo.po files against +krusader.pot just before the beta will be released, so that you will +only have to edit the new foo.po file with Kbabel. This way you don't +have to worry anymore about how foo.po must be updated. In the past some +translators updated foo.po in a wrong way, so they translated obsolete +messages, we want to prevent this, of course. + +Use i18n_status and ViewCVS to see the live translation status of +Krusader! +http://krusader.sourceforge.net/i18n.php +http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/krusader/krusader_kde3/po/ +The latest news about the Krusader translations will be in the LATEST +NEWS section of the "Krusader translation howto". + +New translations +---------------- +If your native language is not listed in VIEWCVS, you will have to +translate Krusader for your language. Dirk Eschler is the Krusader +i18n coordinator, please contact him if you intend to translate Krusader +to your native language. + +Krusader translation howto +-------------------------- +We have a very detailed "Krusader Translation HowTo" if you need some +help. The latest news about the Krusader translations is in the +LATEST NEWS section. This allows that even beginners or non-programmers +can translate Krusader to their native language. Please have a look at +http://krusader.sourceforge.net/phpBB/viewtopic.php?t=389 + +Quickstart procedure for translators updating existing translations +------------------------------------------------------------------- +1. +Run KDE in your native language. + +2. +Checkout the latest available version of Krusader from CVS. Or if you +are not familiar with CVS, download the latest Krusader CVS snapshot +(nightly tarball) from http://krusader.sourceforge.net/cvs.php, and run: +$ make -f Makefile.cvs +$ ./configure +$ make +$ su -c "make install" + +3. +Translate your foo.po with Kbabel. +Note: We will update all foo.po files just before the beta will be +released. + +4. +Compile foo.po, for error checking (from the po directory): +$ msgfmt foo.po --statistics -c -v --output-file=foo.gmo +If it reports "xx fuzzy translations" or "xx untranslated messages", +please return to step 3. + +5. +Run the commands of step 2 to reinstall the new or updated translation. +Run Krusader and test your native translations. +If necessary fix the foo.po file (redo steps 3-5). + +6. +If everything is ok, send the updated translation to Dirk Eschler. + + +URL's +===== +- Homepage + http://www.krusader.org + http://krusader.sourceforge.net +- Installation + http://www.krusader.org/handbook/installation.html +- FAQ + http://www.krusader.org/handbook/faq.html +- Documentation + http://www.krusader.org/handbook/index.html +- Todolist + http://www.krusader.org/phpBB/viewforum.php?f=10 +- Buglist + http://sourceforge.net/tracker/?atid=106488&group_id=6488&func=browse +- Forum + http://www.krusader.org/phpBB/index.php +- ChangeLog + http://www.krusader.org/text.php?t=cvs.changelog +- CVSNEWS + http://www.krusader.org/text.php?t=cvs.news +- Mailing lists + http://www.krusader.org/lists.php +- Donations + http://sourceforge.net/project/project_donations.php?group_id=6488 +- Translations + http://www.krusader.org/i18n.php +- Help Krusader + http://www.krusader.org/help.php +- Krusader Extensions + http://www.kde-files.org/index.php?xcontentmode=660x661x662x663 +- Krusader meets OpenUsability + http://openusability.org/projects/krusader/ +- Download pages + http://www.krusader.org/down.php + http://sourceforge.net/project/showfiles.php?group_id=6488 + + +The Krusader Krew +================== +Krusader is developed by a dedicated team of individuals, known as the +Krusader Krew: +- Shie Erlich, author + [erlich * users sourceforge net] +- Rafi Yanai, author + [yanai * users sourceforge net] +- Dirk Eschler, webmaster and i18n coordinator + [deschler * users sourceforge net] +- Csaba Karai, developer + [ckarai * users sourceforge net] +- Heiner Eichmann, developer + [h.eichmann * gmx de] +- Jonas Baehr, developer + [jonas baehr * users web de] +- Frank Schoolmeesters, documentation and marketing coordinator + [frank_schoolmeesters * yahoo com] +- Richard Holt, documentation + [richard holt * gmail com] +- Matej Urbancic, Marketing & Product Research + [matej * amis net] + + +Package Description +=================== +Krusader is an advanced, twin-panel (commander-style) file-manager for +KDE and other desktops + +Krusader is a simple, easy, powerful, twin-panel file manager +(commander-style) for KDE and other *nix desktops, similar to Midnight +or Total Commander. It provides all the file management features you +could possibly want. + +Plus: extensive Archive handling, mounted Filesystem support, FTP, +advanced Search module, viewer/Editor, directory Synchronization, +file content Comparisons, powerful batch Renaming and much, much more. + +It supports a wide variety of archive formats and can handle other KIO +slaves such as smb or fish. It is (almost) completely customizable, very +user friendly, fast and looks great on your desktop! + +You should give it a try. diff --git a/TODO b/TODO new file mode 100644 index 0000000..265eef4 --- /dev/null +++ b/TODO @@ -0,0 +1,20 @@ +=====> Krusader II <======= +The online TODO list can be found on: +http://krusader.sourceforge.net/phpBB/viewforum.php?f=10 + +We give our users the chance to influence Krusader's development by voting for +new features listed on the TODO List. +Registered users can either vote directly through the forum, +or follow the link on our website - http://krusader.sourceforge.net/todo.php +here you will also find a nice rating based on the given votes. +The rules are quite easy: If you don't care about a feature, don't vote. + + +BUGS +==== +The online BUG list can be found on: +http://sourceforge.net/tracker/?atid=106488&group_id=6488&func=browse + +When you like to report a bug, +please read first the next URL for further instructions: +http://krusader.sourceforge.net/handbook/faq_general.html#faqg_bug_report \ No newline at end of file diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..663a690 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,11919 @@ +## -*- autoconf -*- + +dnl This file is part of the KDE libraries/packages +dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu) +dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org) + +dnl This file is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Library General Public +dnl License as published by the Free Software Foundation; either +dnl version 2 of the License, or (at your option) any later version. + +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Library General Public License for more details. + +dnl You should have received a copy of the GNU Library General Public License +dnl along with this library; see the file COPYING.LIB. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +dnl Boston, MA 02110-1301, USA. + +dnl IMPORTANT NOTE: +dnl Please do not modify this file unless you expect your modifications to be +dnl carried into every other module in the repository. +dnl +dnl Single-module modifications are best placed in configure.in for kdelibs +dnl and kdebase or configure.in.in if present. + +# KDE_PATH_X_DIRECT +dnl Internal subroutine of AC_PATH_X. +dnl Set ac_x_includes and/or ac_x_libraries. +AC_DEFUN([KDE_PATH_X_DIRECT], +[ +AC_REQUIRE([KDE_CHECK_LIB64]) + +if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. +AC_TRY_CPP([#include <$x_direct_test_include>], +[# We can compile using X headers with no special include directory. +ac_x_includes=], +[# Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done]) +fi # $ac_x_includes = NO + +if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +AC_TRY_LINK([#include ], [${x_direct_test_function}(1)], +[LIBS="$ac_save_LIBS" +# We can link X programs with no special library path. +ac_x_libraries=], +[LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \ + /usr/X11/lib${kdelibsuff} \ + /usr/X11R6/lib${kdelibsuff} \ + /usr/X11R5/lib${kdelibsuff} \ + /usr/X11R4/lib${kdelibsuff} \ + \ + /usr/lib${kdelibsuff}/X11 \ + /usr/lib${kdelibsuff}/X11R6 \ + /usr/lib${kdelibsuff}/X11R5 \ + /usr/lib${kdelibsuff}/X11R4 \ + \ + /usr/local/X11/lib${kdelibsuff} \ + /usr/local/X11R6/lib${kdelibsuff} \ + /usr/local/X11R5/lib${kdelibsuff} \ + /usr/local/X11R4/lib${kdelibsuff} \ + \ + /usr/local/lib${kdelibsuff}/X11 \ + /usr/local/lib${kdelibsuff}/X11R6 \ + /usr/local/lib${kdelibsuff}/X11R5 \ + /usr/local/lib${kdelibsuff}/X11R4 \ + \ + /usr/X386/lib${kdelibsuff} \ + /usr/x386/lib${kdelibsuff} \ + /usr/XFree86/lib${kdelibsuff}/X11 \ + \ + /usr/lib${kdelibsuff} \ + /usr/local/lib${kdelibsuff} \ + /usr/unsupported/lib${kdelibsuff} \ + /usr/athena/lib${kdelibsuff} \ + /usr/local/x11r5/lib${kdelibsuff} \ + /usr/lpp/Xamples/lib${kdelibsuff} \ + /lib/usr/lib${kdelibsuff}/X11 \ + \ + /usr/openwin/lib${kdelibsuff} \ + /usr/openwin/share/lib${kdelibsuff} \ + ; \ +do +dnl Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done]) +fi # $ac_x_libraries = NO +]) + + +dnl ------------------------------------------------------------------------ +dnl Find a file (or one of more files in a list of dirs) +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([AC_FIND_FILE], +[ +$3=NO +for i in $2; +do + for j in $1; + do + echo "configure: __oline__: $i/$j" >&AC_FD_CC + if test -r "$i/$j"; then + echo "taking that" >&AC_FD_CC + $3=$i + break 2 + fi + done +done +]) + +dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs, +dnl if-not-found, test-parameter, prepend-path) +dnl +dnl Look for program-name in list-of-dirs+$PATH. +dnl If prepend-path is set, look in $PATH+list-of-dirs instead. +dnl If found, $variable-name is set. If not, if-not-found is evaluated. +dnl test-parameter: if set, the program is executed with this arg, +dnl and only a successful exit code is required. +AC_DEFUN([KDE_FIND_PATH], +[ + AC_MSG_CHECKING([for $1]) + if test -n "$$2"; then + kde_cv_path="$$2"; + else + kde_cache=`echo $1 | sed 'y%./+-%__p_%'` + + AC_CACHE_VAL(kde_cv_path_$kde_cache, + [ + kde_cv_path="NONE" + kde_save_IFS=$IFS + IFS=':' + dirs="" + for dir in $PATH; do + dirs="$dirs $dir" + done + if test -z "$6"; then dnl Append dirs in PATH (default) + dirs="$3 $dirs" + else dnl Prepend dirs in PATH (if 6th arg is set) + dirs="$dirs $3" + fi + IFS=$kde_save_IFS + + for dir in $dirs; do + if test -x "$dir/$1"; then + if test -n "$5" + then + evalstr="$dir/$1 $5 2>&1 " + if eval $evalstr; then + kde_cv_path="$dir/$1" + break + fi + else + kde_cv_path="$dir/$1" + break + fi + fi + done + + eval "kde_cv_path_$kde_cache=$kde_cv_path" + + ]) + + eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\"" + + fi + + if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then + AC_MSG_RESULT(not found) + $4 + else + AC_MSG_RESULT($kde_cv_path) + $2=$kde_cv_path + + fi +]) + +AC_DEFUN([KDE_MOC_ERROR_MESSAGE], +[ + AC_MSG_ERROR([No Qt meta object compiler (moc) found! +Please check whether you installed Qt correctly. +You need to have a running moc binary. +configure tried to run $ac_cv_path_moc and the test didn't +succeed. If configure shouldn't have tried this one, set +the environment variable MOC to the right one before running +configure. +]) +]) + +AC_DEFUN([KDE_UIC_ERROR_MESSAGE], +[ + AC_MSG_WARN([No Qt ui compiler (uic) found! +Please check whether you installed Qt correctly. +You need to have a running uic binary. +configure tried to run $ac_cv_path_uic and the test didn't +succeed. If configure shouldn't have tried this one, set +the environment variable UIC to the right one before running +configure. +]) +]) + + +AC_DEFUN([KDE_CHECK_UIC_FLAG], +[ + AC_MSG_CHECKING([whether uic supports -$1 ]) + kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'` + AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache, + [ + cat >conftest.ui < +EOT + ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null" + if AC_TRY_EVAL(ac_uic_testrun); then + eval "kde_cv_prog_uic_$kde_cache=yes" + else + eval "kde_cv_prog_uic_$kde_cache=no" + fi + rm -f conftest* + ]) + + if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then + AC_MSG_RESULT([yes]) + : + $3 + else + AC_MSG_RESULT([no]) + : + $4 + fi +]) + + +dnl ------------------------------------------------------------------------ +dnl Find the meta object compiler and the ui compiler in the PATH, +dnl in $QTDIR/bin, and some more usual places +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([AC_PATH_QT_MOC_UIC], +[ + AC_REQUIRE([KDE_CHECK_PERL]) + qt_bindirs="" + for dir in $kde_qt_dirs; do + qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc" + done + qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin" + if test ! "$ac_qt_bindir" = "NO"; then + qt_bindirs="$ac_qt_bindir $qt_bindirs" + fi + + KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE]) + if test -z "$UIC_NOT_NEEDED"; then + KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""]) + if test -z "$UIC_PATH" ; then + KDE_UIC_ERROR_MESSAGE + exit 1 + else + UIC=$UIC_PATH + + if test $kde_qtver = 3; then + KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no) + KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no) + + if test x$ac_uic_supports_libpath = xyes; then + UIC="$UIC -L \$(kde_widgetdir)" + fi + if test x$ac_uic_supports_nounload = xyes; then + UIC="$UIC -nounload" + fi + fi + fi + else + UIC="echo uic not available: " + fi + + AC_SUBST(MOC) + AC_SUBST(UIC) + + UIC_TR="i18n" + if test $kde_qtver = 3; then + UIC_TR="tr2i18n" + fi + + AC_SUBST(UIC_TR) +]) + +AC_DEFUN([KDE_1_CHECK_PATHS], +[ + KDE_1_CHECK_PATH_HEADERS + + KDE_TEST_RPATH= + + if test -n "$USE_RPATH"; then + + if test -n "$kde_libraries"; then + KDE_TEST_RPATH="-R $kde_libraries" + fi + + if test -n "$qt_libraries"; then + KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries" + fi + + if test -n "$x_libraries"; then + KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries" + fi + + KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH" + fi + +AC_MSG_CHECKING([for KDE libraries installed]) +ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5' + +if AC_TRY_EVAL(ac_link) && test -s conftest; then + AC_MSG_RESULT(yes) +else + AC_MSG_ERROR([your system fails at linking a small KDE application! +Check, if your compiler is installed correctly and if you have used the +same compiler to compile Qt and kdelibs as you did use now. +For more details about this problem, look at the end of config.log.]) +fi + +if eval `KDEDIR= ./conftest 2>&5`; then + kde_result=done +else + kde_result=problems +fi + +KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log +kde_have_all_paths=yes + +KDE_SET_PATHS($kde_result) + +]) + +AC_DEFUN([KDE_SET_PATHS], +[ + kde_cv_all_paths="kde_have_all_paths=\"yes\" \ + kde_htmldir=\"$kde_htmldir\" \ + kde_appsdir=\"$kde_appsdir\" \ + kde_icondir=\"$kde_icondir\" \ + kde_sounddir=\"$kde_sounddir\" \ + kde_datadir=\"$kde_datadir\" \ + kde_locale=\"$kde_locale\" \ + kde_cgidir=\"$kde_cgidir\" \ + kde_confdir=\"$kde_confdir\" \ + kde_kcfgdir=\"$kde_kcfgdir\" \ + kde_mimedir=\"$kde_mimedir\" \ + kde_toolbardir=\"$kde_toolbardir\" \ + kde_wallpaperdir=\"$kde_wallpaperdir\" \ + kde_templatesdir=\"$kde_templatesdir\" \ + kde_bindir=\"$kde_bindir\" \ + kde_servicesdir=\"$kde_servicesdir\" \ + kde_servicetypesdir=\"$kde_servicetypesdir\" \ + kde_moduledir=\"$kde_moduledir\" \ + kde_styledir=\"$kde_styledir\" \ + kde_widgetdir=\"$kde_widgetdir\" \ + xdg_appsdir=\"$xdg_appsdir\" \ + xdg_menudir=\"$xdg_menudir\" \ + xdg_directorydir=\"$xdg_directorydir\" \ + kde_result=$1" +]) + +AC_DEFUN([KDE_SET_DEFAULT_PATHS], +[ +if test "$1" = "default"; then + + if test -z "$kde_htmldir"; then + kde_htmldir='\${datadir}/doc/HTML' + fi + if test -z "$kde_appsdir"; then + kde_appsdir='\${datadir}/applnk' + fi + if test -z "$kde_icondir"; then + kde_icondir='\${datadir}/icons' + fi + if test -z "$kde_sounddir"; then + kde_sounddir='\${datadir}/sounds' + fi + if test -z "$kde_datadir"; then + kde_datadir='\${datadir}/apps' + fi + if test -z "$kde_locale"; then + kde_locale='\${datadir}/locale' + fi + if test -z "$kde_cgidir"; then + kde_cgidir='\${exec_prefix}/cgi-bin' + fi + if test -z "$kde_confdir"; then + kde_confdir='\${datadir}/config' + fi + if test -z "$kde_kcfgdir"; then + kde_kcfgdir='\${datadir}/config.kcfg' + fi + if test -z "$kde_mimedir"; then + kde_mimedir='\${datadir}/mimelnk' + fi + if test -z "$kde_toolbardir"; then + kde_toolbardir='\${datadir}/toolbar' + fi + if test -z "$kde_wallpaperdir"; then + kde_wallpaperdir='\${datadir}/wallpapers' + fi + if test -z "$kde_templatesdir"; then + kde_templatesdir='\${datadir}/templates' + fi + if test -z "$kde_bindir"; then + kde_bindir='\${exec_prefix}/bin' + fi + if test -z "$kde_servicesdir"; then + kde_servicesdir='\${datadir}/services' + fi + if test -z "$kde_servicetypesdir"; then + kde_servicetypesdir='\${datadir}/servicetypes' + fi + if test -z "$kde_moduledir"; then + if test "$kde_qtver" = "2"; then + kde_moduledir='\${libdir}/kde2' + else + kde_moduledir='\${libdir}/kde3' + fi + fi + if test -z "$kde_styledir"; then + kde_styledir='\${libdir}/kde3/plugins/styles' + fi + if test -z "$kde_widgetdir"; then + kde_widgetdir='\${libdir}/kde3/plugins/designer' + fi + if test -z "$xdg_appsdir"; then + xdg_appsdir='\${datadir}/applications/kde' + fi + if test -z "$xdg_menudir"; then + xdg_menudir='\${sysconfdir}/xdg/menus' + fi + if test -z "$xdg_directorydir"; then + xdg_directorydir='\${datadir}/desktop-directories' + fi + + KDE_SET_PATHS(defaults) + +else + + if test $kde_qtver = 1; then + AC_MSG_RESULT([compiling]) + KDE_1_CHECK_PATHS + else + AC_MSG_ERROR([path checking not yet supported for KDE 2]) + fi + +fi +]) + +AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS], +[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" || + test -z "$kde_icondir" || test -z "$kde_sounddir" || + test -z "$kde_datadir" || test -z "$kde_locale" || + test -z "$kde_cgidir" || test -z "$kde_confdir" || + test -z "$kde_kcfgdir" || + test -z "$kde_mimedir" || test -z "$kde_toolbardir" || + test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" || + test -z "$kde_bindir" || test -z "$kde_servicesdir" || + test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" || + test -z "$kde_styledir" || test -z "kde_widgetdir" || + test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" || + test "x$kde_have_all_paths" != "xyes"; then + kde_have_all_paths=no + fi +]) + +AC_DEFUN([KDE_MISSING_PROG_ERROR], +[ + AC_MSG_ERROR([The important program $1 was not found! +Please check whether you installed KDE correctly. +]) +]) + +AC_DEFUN([KDE_MISSING_ARTS_ERROR], +[ + AC_MSG_ERROR([The important program $1 was not found! +Please check whether you installed aRts correctly or use +--without-arts to compile without aRts support (this will remove functionality). +]) +]) + +AC_DEFUN([KDE_SET_DEFAULT_BINDIRS], +[ + kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin" + test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs" + if test -n "$KDEDIRS"; then + kde_save_IFS=$IFS + IFS=: + for dir in $KDEDIRS; do + kde_default_bindirs="$dir/bin $kde_default_bindirs " + done + IFS=$kde_save_IFS + fi +]) + +AC_DEFUN([KDE_SUBST_PROGRAMS], +[ + AC_ARG_WITH(arts, + AC_HELP_STRING([--without-arts],[build without aRts [default=no]]), + [build_arts=$withval], + [build_arts=yes] + ) + AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no") + if test "$build_arts" = "no"; then + AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts]) + fi + + KDE_SET_DEFAULT_BINDIRS + kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs" + KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)]) + KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)]) + if test "$build_arts" '!=' "no"; then + KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)]) + KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)]) + fi + KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs]) + + kde32ornewer=1 + kde33ornewer=1 + if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then + kde32ornewer= + kde33ornewer= + else + if test "$kde_qtver" = "3"; then + if test "$kde_qtsubver" -le 1; then + kde32ornewer= + fi + if test "$kde_qtsubver" -le 2; then + kde33ornewer= + fi + if test "$KDECONFIG" != "compiled"; then + if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then + kde33ornewer= + fi + fi + fi + fi + + if test -n "$kde32ornewer"; then + KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)]) + KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)]) + fi + if test -n "$kde33ornewer"; then + KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)]) + AC_SUBST(MAKEKDEWIDGETS) + fi + KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""]) + + if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then + kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share" + test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs" + AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET) + if test "$KDE_XSL_STYLESHEET" = "NO"; then + KDE_XSL_STYLESHEET="" + else + KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl" + fi + fi + + DCOP_DEPENDENCIES='$(DCOPIDL)' + if test -n "$kde32ornewer"; then + KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)' + DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)' + AC_SUBST(KCONFIG_COMPILER) + AC_SUBST(KCFG_DEPENDENCIES) + AC_SUBST(DCOPIDLNG) + fi + AC_SUBST(DCOPIDL) + AC_SUBST(DCOPIDL2CPP) + AC_SUBST(DCOP_DEPENDENCIES) + AC_SUBST(MCOPIDL) + AC_SUBST(ARTSCCONFIG) + AC_SUBST(MEINPROC) + AC_SUBST(KDE_XSL_STYLESHEET) + AC_SUBST(XMLLINT) +])dnl + +AC_DEFUN([AC_CREATE_KFSSTND], +[ +AC_REQUIRE([AC_CHECK_RPATH]) + +AC_MSG_CHECKING([for KDE paths]) +kde_result="" +kde_cached_paths=yes +AC_CACHE_VAL(kde_cv_all_paths, +[ + KDE_SET_DEFAULT_PATHS($1) + kde_cached_paths=no +]) +eval "$kde_cv_all_paths" +KDE_CHECK_PATHS_FOR_COMPLETENESS +if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then + # wrong values were cached, may be, we can set better ones + kde_result= + kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir= + kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir= + kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir= + kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir= + kde_have_all_paths= + kde_styledir= + kde_widgetdir= + xdg_appsdir = xdg_menudir= xdg_directorydir= + KDE_SET_DEFAULT_PATHS($1) + eval "$kde_cv_all_paths" + KDE_CHECK_PATHS_FOR_COMPLETENESS + kde_result="$kde_result (cache overridden)" +fi +if test "$kde_have_all_paths" = "no"; then + AC_MSG_ERROR([configure could not run a little KDE program to test the environment. +Since it had compiled and linked before, it must be a strange problem on your system. +Look at config.log for details. If you are not able to fix this, look at +http://www.kde.org/faq/installation.html or any www.kde.org mirror. +(If you're using an egcs version on Linux, you may update binutils!) +]) +else + rm -f conftest* + AC_MSG_RESULT($kde_result) +fi + +bindir=$kde_bindir + +KDE_SUBST_PROGRAMS + +]) + +AC_DEFUN([AC_SUBST_KFSSTND], +[ +AC_SUBST(kde_htmldir) +AC_SUBST(kde_appsdir) +AC_SUBST(kde_icondir) +AC_SUBST(kde_sounddir) +AC_SUBST(kde_datadir) +AC_SUBST(kde_locale) +AC_SUBST(kde_confdir) +AC_SUBST(kde_kcfgdir) +AC_SUBST(kde_mimedir) +AC_SUBST(kde_wallpaperdir) +AC_SUBST(kde_bindir) +dnl X Desktop Group standards +AC_SUBST(xdg_appsdir) +AC_SUBST(xdg_menudir) +AC_SUBST(xdg_directorydir) +dnl for KDE 2 +AC_SUBST(kde_templatesdir) +AC_SUBST(kde_servicesdir) +AC_SUBST(kde_servicetypesdir) +AC_SUBST(kde_moduledir) +AC_SUBST(kdeinitdir, '$(kde_moduledir)') +AC_SUBST(kde_styledir) +AC_SUBST(kde_widgetdir) +if test "$kde_qtver" = 1; then + kde_minidir="$kde_icondir/mini" +else +# for KDE 1 - this breaks KDE2 apps using minidir, but +# that's the plan ;-/ + kde_minidir="/dev/null" +fi +dnl AC_SUBST(kde_minidir) +dnl AC_SUBST(kde_cgidir) +dnl AC_SUBST(kde_toolbardir) +]) + +AC_DEFUN([KDE_MISC_TESTS], +[ + dnl Checks for libraries. + AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD + AC_SUBST(LIBUTIL) + AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD + AC_SUBST(LIBCOMPAT) + kde_have_crypt= + AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes], + AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [ + AC_MSG_WARN([you have no crypt in either libcrypt or libc. +You should install libcrypt from another source or configure with PAM +support]) + kde_have_crypt=no + ])) + AC_SUBST(LIBCRYPT) + if test $kde_have_crypt = yes; then + AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function]) + fi + AC_CHECK_SOCKLEN_T + AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + AC_CHECK_LIB(dnet_stub, dnet_ntoa, + [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) + fi + AC_CHECK_FUNC(inet_ntoa) + if test $ac_cv_func_inet_ntoa = no; then + AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") + fi + AC_CHECK_FUNC(connect) + if test $ac_cv_func_connect = no; then + AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , + $X_EXTRA_LIBS) + fi + + AC_CHECK_FUNC(remove) + if test $ac_cv_func_remove = no; then + AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + AC_CHECK_FUNC(shmat, , + AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")) + + # more headers that need to be explicitly included on darwin + AC_CHECK_HEADERS(sys/types.h stdint.h) + + # sys/bitypes.h is needed for uint32_t and friends on Tru64 + AC_CHECK_HEADERS(sys/bitypes.h) + + # darwin requires a poll emulation library + AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll") + + # for some image handling on Mac OS X + AC_CHECK_HEADERS(Carbon/Carbon.h) + + # CoreAudio framework + AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [ + AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API]) + FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio" + ]) + + AC_CHECK_RES_INIT + AC_SUBST(LIB_POLL) + AC_SUBST(FRAMEWORK_COREAUDIO) + LIBSOCKET="$X_EXTRA_LIBS" + AC_SUBST(LIBSOCKET) + AC_SUBST(X_EXTRA_LIBS) + AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4 + AC_SUBST(LIBUCB) + + case $host in dnl this *is* LynxOS specific + *-*-lynxos* ) + AC_MSG_CHECKING([LynxOS header file wrappers]) + [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"] + AC_MSG_RESULT(disabled) + AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS + ;; + esac + + KDE_CHECK_TYPES + KDE_CHECK_LIBDL + KDE_CHECK_STRLCPY + KDE_CHECK_PIE_SUPPORT + +# darwin needs this to initialize the environment +AC_CHECK_HEADERS(crt_externs.h) +AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])]) + +AH_VERBATIM(_DARWIN_ENVIRON, +[ +#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H) +# include +# include +# define environ (*_NSGetEnviron()) +#endif +]) + +AH_VERBATIM(_AIX_STRINGS_H_BZERO, +[ +/* + * AIX defines FD_SET in terms of bzero, but fails to include + * that defines bzero. + */ + +#if defined(_AIX) +#include +#endif +]) + +AC_CHECK_FUNCS([vsnprintf snprintf]) + +AH_VERBATIM(_TRU64,[ +/* + * On HP-UX, the declaration of vsnprintf() is needed every time ! + */ + +#if !defined(HAVE_VSNPRINTF) || defined(hpux) +#if __STDC__ +#include +#include +#else +#include +#endif +#ifdef __cplusplus +extern "C" +#endif +int vsnprintf(char *str, size_t n, char const *fmt, va_list ap); +#ifdef __cplusplus +extern "C" +#endif +int snprintf(char *str, size_t n, char const *fmt, ...); +#endif +]) + +]) + +dnl ------------------------------------------------------------------------ +dnl Find the header files and libraries for X-Windows. Extended the +dnl macro AC_PATH_X +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([K_PATH_X], +[ +AC_REQUIRE([KDE_MISC_TESTS])dnl +AC_REQUIRE([KDE_CHECK_LIB64]) + +AC_ARG_ENABLE( + embedded, + AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]), + kde_use_qt_emb=$enableval, + kde_use_qt_emb=no +) + +AC_ARG_ENABLE( + qtopia, + AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]), + kde_use_qt_emb_palm=$enableval, + kde_use_qt_emb_palm=no +) + +AC_ARG_ENABLE( + mac, + AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]), + kde_use_qt_mac=$enableval, + kde_use_qt_mac=no +) + +# used to disable x11-specific stuff on special platforms +AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no") + +if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then + +AC_MSG_CHECKING(for X) + +AC_CACHE_VAL(kde_cv_have_x, +[# One or both of the vars are not set, and there is no cached value. +if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then + kde_x_includes=NO +else + kde_x_includes=$x_includes +fi +if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then + kde_x_libraries=NO +else + kde_x_libraries=$x_libraries +fi + +# below we use the standard autoconf calls +ac_x_libraries=$kde_x_libraries +ac_x_includes=$kde_x_includes + +KDE_PATH_X_DIRECT +dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries. +dnl Unfortunately, if compiling with the N32 ABI, this is not the correct +dnl location. The correct location is /usr/lib32 or an undefined value +dnl (the linker is smart enough to pick the correct default library). +dnl Things work just fine if you use just AC_PATH_X_DIRECT. +dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to +dnl /usr/openwin/include, which doesn't work. /usr/include does work, so +dnl x_includes should be left alone. +case "$host" in +mips-sgi-irix6*) + ;; +*-*-solaris*) + ;; +*) + _AC_PATH_X_XMKMF + if test -z "$ac_x_includes"; then + ac_x_includes="." + fi + if test -z "$ac_x_libraries"; then + ac_x_libraries="/usr/lib${kdelibsuff}" + fi +esac +#from now on we use our own again + +# when the user already gave --x-includes, we ignore +# what the standard autoconf macros told us. +if test "$kde_x_includes" = NO; then + kde_x_includes=$ac_x_includes +fi + +# for --x-libraries too +if test "$kde_x_libraries" = NO; then + kde_x_libraries=$ac_x_libraries +fi + +if test "$kde_x_includes" = NO; then + AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!]) +fi + +if test "$kde_x_libraries" = NO; then + AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!]) +fi + +# Record where we found X for the cache. +kde_cv_have_x="have_x=yes \ + kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries" +])dnl + +eval "$kde_cv_have_x" + +if test "$have_x" != yes; then + AC_MSG_RESULT($have_x) + no_x=yes +else + AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes]) +fi + +if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then + X_INCLUDES="" + x_includes="."; dnl better than nothing :- + else + x_includes=$kde_x_includes + X_INCLUDES="-I$x_includes" +fi + +if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then + X_LDFLAGS="" + x_libraries="/usr/lib"; dnl better than nothing :- + else + x_libraries=$kde_x_libraries + X_LDFLAGS="-L$x_libraries" +fi +all_includes="$X_INCLUDES" +all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS" + +# Check for libraries that X11R6 Xt/Xaw programs need. +ac_save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $X_LDFLAGS" +# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to +# check for ICE first), but we must link in the order -lSM -lICE or +# we get undefined symbols. So assume we have SM if we have ICE. +# These have to be linked with before -lX11, unlike the other +# libraries we check for below, so use a different variable. +# --interran@uluru.Stanford.EDU, kb@cs.umb.edu. +AC_CHECK_LIB(ICE, IceConnectionNumber, + [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS) +LDFLAGS="$ac_save_LDFLAGS" + +LIB_X11='-lX11 $(LIBSOCKET)' + +AC_MSG_CHECKING(for libXext) +AC_CACHE_VAL(kde_cv_have_libXext, +[ +kde_ldflags_safe="$LDFLAGS" +kde_libs_safe="$LIBS" + +LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS" +LIBS="-lXext -lX11 $LIBSOCKET" + +AC_TRY_LINK([ +#include +#ifdef STDC_HEADERS +# include +#endif +], +[ +printf("hello Xext\n"); +], +kde_cv_have_libXext=yes, +kde_cv_have_libXext=no +) + +LDFLAGS=$kde_ldflags_safe +LIBS=$kde_libs_safe +]) + +AC_MSG_RESULT($kde_cv_have_libXext) + +if test "$kde_cv_have_libXext" = "no"; then + AC_MSG_ERROR([We need a working libXext to proceed. Since configure +can't find it itself, we stop here assuming that make wouldn't find +them either.]) +fi + +LIB_XEXT="-lXext" +QTE_NORTTI="" + +elif test "$kde_use_qt_emb" = "yes"; then + dnl We're using QT Embedded + CPPFLAGS=-DQWS + CXXFLAGS="$CXXFLAGS -fno-rtti" + QTE_NORTTI="-fno-rtti -DQWS" + X_PRE_LIBS="" + LIB_X11="" + LIB_XEXT="" + LIB_XRENDER="" + LIBSM="" + X_INCLUDES="" + X_LDFLAGS="" + x_includes="" + x_libraries="" +elif test "$kde_use_qt_mac" = "yes"; then + dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to + dnl be included to get the information) --Sam + CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" + CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" + X_PRE_LIBS="" + LIB_X11="" + LIB_XEXT="" + LIB_XRENDER="" + LIBSM="" + X_INCLUDES="" + X_LDFLAGS="" + x_includes="" + x_libraries="" +fi +AC_SUBST(X_PRE_LIBS) +AC_SUBST(LIB_X11) +AC_SUBST(LIB_XRENDER) +AC_SUBST(LIBSM) +AC_SUBST(X_INCLUDES) +AC_SUBST(X_LDFLAGS) +AC_SUBST(x_includes) +AC_SUBST(x_libraries) +AC_SUBST(QTE_NORTTI) +AC_SUBST(LIB_XEXT) + +]) + +AC_DEFUN([KDE_PRINT_QT_PROGRAM], +[ +AC_REQUIRE([KDE_USE_QT]) +cat > conftest.$ac_ext < +#include +EOF +if test "$kde_qtver" = "2"; then +cat >> conftest.$ac_ext < +#include +#include +EOF + +if test $kde_qtsubver -gt 0; then +cat >> conftest.$ac_ext <> conftest.$ac_ext < +#include +#include +EOF +fi + +echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext +cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +fi + +rm -f conftest* +CXXFLAGS="$ac_cxxflags_safe" +LDFLAGS="$ac_ldflags_safe" +LIBS="$ac_libs_safe" + +LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" +export LD_LIBRARY_PATH +LIBRARY_PATH="$ac_LIBRARY_PATH" +export LIBRARY_PATH +AC_LANG_RESTORE +]) + +if test "$kde_cv_qt_direct" = "yes"; then + AC_MSG_RESULT(yes) + $1 +else + AC_MSG_RESULT(no) + $2 +fi +]) + +dnl ------------------------------------------------------------------------ +dnl Try to find the Qt headers and libraries. +dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed) +dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed) +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([AC_PATH_QT_1_3], +[ +AC_REQUIRE([K_PATH_X]) +AC_REQUIRE([KDE_USE_QT]) +AC_REQUIRE([KDE_CHECK_LIB64]) + +dnl ------------------------------------------------------------------------ +dnl Add configure flag to enable linking to MT version of Qt library. +dnl ------------------------------------------------------------------------ + +AC_ARG_ENABLE( + mt, + AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]), + kde_use_qt_mt=$enableval, + [ + if test $kde_qtver = 3; then + kde_use_qt_mt=yes + else + kde_use_qt_mt=no + fi + ] +) + +USING_QT_MT="" + +dnl ------------------------------------------------------------------------ +dnl If we not get --disable-qt-mt then adjust some vars for the host. +dnl ------------------------------------------------------------------------ + +KDE_MT_LDFLAGS= +KDE_MT_LIBS= +if test "x$kde_use_qt_mt" = "xyes"; then + KDE_CHECK_THREADING + if test "x$kde_use_threading" = "xyes"; then + CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS" + KDE_MT_LDFLAGS="$USE_THREADS" + KDE_MT_LIBS="$LIBPTHREAD" + else + kde_use_qt_mt=no + fi +fi +AC_SUBST(KDE_MT_LDFLAGS) +AC_SUBST(KDE_MT_LIBS) + +kde_qt_was_given=yes + +dnl ------------------------------------------------------------------------ +dnl If we haven't been told how to link to Qt, we work it out for ourselves. +dnl ------------------------------------------------------------------------ +if test -z "$LIBQT_GLOB"; then + if test "x$kde_use_qt_emb" = "xyes"; then + LIBQT_GLOB="libqte.*" + else + LIBQT_GLOB="libqt.*" + fi +fi + +dnl ------------------------------------------------------------ +dnl If we got --enable-embedded then adjust the Qt library name. +dnl ------------------------------------------------------------ +if test "x$kde_use_qt_emb" = "xyes"; then + qtlib="qte" +else + qtlib="qt" +fi + +kde_int_qt="-l$qtlib" + +if test -z "$LIBQPE"; then +dnl ------------------------------------------------------------ +dnl If we got --enable-palmtop then add -lqpe to the link line +dnl ------------------------------------------------------------ + if test "x$kde_use_qt_emb" = "xyes"; then + if test "x$kde_use_qt_emb_palm" = "xyes"; then + LIB_QPE="-lqpe" + else + LIB_QPE="" + fi + else + LIB_QPE="" + fi +fi + +dnl ------------------------------------------------------------------------ +dnl If we got --enable-qt-mt then adjust the Qt library name for the host. +dnl ------------------------------------------------------------------------ + +if test "x$kde_use_qt_mt" = "xyes"; then + LIBQT="-l$qtlib-mt" + kde_int_qt="-l$qtlib-mt" + LIBQT_GLOB="lib$qtlib-mt.*" + USING_QT_MT="using -mt" +else + LIBQT="-l$qtlib" +fi + +if test $kde_qtver != 1; then + + AC_REQUIRE([AC_FIND_PNG]) + AC_REQUIRE([AC_FIND_JPEG]) + LIBQT="$LIBQT $LIBPNG $LIBJPEG" +fi + +if test $kde_qtver = 3; then + AC_REQUIRE([KDE_CHECK_LIBDL]) + LIBQT="$LIBQT $LIBDL" +fi + +AC_MSG_CHECKING([for Qt]) + +if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then +LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET" +fi +ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO +qt_libraries="" +qt_includes="" +AC_ARG_WITH(qt-dir, + AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]), + [ ac_qt_includes="$withval"/include + ac_qt_libraries="$withval"/lib${kdelibsuff} + ac_qt_bindir="$withval"/bin + ]) + +AC_ARG_WITH(qt-includes, + AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]), + [ + ac_qt_includes="$withval" + ]) + +kde_qt_libs_given=no + +AC_ARG_WITH(qt-libraries, + AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]), + [ ac_qt_libraries="$withval" + kde_qt_libs_given=yes + ]) + +AC_CACHE_VAL(ac_cv_have_qt, +[#try to guess Qt locations + +qt_incdirs="" +for dir in $kde_qt_dirs; do + qt_incdirs="$qt_incdirs $dir/include $dir" +done +qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes" +if test ! "$ac_qt_includes" = "NO"; then + qt_incdirs="$ac_qt_includes $qt_incdirs" +fi + +if test "$kde_qtver" != "1"; then + kde_qt_header=qstyle.h +else + kde_qt_header=qglobal.h +fi + +AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) +ac_qt_includes="$qt_incdir" + +qt_libdirs="" +for dir in $kde_qt_dirs; do + qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir" +done +qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries" +if test ! "$ac_qt_libraries" = "NO"; then + qt_libdir=$ac_qt_libraries +else + qt_libdirs="$ac_qt_libraries $qt_libdirs" + # if the Qt was given, the chance is too big that libqt.* doesn't exist + qt_libdir=NONE + for dir in $qt_libdirs; do + try="ls -1 $dir/${LIBQT_GLOB}" + if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi + done +fi +for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do + if test -e "$a"; then + LIBQT="$LIBQT ${kde_int_qt}_incremental" + break + fi +done + +ac_qt_libraries="$qt_libdir" + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +ac_cxxflags_safe="$CXXFLAGS" +ac_ldflags_safe="$LDFLAGS" +ac_libs_safe="$LIBS" + +CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" +LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" +LIBS="$LIBS $LIBQT $KDE_MT_LIBS" + +KDE_PRINT_QT_PROGRAM + +if AC_TRY_EVAL(ac_link) && test -s conftest; then + rm -f conftest* +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC + ac_qt_libraries="NO" +fi +rm -f conftest* +CXXFLAGS="$ac_cxxflags_safe" +LDFLAGS="$ac_ldflags_safe" +LIBS="$ac_libs_safe" + +AC_LANG_RESTORE +if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then + ac_cv_have_qt="have_qt=no" + ac_qt_notfound="" + missing_qt_mt="" + if test "$ac_qt_includes" = NO; then + if test "$ac_qt_libraries" = NO; then + ac_qt_notfound="(headers and libraries)"; + else + ac_qt_notfound="(headers)"; + fi + else + if test "x$kde_use_qt_mt" = "xyes"; then + missing_qt_mt=" +Make sure that you have compiled Qt with thread support!" + ac_qt_notfound="(library $qtlib-mt)"; + else + ac_qt_notfound="(library $qtlib)"; + fi + fi + + AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! +For more details about this problem, look at the end of config.log.$missing_qt_mt]) +else + have_qt="yes" +fi +]) + +eval "$ac_cv_have_qt" + +if test "$have_qt" != yes; then + AC_MSG_RESULT([$have_qt]); +else + ac_cv_have_qt="have_qt=yes \ + ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" + AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT]) + + qt_libraries="$ac_qt_libraries" + qt_includes="$ac_qt_includes" +fi + +if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then + KDE_CHECK_QT_DIRECT(qt_libraries= ,[]) +fi + +AC_SUBST(qt_libraries) +AC_SUBST(qt_includes) + +if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then + QT_INCLUDES="" +else + QT_INCLUDES="-I$qt_includes" + all_includes="$QT_INCLUDES $all_includes" +fi + +if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then + QT_LDFLAGS="" +else + QT_LDFLAGS="-L$qt_libraries" + all_libraries="$QT_LDFLAGS $all_libraries" +fi +test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS" + +AC_SUBST(QT_INCLUDES) +AC_SUBST(QT_LDFLAGS) +AC_PATH_QT_MOC_UIC + +KDE_CHECK_QT_JPEG + +if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then +LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)' +else +LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)' +fi +test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS" +for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do + if test -e "$a"; then + LIB_QT="$LIB_QT ${kde_int_qt}_incremental" + break + fi +done + +AC_SUBST(LIB_QT) +AC_SUBST(LIB_QPE) + +AC_SUBST(kde_qtver) +]) + +AC_DEFUN([AC_PATH_QT], +[ +AC_PATH_QT_1_3 +]) + +AC_DEFUN([KDE_CHECK_UIC_PLUGINS], +[ +AC_REQUIRE([AC_PATH_QT_MOC_UIC]) + +if test x$ac_uic_supports_libpath = xyes; then + +AC_MSG_CHECKING([if UIC has KDE plugins available]) +AC_CACHE_VAL(kde_cv_uic_plugins, +[ +cat > actest.ui << EOF + +NewConnectionDialog + + + + testInput + + + + +EOF + + + +kde_cv_uic_plugins=no +kde_line="$UIC_PATH -L $kde_widgetdir" +if test x$ac_uic_supports_nounload = xyes; then + kde_line="$kde_line -nounload" +fi +kde_line="$kde_line -impl actest.h actest.ui > actest.cpp" +if AC_TRY_EVAL(kde_line); then + # if you're trying to debug this check and think it's incorrect, + # better check your installation. The check _is_ correct - your + # installation is not. + if test -f actest.cpp && grep -i klineedit actest.cpp > /dev/null; then + kde_cv_uic_plugins=yes + fi +fi +rm -f actest.ui actest.cpp +]) + +AC_MSG_RESULT([$kde_cv_uic_plugins]) +if test "$kde_cv_uic_plugins" != yes; then + AC_MSG_ERROR([ +you need to install kdelibs first. + +If you did install kdelibs, then the Qt version that is picked up by +this configure is not the same version you used to compile kdelibs. +The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the +_same Qt version_, compiled with the _same compiler_ and the same Qt +configuration settings. +]) +fi +fi +]) + +AC_DEFUN([KDE_CHECK_FINAL], +[ + AC_ARG_ENABLE(final, + AC_HELP_STRING([--enable-final], + [build size optimized apps (experimental - needs lots of memory)]), + kde_use_final=$enableval, kde_use_final=no) + + if test "x$kde_use_final" = "xyes"; then + KDE_USE_FINAL_TRUE="" + KDE_USE_FINAL_FALSE="#" + else + KDE_USE_FINAL_TRUE="#" + KDE_USE_FINAL_FALSE="" + fi + AC_SUBST(KDE_USE_FINAL_TRUE) + AC_SUBST(KDE_USE_FINAL_FALSE) +]) + +AC_DEFUN([KDE_CHECK_CLOSURE], +[ + AC_ARG_ENABLE(closure, + AC_HELP_STRING([--enable-closure],[delay template instantiation]), + kde_use_closure=$enableval, kde_use_closure=no) + + KDE_NO_UNDEFINED="" + if test "x$kde_use_closure" = "xyes"; then + KDE_USE_CLOSURE_TRUE="" + KDE_USE_CLOSURE_FALSE="#" +# CXXFLAGS="$CXXFLAGS $REPO" + else + KDE_USE_CLOSURE_TRUE="#" + KDE_USE_CLOSURE_FALSE="" + KDE_NO_UNDEFINED="" + case $host in + *-*-linux-gnu) + KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined], + [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined], + [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"], + [KDE_NO_UNDEFINED=""])], + [KDE_NO_UNDEFINED=""]) + ;; + esac + fi + AC_SUBST(KDE_USE_CLOSURE_TRUE) + AC_SUBST(KDE_USE_CLOSURE_FALSE) + AC_SUBST(KDE_NO_UNDEFINED) +]) + +dnl Check if the linker supports --enable-new-dtags and --as-needed +AC_DEFUN([KDE_CHECK_NEW_LDFLAGS], +[ + AC_ARG_ENABLE(new_ldflags, + AC_HELP_STRING([--enable-new-ldflags], + [enable the new linker flags]), + kde_use_new_ldflags=$enableval, + kde_use_new_ldflags=no) + + LDFLAGS_AS_NEEDED="" + LDFLAGS_NEW_DTAGS="" + if test "x$kde_use_new_ldflags" = "xyes"; then + LDFLAGS_NEW_DTAGS="" + KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags], + [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],) + + KDE_CHECK_COMPILER_FLAG([Wl,--as-needed], + [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],) + fi + AC_SUBST(LDFLAGS_AS_NEEDED) + AC_SUBST(LDFLAGS_NEW_DTAGS) +]) + +AC_DEFUN([KDE_CHECK_NMCHECK], +[ + AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]), + kde_use_nmcheck=$enableval, kde_use_nmcheck=no) + + if test "$kde_use_nmcheck" = "yes"; then + KDE_USE_NMCHECK_TRUE="" + KDE_USE_NMCHECK_FALSE="#" + else + KDE_USE_NMCHECK_TRUE="#" + KDE_USE_NMCHECK_FALSE="" + fi + AC_SUBST(KDE_USE_NMCHECK_TRUE) + AC_SUBST(KDE_USE_NMCHECK_FALSE) +]) + +AC_DEFUN([KDE_EXPAND_MAKEVAR], [ +savex=$exec_prefix +test "x$exec_prefix" = xNONE && exec_prefix=$prefix +tmp=$$2 +while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done +exec_prefix=$savex +]) + +dnl ------------------------------------------------------------------------ +dnl Now, the same with KDE +dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed) +dnl and $(kde_includes) will be the kdehdrlocation (if needed) +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([AC_BASE_PATH_KDE], +[ +AC_REQUIRE([KDE_CHECK_STL]) +AC_REQUIRE([AC_PATH_QT])dnl +AC_REQUIRE([KDE_CHECK_LIB64]) + +AC_CHECK_RPATH +AC_MSG_CHECKING([for KDE]) + +if test "${prefix}" != NONE; then + kde_includes=${includedir} + KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir) + + kde_libraries=${libdir} + KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir) + +else + ac_kde_includes= + ac_kde_libraries= + kde_libraries="" + kde_includes="" +fi + +AC_CACHE_VAL(ac_cv_have_kde, +[#try to guess kde locations + +if test "$kde_qtver" = 1; then + kde_check_header="ksock.h" + kde_check_lib="libkdecore.la" +else + kde_check_header="ksharedptr.h" + kde_check_lib="libkio.la" +fi + +if test -z "$1"; then + +kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes" +test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs" +kde_incdirs="$ac_kde_includes $kde_incdirs" +AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir) +ac_kde_includes="$kde_incdir" + +if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then + AC_MSG_ERROR([ +in the prefix, you've chosen, are no KDE headers installed. This will fail. +So, check this please and use another prefix!]) +fi + +kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}" +test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs" +kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs" +AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir) +ac_kde_libraries="$kde_libdir" + +kde_widgetdir=NO +dnl this might be somewhere else +AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir) + +if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then +AC_MSG_ERROR([ +in the prefix, you've chosen, are no KDE libraries installed. This will fail. +So, check this please and use another prefix!]) +fi + +if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then +AC_MSG_ERROR([ +I can't find the designer plugins. These are required and should have been installed +by kdelibs]) +fi + +if test -n "$kde_widgetdir"; then + kde_widgetdir="$kde_widgetdir/kde3/plugins/designer" +fi + + +if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then + ac_cv_have_kde="have_kde=no" +else + ac_cv_have_kde="have_kde=yes \ + ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" +fi + +else dnl test -z $1, e.g. from kdelibs + + ac_cv_have_kde="have_kde=no" + +fi +])dnl + +eval "$ac_cv_have_kde" + +if test "$have_kde" != "yes"; then + if test "${prefix}" = NONE; then + ac_kde_prefix="$ac_default_prefix" + else + ac_kde_prefix="$prefix" + fi + if test "$exec_prefix" = NONE; then + ac_kde_exec_prefix="$ac_kde_prefix" + AC_MSG_RESULT([will be installed in $ac_kde_prefix]) + else + ac_kde_exec_prefix="$exec_prefix" + AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix]) + fi + + kde_libraries="${libdir}" + kde_includes="${includedir}" + +else + ac_cv_have_kde="have_kde=yes \ + ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" + AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes]) + + kde_libraries="$ac_kde_libraries" + kde_includes="$ac_kde_includes" +fi +AC_SUBST(kde_libraries) +AC_SUBST(kde_includes) + +if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then + KDE_INCLUDES="" +else + KDE_INCLUDES="-I$kde_includes" + all_includes="$KDE_INCLUDES $all_includes" +fi + +KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION" + +KDE_LDFLAGS="-L$kde_libraries" +if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then + all_libraries="$KDE_LDFLAGS $all_libraries" +fi + +AC_SUBST(KDE_LDFLAGS) +AC_SUBST(KDE_INCLUDES) + +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) + +all_libraries="$all_libraries $USER_LDFLAGS" +all_includes="$all_includes $USER_INCLUDES" +AC_SUBST(all_includes) +AC_SUBST(all_libraries) + +if test -z "$1"; then +KDE_CHECK_UIC_PLUGINS +fi + +ac_kde_libraries="$kde_libdir" + +AC_SUBST(AUTODIRS) + + +]) + +AC_DEFUN([KDE_CHECK_EXTRA_LIBS], +[ +AC_MSG_CHECKING(for extra includes) +AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]), + kde_use_extra_includes="$withval", + kde_use_extra_includes=NONE +) +kde_extra_includes= +if test -n "$kde_use_extra_includes" && \ + test "$kde_use_extra_includes" != "NONE"; then + + ac_save_ifs=$IFS + IFS=':' + for dir in $kde_use_extra_includes; do + kde_extra_includes="$kde_extra_includes $dir" + USER_INCLUDES="$USER_INCLUDES -I$dir" + done + IFS=$ac_save_ifs + kde_use_extra_includes="added" +else + kde_use_extra_includes="no" +fi +AC_SUBST(USER_INCLUDES) + +AC_MSG_RESULT($kde_use_extra_includes) + +kde_extra_libs= +AC_MSG_CHECKING(for extra libs) +AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]), + kde_use_extra_libs=$withval, + kde_use_extra_libs=NONE +) +if test -n "$kde_use_extra_libs" && \ + test "$kde_use_extra_libs" != "NONE"; then + + ac_save_ifs=$IFS + IFS=':' + for dir in $kde_use_extra_libs; do + kde_extra_libs="$kde_extra_libs $dir" + KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" + USER_LDFLAGS="$USER_LDFLAGS -L$dir" + done + IFS=$ac_save_ifs + kde_use_extra_libs="added" +else + kde_use_extra_libs="no" +fi + +AC_SUBST(USER_LDFLAGS) + +AC_MSG_RESULT($kde_use_extra_libs) + +]) + +AC_DEFUN([KDE_1_CHECK_PATH_HEADERS], +[ + AC_MSG_CHECKING([for KDE headers installed]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS +cat > conftest.$ac_ext < +#endif +#include +#include "confdefs.h" +#include + +int main() { + printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); + printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); + printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); + printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); + printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); + printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); + printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); + printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); + printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); + printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); + printf("kde_wallpaperdir=\\"%s\\"\n", + KApplication::kde_wallpaperdir().data()); + printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); + printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); + printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); + printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); + printf("kde_moduledir=\\"/tmp/dummy\\"\n"); + printf("kde_styledir=\\"/tmp/dummy\\"\n"); + printf("kde_widgetdir=\\"/tmp/dummy\\"\n"); + printf("xdg_appsdir=\\"/tmp/dummy\\"\n"); + printf("xdg_menudir=\\"/tmp/dummy\\"\n"); + printf("xdg_directorydir=\\"/tmp/dummy\\"\n"); + printf("kde_kcfgdir=\\"/tmp/dummy\\"\n"); + return 0; + } +EOF + + ac_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$all_includes $CPPFLAGS" + if AC_TRY_EVAL(ac_compile); then + AC_MSG_RESULT(yes) + else + AC_MSG_ERROR([your system is not able to compile a small KDE application! +Check, if you installed the KDE header files correctly. +For more details about this problem, look at the end of config.log.]) + fi + CPPFLAGS=$ac_save_CPPFLAGS + + AC_LANG_RESTORE +]) + +AC_DEFUN([KDE_CHECK_KDEQTADDON], +[ +AC_MSG_CHECKING(for kde-qt-addon) +AC_CACHE_VAL(kde_cv_have_kdeqtaddon, +[ + kde_ldflags_safe="$LDFLAGS" + kde_libs_safe="$LIBS" + kde_cxxflags_safe="$CXXFLAGS" + + LIBS="-lkde-qt-addon $LIBQT $LIBS" + CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes" + LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" + + AC_TRY_LINK([ + #include + ], + [ + QDomDocument doc; + ], + kde_cv_have_kdeqtaddon=yes, + kde_cv_have_kdeqtaddon=no + ) + + LDFLAGS=$kde_ldflags_safe + LIBS=$kde_libs_safe + CXXFLAGS=$kde_cxxflags_safe +]) + +AC_MSG_RESULT($kde_cv_have_kdeqtaddon) + +if test "$kde_cv_have_kdeqtaddon" = "no"; then + AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first. +It is a separate package (and CVS module) named kde-qt-addon.]) +fi +]) + +AC_DEFUN([KDE_CREATE_LIBS_ALIASES], +[ + AC_REQUIRE([KDE_MISC_TESTS]) + AC_REQUIRE([KDE_CHECK_LIBDL]) + AC_REQUIRE([K_PATH_X]) + +if test $kde_qtver = 3; then + case $host in + *cygwin*) lib_kded="-lkdeinit_kded" ;; + *) lib_kded="" ;; + esac + AC_SUBST(LIB_KDED, $lib_kded) + AC_SUBST(LIB_KDECORE, "-lkdecore") + AC_SUBST(LIB_KDEUI, "-lkdeui") + AC_SUBST(LIB_KIO, "-lkio") + AC_SUBST(LIB_KJS, "-lkjs") + AC_SUBST(LIB_SMB, "-lsmb") + AC_SUBST(LIB_KAB, "-lkab") + AC_SUBST(LIB_KABC, "-lkabc") + AC_SUBST(LIB_KHTML, "-lkhtml") + AC_SUBST(LIB_KSPELL, "-lkspell") + AC_SUBST(LIB_KPARTS, "-lkparts") + AC_SUBST(LIB_KDEPRINT, "-lkdeprint") + AC_SUBST(LIB_KUTILS, "-lkutils") + AC_SUBST(LIB_KDEPIM, "-lkdepim") + AC_SUBST(LIB_KIMPROXY, "-lkimproxy") + AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff") + AC_SUBST(LIB_KDNSSD, "-lkdnssd") + AC_SUBST(LIB_KUNITTEST, "-lkunittest") +# these are for backward compatibility + AC_SUBST(LIB_KSYCOCA, "-lkio") + AC_SUBST(LIB_KFILE, "-lkio") +elif test $kde_qtver = 2; then + AC_SUBST(LIB_KDECORE, "-lkdecore") + AC_SUBST(LIB_KDEUI, "-lkdeui") + AC_SUBST(LIB_KIO, "-lkio") + AC_SUBST(LIB_KSYCOCA, "-lksycoca") + AC_SUBST(LIB_SMB, "-lsmb") + AC_SUBST(LIB_KFILE, "-lkfile") + AC_SUBST(LIB_KAB, "-lkab") + AC_SUBST(LIB_KHTML, "-lkhtml") + AC_SUBST(LIB_KSPELL, "-lkspell") + AC_SUBST(LIB_KPARTS, "-lkparts") + AC_SUBST(LIB_KDEPRINT, "-lkdeprint") +else + AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)") + AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)") + AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)") + AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)") + AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)") +fi +]) + +AC_DEFUN([AC_PATH_KDE], +[ + AC_BASE_PATH_KDE + AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]), + [ + if test "$enableval" = "no"; + then ac_use_path_checking="default" + else ac_use_path_checking="" + fi + ], + [ + if test "$kde_qtver" = 1; + then ac_use_path_checking="" + else ac_use_path_checking="default" + fi + ] + ) + + AC_CREATE_KFSSTND($ac_use_path_checking) + + AC_SUBST_KFSSTND + KDE_CREATE_LIBS_ALIASES +]) + +dnl KDE_CHECK_FUNC_EXT(, [headers], [sample-use], [C prototype], [autoheader define], [call if found]) +AC_DEFUN([KDE_CHECK_FUNC_EXT], +[ +AC_MSG_CHECKING(for $1) +AC_CACHE_VAL(kde_cv_func_$1, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +save_CXXFLAGS="$CXXFLAGS" +kde_safe_LIBS="$LIBS" +LIBS="$LIBS $X_EXTRA_LIBS" +if test "$GXX" = "yes"; then +CXXFLAGS="$CXXFLAGS -pedantic-errors" +fi +AC_TRY_COMPILE([ +$2 +], +[ +$3 +], +kde_cv_func_$1=yes, +kde_cv_func_$1=no) +CXXFLAGS="$save_CXXFLAGS" +LIBS="$kde_safe_LIBS" +AC_LANG_RESTORE +]) + +AC_MSG_RESULT($kde_cv_func_$1) + +AC_MSG_CHECKING([if $1 needs custom prototype]) +AC_CACHE_VAL(kde_cv_proto_$1, +[ +if test "x$kde_cv_func_$1" = xyes; then + kde_cv_proto_$1=no +else + case "$1" in + setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat) + kde_cv_proto_$1="yes - in libkdefakes" + ;; + *) + kde_cv_proto_$1=unknown + ;; + esac +fi + +if test "x$kde_cv_proto_$1" = xunknown; then + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + kde_safe_libs=$LIBS + LIBS="$LIBS $X_EXTRA_LIBS" + AC_TRY_LINK([ +$2 + +extern "C" $4; +], +[ +$3 +], +[ kde_cv_func_$1=yes + kde_cv_proto_$1=yes ], + [kde_cv_proto_$1="$1 unavailable"] +) +LIBS=$kde_safe_libs +AC_LANG_RESTORE +fi +]) +AC_MSG_RESULT($kde_cv_proto_$1) + +if test "x$kde_cv_func_$1" = xyes; then + AC_DEFINE(HAVE_$5, 1, [Define if you have $1]) + $6 +fi +if test "x$kde_cv_proto_$1" = xno; then + AC_DEFINE(HAVE_$5_PROTO, 1, + [Define if you have the $1 prototype]) +fi + +AH_VERBATIM([_HAVE_$5_PROTO], +[ +#if !defined(HAVE_$5_PROTO) +#ifdef __cplusplus +extern "C" { +#endif +$4; +#ifdef __cplusplus +} +#endif +#endif +]) +]) + +AC_DEFUN([AC_CHECK_SETENV], +[ + KDE_CHECK_FUNC_EXT(setenv, [ +#include +], + [setenv("VAR", "VALUE", 1);], + [int setenv (const char *, const char *, int)], + [SETENV]) +]) + +AC_DEFUN([AC_CHECK_UNSETENV], +[ + KDE_CHECK_FUNC_EXT(unsetenv, [ +#include +], + [unsetenv("VAR");], + [void unsetenv (const char *)], + [UNSETENV]) +]) + +AC_DEFUN([AC_CHECK_GETDOMAINNAME], +[ + KDE_CHECK_FUNC_EXT(getdomainname, [ +#include +#include +#include +], + [ +char buffer[200]; +getdomainname(buffer, 200); +], + [#include + int getdomainname (char *, size_t)], + [GETDOMAINNAME]) +]) + +AC_DEFUN([AC_CHECK_GETHOSTNAME], +[ + KDE_CHECK_FUNC_EXT(gethostname, [ +#include +#include +], + [ +char buffer[200]; +gethostname(buffer, 200); +], + [int gethostname (char *, unsigned int)], + [GETHOSTNAME]) +]) + +AC_DEFUN([AC_CHECK_USLEEP], +[ + KDE_CHECK_FUNC_EXT(usleep, [ +#include +], + [ +usleep(200); +], + [int usleep (unsigned int)], + [USLEEP]) +]) + + +AC_DEFUN([AC_CHECK_RANDOM], +[ + KDE_CHECK_FUNC_EXT(random, [ +#include +], + [ +random(); +], + [long int random(void)], + [RANDOM]) + + KDE_CHECK_FUNC_EXT(srandom, [ +#include +], + [ +srandom(27); +], + [void srandom(unsigned int)], + [SRANDOM]) + +]) + +AC_DEFUN([AC_CHECK_INITGROUPS], +[ + KDE_CHECK_FUNC_EXT(initgroups, [ +#include +#include +#include +], + [ +char buffer[200]; +initgroups(buffer, 27); +], + [int initgroups(const char *, gid_t)], + [INITGROUPS]) +]) + +AC_DEFUN([AC_CHECK_MKSTEMPS], +[ + KDE_CHECK_FUNC_EXT(mkstemps, [ +#include +#include +], + [ +mkstemps("/tmp/aaaXXXXXX", 6); +], + [int mkstemps(char *, int)], + [MKSTEMPS]) +]) + +AC_DEFUN([AC_CHECK_MKSTEMP], +[ + KDE_CHECK_FUNC_EXT(mkstemp, [ +#include +#include +], + [ +mkstemp("/tmp/aaaXXXXXX"); +], + [int mkstemp(char *)], + [MKSTEMP]) +]) + +AC_DEFUN([AC_CHECK_MKDTEMP], +[ + KDE_CHECK_FUNC_EXT(mkdtemp, [ +#include +#include +], + [ +mkdtemp("/tmp/aaaXXXXXX"); +], + [char *mkdtemp(char *)], + [MKDTEMP]) +]) + + +AC_DEFUN([AC_CHECK_RES_INIT], +[ + AC_MSG_CHECKING([if res_init needs -lresolv]) + kde_libs_safe="$LIBS" + LIBS="$LIBS $X_EXTRA_LIBS -lresolv" + AC_TRY_LINK( + [ +#include +#include +#include +#include + ], + [ + res_init(); + ], + [ + LIBRESOLV="-lresolv" + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function]) + ], + [ AC_MSG_RESULT(no) ] + ) + LIBS=$kde_libs_safe + AC_SUBST(LIBRESOLV) + + KDE_CHECK_FUNC_EXT(res_init, + [ +#include +#include +#include +#include + ], + [res_init()], + [int res_init(void)], + [RES_INIT]) +]) + +AC_DEFUN([AC_CHECK_STRLCPY], +[ + KDE_CHECK_FUNC_EXT(strlcpy, [ +#include +], +[ char buf[20]; + strlcpy(buf, "KDE function test", sizeof(buf)); +], + [unsigned long strlcpy(char*, const char*, unsigned long)], + [STRLCPY]) +]) + +AC_DEFUN([AC_CHECK_STRLCAT], +[ + KDE_CHECK_FUNC_EXT(strlcat, [ +#include +], +[ char buf[20]; + buf[0]='\0'; + strlcat(buf, "KDE function test", sizeof(buf)); +], + [unsigned long strlcat(char*, const char*, unsigned long)], + [STRLCAT]) +]) + +AC_DEFUN([AC_CHECK_RES_QUERY], +[ + KDE_CHECK_FUNC_EXT(res_query, [ +#include +#include +#include +#include +#include +], +[ +res_query(NULL, 0, 0, NULL, 0); +], + [int res_query(const char *, int, int, unsigned char *, int)], + [RES_QUERY]) +]) + +AC_DEFUN([AC_CHECK_DN_SKIPNAME], +[ + KDE_CHECK_FUNC_EXT(dn_skipname, [ +#include +#include +#include +#include +], +[ +dn_skipname (NULL, NULL); +], + [int dn_skipname (unsigned char *, unsigned char *)], + [DN_SKIPNAME]) +]) + + +AC_DEFUN([AC_FIND_GIF], + [AC_MSG_CHECKING([for giflib]) +AC_CACHE_VAL(ac_cv_lib_gif, +[ac_save_LIBS="$LIBS" +if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then +LIBS="$all_libraries -lgif -lX11 $LIBSOCKET" +else +LIBS="$all_libraries -lgif" +fi +AC_TRY_LINK(dnl +[ +#ifdef __cplusplus +extern "C" { +#endif +int GifLastError(void); +#ifdef __cplusplus +} +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +], + [return GifLastError();], + eval "ac_cv_lib_gif=yes", + eval "ac_cv_lib_gif=no") +LIBS="$ac_save_LIBS" +])dnl +if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif]) +else + AC_MSG_ERROR(You need giflib30. Please install the kdesupport package) +fi +]) + +AC_DEFUN([KDE_FIND_JPEG_HELPER], +[ +AC_MSG_CHECKING([for libjpeg$2]) +AC_CACHE_VAL(ac_cv_lib_jpeg_$1, +[ +ac_save_LIBS="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm" +ac_save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +AC_TRY_LINK( +[ +#ifdef __cplusplus +extern "C" { +#endif +void jpeg_CreateDecompress(); +#ifdef __cplusplus +} +#endif +], +[jpeg_CreateDecompress();], + eval "ac_cv_lib_jpeg_$1=-ljpeg$2", + eval "ac_cv_lib_jpeg_$1=no") +LIBS="$ac_save_LIBS" +CFLAGS="$ac_save_CFLAGS" +]) + +if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then + LIBJPEG="$ac_cv_lib_jpeg_$1" + AC_MSG_RESULT($ac_cv_lib_jpeg_$1) +else + AC_MSG_RESULT(no) + $3 +fi + +]) + +AC_DEFUN([AC_FIND_JPEG], +[ +dnl first look for libraries +KDE_FIND_JPEG_HELPER(6b, 6b, + KDE_FIND_JPEG_HELPER(normal, [], + [ + LIBJPEG= + ] + ) +) + +dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h +dnl requires system dependent includes loaded before it) +jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes" +AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir) +test "x$jpeg_incdir" = xNO && jpeg_incdir= + +dnl if headers _and_ libraries are missing, this is no error, and we +dnl continue with a warning (the user will get no jpeg support in khtml) +dnl if only one is missing, it means a configuration error, but we still +dnl only warn +if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then + AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg]) +else + if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then + AC_MSG_WARN([ +There is an installation error in jpeg support. You seem to have only one +of either the headers _or_ the libraries installed. You may need to either +provide correct --with-extra-... options, or the development package of +libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/ +Disabling JPEG support. +]) + else + AC_MSG_WARN([libjpeg not found. disable JPEG support.]) + fi + jpeg_incdir= + LIBJPEG= +fi + +AC_SUBST(LIBJPEG) +AH_VERBATIM(_AC_CHECK_JPEG, +[/* + * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system + * headers and I'm too lazy to write a configure test as long as only + * unixware is related + */ +#ifdef _UNIXWARE +#define HAVE_BOOLEAN +#endif +]) +]) + +AC_DEFUN([KDE_CHECK_QT_JPEG], +[ +if test -n "$LIBJPEG"; then +AC_MSG_CHECKING([if Qt needs $LIBJPEG]) +AC_CACHE_VAL(kde_cv_qt_jpeg, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +ac_save_LIBS="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS $LIBQT" +LIBS=`echo $LIBS | sed "s/$LIBJPEG//"` +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" +AC_TRY_LINK( +[#include ], + [ + int argc; + char** argv; + QApplication app(argc, argv);], + eval "kde_cv_qt_jpeg=no", + eval "kde_cv_qt_jpeg=yes") +LIBS="$ac_save_LIBS" +CXXFLAGS="$ac_save_CXXFLAGS" +AC_LANG_RESTORE +fi +]) + +if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then + AC_MSG_RESULT(yes) + LIBJPEG_QT='$(LIBJPEG)' +else + AC_MSG_RESULT(no) + LIBJPEG_QT= +fi + +]) + +AC_DEFUN([AC_FIND_ZLIB], +[ +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) +AC_MSG_CHECKING([for libz]) +AC_CACHE_VAL(ac_cv_lib_z, +[ +kde_save_LIBS="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET" +kde_save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +AC_TRY_LINK(dnl +[ +#include +], +[ + char buf[42]; + gzFile f = (gzFile) 0; + /* this would segfault.. but we only link, don't run */ + (void) gzgets(f, buf, sizeof(buf)); + + return (zlibVersion() == ZLIB_VERSION); +], + eval "ac_cv_lib_z='-lz'", + eval "ac_cv_lib_z=no") +LIBS="$kde_save_LIBS" +CFLAGS="$kde_save_CFLAGS" +])dnl +if test ! "$ac_cv_lib_z" = no; then + AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz]) + LIBZ="$ac_cv_lib_z" + AC_MSG_RESULT($ac_cv_lib_z) +else + AC_MSG_ERROR(not found. + Possibly configure picks up an outdated version + installed by XFree86. Remove it from your system. + + Check your installation and look into config.log) + LIBZ="" +fi +AC_SUBST(LIBZ) +]) + +AC_DEFUN([KDE_TRY_TIFFLIB], +[ +AC_MSG_CHECKING([for libtiff $1]) + +AC_CACHE_VAL(kde_cv_libtiff_$1, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +kde_save_LIBS="$LIBS" +if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then +LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm" +else +LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm" +fi +kde_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" + +AC_TRY_LINK(dnl +[ +#include +], + [return (TIFFOpen( "", "r") == 0); ], +[ + kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ" +], [ + kde_cv_libtiff_$1=no +]) + +LIBS="$kde_save_LIBS" +CXXFLAGS="$kde_save_CXXFLAGS" +AC_LANG_RESTORE +]) + +if test "$kde_cv_libtiff_$1" = "no"; then + AC_MSG_RESULT(no) + LIBTIFF="" + $3 +else + LIBTIFF="$kde_cv_libtiff_$1" + AC_MSG_RESULT(yes) + AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff]) + $2 +fi + +]) + +AC_DEFUN([AC_FIND_TIFF], +[ +AC_REQUIRE([K_PATH_X]) +AC_REQUIRE([AC_FIND_ZLIB]) +AC_REQUIRE([AC_FIND_JPEG]) +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) + +KDE_TRY_TIFFLIB(tiff, [], + KDE_TRY_TIFFLIB(tiff34)) + +AC_SUBST(LIBTIFF) +]) + +AC_DEFUN([KDE_FIND_LIBEXR], +[ +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) +AC_REQUIRE([AC_FIND_ZLIB]) +AC_CACHE_VAL(ac_cv_libexr, +[ + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + AC_MSG_CHECKING([for OpenEXR libraries]) + + if test "$PKG_CONFIG" = "no" ; then + AC_MSG_RESULT(no) + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + if !(`$PKG_CONFIG --exists OpenEXR`) ; then + AC_MSG_RESULT(no) + EXRSTATUS=no + else + if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then + AC_MSG_RESULT(no) + EXRSTATUS=old + else + kde_save_LIBS="$LIBS" + LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ" + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + kde_save_CXXFLAGS="$CXXFLAGS" + EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR` + CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS" + + AC_TRY_LINK(dnl + [ + #include + ], + [ + using namespace Imf; + RgbaInputFile file ("dummy"); + return 0; + ], + eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'", + eval "ac_cv_libexr=no" + ) + LIBS="$kde_save_LIBS" + CXXFLAGS="$kde_save_CXXFLAGS" + AC_LANG_RESTORE + ])dnl + if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then + AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR]) + LIB_EXR="$ac_cv_libexr" + AC_MSG_RESULT($ac_cv_libexr) + else + AC_MSG_RESULT(no) + LIB_EXR="" + fi + fi + fi + fi + AC_SUBST(LIB_EXR) + AC_SUBST(EXR_FLAGS) +]) + + + +AC_DEFUN([AC_FIND_PNG], +[ +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) +AC_REQUIRE([AC_FIND_ZLIB]) +AC_MSG_CHECKING([for libpng]) +AC_CACHE_VAL(ac_cv_lib_png, +[ +kde_save_LIBS="$LIBS" +if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then +LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET" +else +LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm" +fi +kde_save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" + +AC_TRY_LINK(dnl + [ + #include + ], + [ + png_structp png_ptr = png_create_read_struct( /* image ptr */ + PNG_LIBPNG_VER_STRING, 0, 0, 0 ); + return( png_ptr != 0 ); + ], + eval "ac_cv_lib_png='-lpng $LIBZ -lm'", + eval "ac_cv_lib_png=no" +) +LIBS="$kde_save_LIBS" +CFLAGS="$kde_save_CFLAGS" +])dnl +if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then + AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng]) + LIBPNG="$ac_cv_lib_png" + AC_SUBST(LIBPNG) + AC_MSG_RESULT($ac_cv_lib_png) +else + AC_MSG_RESULT(no) + LIBPNG="" + AC_SUBST(LIBPNG) +fi +]) + + +AC_DEFUN([AC_FIND_JASPER], +[ +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) +AC_REQUIRE([AC_FIND_JPEG]) +AC_MSG_CHECKING([for jasper]) +AC_CACHE_VAL(ac_cv_jasper, +[ +kde_save_LIBS="$LIBS" +LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm" +kde_save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" + +AC_TRY_LINK(dnl + [ + #include + ], + [ + return( jas_init() ); + ], + eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'", + eval "ac_cv_jasper=no" +) +LIBS="$kde_save_LIBS" +CFLAGS="$kde_save_CFLAGS" +])dnl +if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then + AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper]) + LIB_JASPER="$ac_cv_jasper" + AC_MSG_RESULT($ac_cv_jasper) +else + AC_MSG_RESULT(no) + LIB_JASPER="" +fi +AC_SUBST(LIB_JASPER) +]) + +AC_DEFUN([AC_CHECK_BOOL], +[ + AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool]) +]) + +AC_DEFUN([AC_CHECK_GNU_EXTENSIONS], +[ +AC_MSG_CHECKING(if you need GNU extensions) +AC_CACHE_VAL(ac_cv_gnu_extensions, +[ +cat > conftest.c << EOF +#include + +#ifdef __GNU_LIBRARY__ +yes +#endif +EOF + +if (eval "$ac_cpp conftest.c") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_gnu_extensions=yes +else + ac_cv_gnu_extensions=no +fi +]) + +AC_MSG_RESULT($ac_cv_gnu_extensions) +if test "$ac_cv_gnu_extensions" = "yes"; then + AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) +fi +]) + +AC_DEFUN([KDE_CHECK_COMPILER_FLAG], +[ +AC_MSG_CHECKING([whether $CXX supports -$1]) +kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'` +AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache, +[ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -$1" + AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], []) + CXXFLAGS="$save_CXXFLAGS" + AC_LANG_RESTORE +]) +if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then + AC_MSG_RESULT(yes) + : + $2 +else + AC_MSG_RESULT(no) + : + $3 +fi +]) + +AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG], +[ +AC_MSG_CHECKING([whether $CC supports -$1]) +kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'` +AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache, +[ + AC_LANG_SAVE + AC_LANG_C + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -$1" + AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], []) + CFLAGS="$save_CFLAGS" + AC_LANG_RESTORE +]) +if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then + AC_MSG_RESULT(yes) + : + $2 +else + AC_MSG_RESULT(no) + : + $3 +fi +]) + + +dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables +dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever]) +dnl it's all white-space separated +AC_DEFUN([AC_REMOVE_FORBIDDEN], +[ __val=$$1 + __forbid=" $2 " + if test -n "$__val"; then + __new="" + ac_save_IFS=$IFS + IFS=" " + for i in $__val; do + case "$__forbid" in + *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;; + *) # Careful to not add spaces, where there were none, because otherwise + # libtool gets confused, if we change e.g. CXX + if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;; + esac + done + IFS=$ac_save_IFS + $1=$__new + fi +]) + + +AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER], +[ + AC_MSG_CHECKING([whether $CC is blacklisted]) + + dnl In theory we have tu run this test against $CC and $CXX + dnl in C and in C++ mode, because its perfectly legal for + dnl the user to mix compiler versions, since C has a defined + dnl ABI. + dnl + dnl For now, we assume the user is not on crack. + + AC_TRY_COMPILE([ +#ifdef __GNUC__ +#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0 +choke me +#endif +#endif +], , + kde_bad_compiler=no, + kde_bad_compiler=yes +) + + AC_MSG_RESULT($kde_bad_compiler) + +if test "$kde_bad_compiler" = "yes"; then + AC_MSG_ERROR([ + +This particular compiler version is blacklisted because it +is known to miscompile KDE. Please use a newer version, or +if that is not yet available, choose an older version. + +Please do not report a bug or bother us reporting this +configure error. We know about it, and we introduced +it by intention to avoid untraceable bugs or crashes in KDE. + +]) +fi + +]) + + +AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH], +[ + AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline], + kde_cv_opt_noinline_match, + [ + kde_cv_opt_noinline_match=irrelevant + dnl if we don't use both -O2 and -fno-inline, this check is moot + if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \ + && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then + + ac_cflags_save="$CFLAGS" + CFLAGS="$CFLAGS -D_USE_GNU" + + AC_TRY_LINK([ + #include +], [ const char *pt, *et; + et = __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p ( ";," ) && ((size_t)(const void *)(( ";," )+ 1) - (size_t)(const void *)( ";," ) == 1) ? ((__a0 =((__const char *) ( ";," ))[0], __a0 == '\0') ? ((void) ( pt ),((void *)0) ) : ((__a1 = ((__const char *) ( ";," ))[1], __a1== '\0') ? (__extension__ (__builtin_constant_p ( __a0 ) && ( __a0 ) == '\0' ? (char *) __rawmemchr ( pt , __a0) : strchr( pt , __a0 ))) : ((__a2 = ((__const char *) ( ";," ))[2], __a2 == '\0') ? __strpbrk_c2 ( pt , __a0, __a1) :(((__const char *) ( ";," ))[3] == '\0' ? __strpbrk_c3 ( pt ,__a0, __a1, __a2): strpbrk ( pt , ";," ))))) : strpbrk ( pt , ";," )); }) ; +], + kde_cv_opt_noinline_match=yes, + kde_cv_opt_noinline_match=no + ) + + CFLAGS="$ac_cflags_save" + fi + ]) +]) + + +dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given +AC_DEFUN([AC_VALIDIFY_CXXFLAGS], +[dnl +if test "x$kde_use_qt_emb" != "xyes"; then + AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath]) + AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath]) +else + AC_REMOVE_FORBIDDEN(CXX, [-rpath]) + AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath]) +fi +]) + +AC_DEFUN([AC_CHECK_COMPILERS], +[ + AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]), + [ + case $enableval in + yes) + kde_use_debug_code="yes" + kde_use_debug_define=no + ;; + full) + kde_use_debug_code="full" + kde_use_debug_define=no + ;; + *) + kde_use_debug_code="no" + kde_use_debug_define=yes + ;; + esac + ], + [kde_use_debug_code="no" + kde_use_debug_define=no + ]) + + dnl Just for configure --help + AC_ARG_ENABLE(dummyoption, + AC_HELP_STRING([--disable-debug], + [disables debug output and debug symbols [default=no]]), + [],[]) + + AC_ARG_ENABLE(strict, + AC_HELP_STRING([--enable-strict], + [compiles with strict compiler options (may not work!)]), + [ + if test $enableval = "no"; then + kde_use_strict_options="no" + else + kde_use_strict_options="yes" + fi + ], [kde_use_strict_options="no"]) + + AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]), + [ + if test $enableval = "no"; then + kde_use_warnings="no" + else + kde_use_warnings="yes" + fi + ], [kde_use_warnings="yes"]) + + dnl enable warnings for debug build + if test "$kde_use_debug_code" != "no"; then + kde_use_warnings=yes + fi + + AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]), + [kde_use_profiling=$enableval], + [kde_use_profiling="no"] + ) + + dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS + CFLAGS=" $CFLAGS" + + AC_PROG_CC + + AC_PROG_CPP + + if test "$GCC" = "yes"; then + if test "$kde_use_debug_code" != "no"; then + if test $kde_use_debug_code = "full"; then + CFLAGS="-g3 -fno-inline $CFLAGS" + else + CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS" + fi + else + CFLAGS="-O2 $CFLAGS" + fi + fi + + if test "$kde_use_debug_define" = "yes"; then + CFLAGS="-DNDEBUG $CFLAGS" + fi + + + case "$host" in + *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";; + *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";; + esac + + if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then + LDFLAGS="" + fi + + CXXFLAGS=" $CXXFLAGS" + + AC_PROG_CXX + + KDE_CHECK_FOR_BAD_COMPILER + + if test "$GXX" = "yes" || test "$CXX" = "KCC"; then + if test "$kde_use_debug_code" != "no"; then + if test "$CXX" = "KCC"; then + CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS" + else + if test "$kde_use_debug_code" = "full"; then + CXXFLAGS="-g3 -fno-inline $CXXFLAGS" + else + CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS" + fi + fi + KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"]) + + dnl convenience compiler flags + KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""]) + AC_SUBST(WOVERLOADED_VIRTUAL) + else + if test "$CXX" = "KCC"; then + CXXFLAGS="+K3 $CXXFLAGS" + else + CXXFLAGS="-O2 $CXXFLAGS" + fi + fi + fi + + if test "$kde_use_debug_define" = "yes"; then + CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS" + fi + + if test "$kde_use_profiling" = "yes"; then + KDE_CHECK_COMPILER_FLAG(pg, + [ + CFLAGS="-pg $CFLAGS" + CXXFLAGS="-pg $CXXFLAGS" + ]) + fi + + if test "$kde_use_warnings" = "yes"; then + if test "$GCC" = "yes"; then + CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS" + case $host in + *-*-linux-gnu) + CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" + CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS" + KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"]) + KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"]) + ;; + esac + KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"]) + KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"]) + dnl ### FIXME: revert for KDE 4 + KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"]) + fi + fi + + if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then + CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS" + fi + + AC_ARG_ENABLE(pch, + AC_HELP_STRING([--enable-pch], + [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]), + [ kde_use_pch=$enableval ],[ kde_use_pch=no ]) + + HAVE_GCC_VISIBILITY=0 + AC_SUBST([HAVE_GCC_VISIBILITY]) + + if test "$GXX" = "yes"; then + gcc_no_reorder_blocks=NO + KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES]) + if test $kde_use_debug_code != "no" && \ + test $kde_use_debug_code != "full" && \ + test "YES" = "$gcc_no_reorder_blocks" ; then + CXXFLAGS="$CXXFLAGS -fno-reorder-blocks" + CFLAGS="$CFLAGS -fno-reorder-blocks" + fi + KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"]) + KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"]) + KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"]) + KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= ) + ENABLE_PERMISSIVE_FLAG="-fpermissive" + + if test "$kde_use_pch" = "yes"; then + AC_MSG_CHECKING(whether gcc supports precompiling c header files) + echo >conftest.h + if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then + kde_gcc_supports_pch=yes + AC_MSG_RESULT(yes) + else + kde_gcc_supports_pch=no + AC_MSG_RESULT(no) + fi + if test "$kde_gcc_supports_pch" = "yes"; then + AC_MSG_CHECKING(whether gcc supports precompiling c++ header files) + if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then + kde_gcc_supports_pch=yes + AC_MSG_RESULT(yes) + else + kde_gcc_supports_pch=no + AC_MSG_RESULT(no) + fi + fi + rm -f conftest.h conftest.h.gch + fi + + KDE_CHECK_FOR_OPT_NOINLINE_MATCH + if test "x$kde_cv_opt_noinline_match" = "xno" ; then + CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`" + fi + fi + AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes") + if test "$CXX" = "KCC"; then + dnl unfortunately we currently cannot disable exception support in KCC + dnl because doing so is binary incompatible and Qt by default links with exceptions :-( + dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"]) + dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= ) + + if test "$kde_use_pch" = "yes"; then + dnl TODO: support --pch-dir! + KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"]) + dnl the below works (but the dir must exist), but it's + dnl useless for a whole package. + dnl The are precompiled headers for each source file, so when compiling + dnl from scratch, it doesn't make a difference, and they take up + dnl around ~5Mb _per_ sourcefile. + dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp, + dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"]) + fi + dnl this flag controls inlining. by default KCC inlines in optimisation mode + dnl all implementations that are defined inside the class {} declaration. + dnl because of templates-compatibility with broken gcc compilers, this + dnl can cause excessive inlining. This flag limits it to a sane level + KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"]) + KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"]) + KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"]) + KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"]) + dnl Some source files are shared between multiple executables + dnl (or libraries) and some of those need template instantiations. + dnl In that case KCC needs to compile those sources with + dnl --one_instantiation_per_object. To make it easy for us we compile + dnl _all_ objects with that flag (--one_per is a shorthand). + KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"]) + fi + AC_SUBST(USE_EXCEPTIONS) + dnl obsolete macro - provided to keep things going + USE_RTTI= + AC_SUBST(USE_RTTI) + + case "$host" in + *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;; + *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";; + *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";; + *-*-solaris*) + if test "$GXX" = yes; then + libstdcpp=`$CXX -print-file-name=libstdc++.so` + if test ! -f $libstdcpp; then + AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so]) + fi + fi + ;; + esac + + AC_VALIDIFY_CXXFLAGS + + AC_PROG_CXXCPP + + if test "$GCC" = yes; then + NOOPT_CFLAGS=-O0 + fi + KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0]) + + AC_ARG_ENABLE(coverage, + AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [ + if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then + ac_coverage_compiler="-fprofile-arcs -ftest-coverage" + ac_coverage_linker="-lgcc" + elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then + ac_coverage_compiler="-fprofile-arcs -ftest-coverage" + ac_coverage_linker="" + else + AC_MSG_ERROR([coverage with your compiler is not supported]) + fi + CFLAGS="$CFLAGS $ac_coverage_compiler" + CXXFLAGS="$CXXFLAGS $ac_coverage_compiler" + LDFLAGS="$LDFLAGS $ac_coverage_linker" + ]) + + AC_SUBST(NOOPT_CXXFLAGS) + AC_SUBST(NOOPT_CFLAGS) + AC_SUBST(ENABLE_PERMISSIVE_FLAG) + + KDE_CHECK_NEW_LDFLAGS + KDE_CHECK_FINAL + KDE_CHECK_CLOSURE + KDE_CHECK_NMCHECK + + ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), []) +]) + +AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG], + [ + AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug, + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + safe_CXXFLAGS=$CXXFLAGS + safe_LDFLAGS=$LDFLAGS + CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0" + LDFLAGS="$LDFLAGS -shared -fPIC" + + AC_TRY_LINK( + [ + /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */ + #include + int some_function( void ) __attribute__ ((visibility("default"))); + int some_function( void ) + { + std::string s("blafasel"); + return 0; + } + ], [/* elvis is alive */], + kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes) + + CXXFLAGS=$safe_CXXFLAGS + LDFLAGS=$safe_LDFLAGS + AC_LANG_RESTORE + ] + ) + + if test x$kde_cv_val_gcc_visibility_bug = xno; then + CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" + fi + ] +) + +AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY], +[ + AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY]) + + AC_MSG_CHECKING([grepping for visibility push/pop in headers]) + + if test "x$GXX" = "xyes"; then + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_EGREP_CPP( + [GCC visibility push], + [ #include + ], + [ + AC_MSG_RESULT(yes) + kde_stdc_visibility_patched=yes ], + [ + AC_MSG_RESULT(no) + AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for + visibility support. Disabling -fvisibility=hidden]) + + kde_stdc_visibility_patched=no ]) + + AC_LANG_RESTORE + + kde_have_gcc_visibility=no + KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, + [ + kde_have_gcc_visibility=yes + dnl the whole toolchain is just a mess, gcc is just too buggy + dnl to handle STL with visibility enabled. Lets reconsider + dnl when gcc 4.2 is out or when things get fixed in the compiler. + dnl Contact mueller@kde.org for details. + AC_ARG_ENABLE(gcc-hidden-visibility, + AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]), + [kde_have_gcc_visibility=$enableval], + [kde_have_gcc_visibility=no]) + + AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched, + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + safe_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $all_includes" + + AC_TRY_COMPILE( + [ +#include +#if Q_EXPORT - 0 != 0 +/* if this compiles, then Q_EXPORT is undefined */ +/* if Q_EXPORT is nonempty, this will break compilation */ +#endif + ], [/* elvis is alive */], + kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes) + + CXXFLAGS=$safe_CXXFLAGS + AC_LANG_RESTORE + ] + ) + + if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then + CXXFLAGS="$CXXFLAGS -fvisibility=hidden" + KDE_CHECK_VISIBILITY_GCC_BUG + HAVE_GCC_VISIBILITY=1 + AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported]) + fi + ]) + fi +]) + +AC_DEFUN([KDE_ADD_DEPENDENCIES], +[ + [A]M_DEPENDENCIES(CC) + [A]M_DEPENDENCIES(CXX) +]) + +dnl just a wrapper to clean up configure.in +AC_DEFUN([KDE_PROG_LIBTOOL], +[ +AC_REQUIRE([AC_CHECK_COMPILERS]) +AC_REQUIRE([AC_ENABLE_SHARED]) +AC_REQUIRE([AC_ENABLE_STATIC]) + +AC_REQUIRE([AC_LIBTOOL_DLOPEN]) +AC_REQUIRE([KDE_CHECK_LIB64]) + +AC_OBJEXT +AC_EXEEXT + +AM_PROG_LIBTOOL +AC_LIBTOOL_CXX + +LIBTOOL_SHELL="/bin/sh ./libtool" +# LIBTOOL="$LIBTOOL --silent" +KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)" +AC_SUBST(KDE_PLUGIN) + +# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs. +KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)" +AC_SUBST(KDE_CHECK_PLUGIN) + +# we patch configure quite some so we better keep that consistent for incremental runs +AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure') +]) + +AC_DEFUN([KDE_CHECK_LIB64], +[ + AC_ARG_ENABLE(libsuffix, + AC_HELP_STRING([--enable-libsuffix], + [/lib directory suffix (64,32,none,auto[=default])]), + kdelibsuff=$enableval, kdelibsuff="auto") + + if test "$kdelibsuff" = "auto"; then + +cat > conftest.c << EOF +#include +int main() { + return 0; +} +EOF + kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{ + s,.*/lib\([[^\/]]*\)/.*,\1, + p +}'` + rm -rf conftest.* + fi + + if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then + kdelibsuff= + fi + if test -z "$kdelibsuff"; then + AC_MSG_RESULT([not using lib directory suffix]) + AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories) + else + if test "$libdir" = '${exec_prefix}/lib'; then + libdir="$libdir${kdelibsuff}" + AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms + fi + AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories) + AC_MSG_RESULT([using lib directory suffix $kdelibsuff]) + fi +]) + +AC_DEFUN([KDE_CHECK_TYPES], +[ AC_CHECK_SIZEOF(int, 4)dnl + AC_CHECK_SIZEOF(short)dnl + AC_CHECK_SIZEOF(long, 4)dnl + AC_CHECK_SIZEOF(char *, 4)dnl +])dnl + +dnl Not used - kept for compat only? +AC_DEFUN([KDE_DO_IT_ALL], +[ +AC_CANONICAL_SYSTEM +AC_ARG_PROGRAM +AM_INIT_AUTOMAKE($1, $2) +AM_DISABLE_LIBRARIES +AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) +AC_CHECK_COMPILERS +KDE_PROG_LIBTOOL +AM_KDE_WITH_NLS +AC_PATH_KDE +]) + +AC_DEFUN([AC_CHECK_RPATH], +[ +AC_MSG_CHECKING(for rpath) +AC_ARG_ENABLE(rpath, + AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]), + USE_RPATH=$enableval, USE_RPATH=yes) + +if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then + + KDE_RPATH="-R \$(libdir)" + + if test "$kde_libraries" != "$libdir"; then + KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)" + fi + + if test -n "$qt_libraries"; then + KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)" + fi + dnl $x_libraries is set to /usr/lib in case + if test -n "$X_LDFLAGS"; then + X_RPATH="-R \$(x_libraries)" + KDE_RPATH="$KDE_RPATH $X_RPATH" + fi + if test -n "$KDE_EXTRA_RPATH"; then + KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)" + fi +fi +AC_SUBST(KDE_EXTRA_RPATH) +AC_SUBST(KDE_RPATH) +AC_SUBST(X_RPATH) +AC_MSG_RESULT($USE_RPATH) +]) + +dnl Check for the type of the third argument of getsockname +AC_DEFUN([AC_CHECK_SOCKLEN_T], +[ + AC_MSG_CHECKING(for socklen_t) + AC_CACHE_VAL(kde_cv_socklen_t, + [ + AC_LANG_PUSH(C++) + kde_cv_socklen_t=no + AC_TRY_COMPILE([ + #include + #include + ], + [ + socklen_t len; + getpeername(0,0,&len); + ], + [ + kde_cv_socklen_t=yes + kde_cv_socklen_t_equiv=socklen_t + ]) + AC_LANG_POP(C++) + ]) + AC_MSG_RESULT($kde_cv_socklen_t) + if test $kde_cv_socklen_t = no; then + AC_MSG_CHECKING([for socklen_t equivalent for socket functions]) + AC_CACHE_VAL(kde_cv_socklen_t_equiv, + [ + kde_cv_socklen_t_equiv=int + AC_LANG_PUSH(C++) + for t in int size_t unsigned long "unsigned long"; do + AC_TRY_COMPILE([ + #include + #include + ], + [ + $t len; + getpeername(0,0,&len); + ], + [ + kde_cv_socklen_t_equiv="$t" + break + ]) + done + AC_LANG_POP(C++) + ]) + AC_MSG_RESULT($kde_cv_socklen_t_equiv) + fi + AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined]) + AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)]) +]) + +dnl This is a merge of some macros out of the gettext aclocal.m4 +dnl since we don't need anything, I took the things we need +dnl the copyright for them is: +dnl > +dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +dnl This Makefile.in is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. +dnl > +dnl for this file it is relicensed under LGPL + +AC_DEFUN([AM_KDE_WITH_NLS], + [ + dnl If we use NLS figure out what method + + AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, + [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then + AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + MSGFMT=$GMSGFMT + AC_SUBST(GMSGFMT) + AC_SUBST(MSGFMT) + + AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext programs is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + AC_SUBST(XGETTEXT) + + ]) + +# Search path for a program which passes the given test. +# Ulrich Drepper , 1996. + +# serial 1 +# Stephan Kulow: I appended a _KDE against name conflicts + +dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE], +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + + +# Check whether LC_MESSAGES is available in . +# Ulrich Drepper , 1995. + +# serial 1 + +AC_DEFUN([AM_LC_MESSAGES], + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES]) + fi + fi]) + +dnl From Jim Meyering. +dnl FIXME: migrate into libit. + +AC_DEFUN([AM_FUNC_OBSTACK], +[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack, + [AC_TRY_LINK([#include "obstack.h"], + [struct obstack *mem;obstack_free(mem,(char *) 0)], + am_cv_func_obstack=yes, + am_cv_func_obstack=no)]) + if test $am_cv_func_obstack = yes; then + AC_DEFINE(HAVE_OBSTACK) + else + LIBOBJS="$LIBOBJS obstack.o" + fi +]) + +dnl From Jim Meyering. Use this if you use the GNU error.[ch]. +dnl FIXME: Migrate into libit + +AC_DEFUN([AM_FUNC_ERROR_AT_LINE], +[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, + [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], + am_cv_lib_error_at_line=yes, + am_cv_lib_error_at_line=no)]) + if test $am_cv_lib_error_at_line = no; then + LIBOBJS="$LIBOBJS error.o" + fi + AC_SUBST(LIBOBJS)dnl +]) + +# Macro to add for using GNU gettext. +# Ulrich Drepper , 1995. + +# serial 1 +# Stephan Kulow: I put a KDE in it to avoid name conflicts + +AC_DEFUN([AM_KDE_GNU_GETTEXT], + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([AM_KDE_WITH_NLS])dnl + AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \ +__argz_count __argz_stringify __argz_next]) + + AC_MSG_CHECKING(for stpcpy) + AC_CACHE_VAL(kde_cv_func_stpcpy, + [ + kde_safe_cxxflags=$CXXFLAGS + CXXFLAGS="-Werror" + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ + #include + ], + [ + char buffer[200]; + stpcpy(buffer, buffer); + ], + kde_cv_func_stpcpy=yes, + kde_cv_func_stpcpy=no) + AC_LANG_RESTORE + CXXFLAGS=$kde_safe_cxxflags + ]) + AC_MSG_RESULT($kde_cv_func_stpcpy) + if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then + AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy]) + fi + + AM_LC_MESSAGES + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + ]) + +AC_DEFUN([AC_HAVE_XPM], + [AC_REQUIRE_CPP()dnl + AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) + + test -z "$XPM_LDFLAGS" && XPM_LDFLAGS= + test -z "$XPM_INCLUDE" && XPM_INCLUDE= + + AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]), + xpm_test=$withval, xpm_test="yes") + if test "x$xpm_test" = xno; then + ac_cv_have_xpm=no + else + AC_MSG_CHECKING(for XPM) + AC_CACHE_VAL(ac_cv_have_xpm, + [ + ac_save_ldflags="$LDFLAGS" + ac_save_cflags="$CFLAGS" + if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then + LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET" + else + LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET" + fi + CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES" + test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS" + AC_TRY_LINK([#include ],[], + ac_cv_have_xpm="yes",ac_cv_have_xpm="no") + LDFLAGS="$ac_save_ldflags" + CFLAGS="$ac_save_cflags" + ])dnl + + if test "$ac_cv_have_xpm" = no; then + AC_MSG_RESULT(no) + XPM_LDFLAGS="" + XPMINC="" + $2 + else + AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support]) + if test "$XPM_LDFLAGS" = ""; then + XPMLIB='-lXpm $(LIB_X11)' + else + XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)' + fi + if test "$XPM_INCLUDE" = ""; then + XPMINC="" + else + XPMINC="-I$XPM_INCLUDE" + fi + AC_MSG_RESULT(yes) + $1 + fi + fi + AC_SUBST(XPMINC) + AC_SUBST(XPMLIB) +]) + +AC_DEFUN([AC_HAVE_DPMS], + [AC_REQUIRE_CPP()dnl + AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) + + test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS= + test -z "$DPMS_INCLUDE" && DPMS_INCLUDE= + DPMS_LIB= + + AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]), + dpms_test=$withval, dpms_test="yes") + if test "x$dpms_test" = xno; then + ac_cv_have_dpms=no + else + AC_MSG_CHECKING(for DPMS) + dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms. + dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms". + AC_CACHE_VAL(ac_cv_have_dpms, + [ + if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then + AC_MSG_RESULT(no) + ac_cv_have_dpms="no" + else + ac_save_ldflags="$LDFLAGS" + ac_save_cflags="$CFLAGS" + ac_save_libs="$LIBS" + LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries" + LIBS="-lX11 -lXext $LIBSOCKET" + CFLAGS="$CFLAGS $X_INCLUDES" + test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" + AC_TRY_LINK([ + #include + #include + #include + #include + int foo_test_dpms() + { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], + ac_cv_have_dpms="yes", [ + LIBS="-lXdpms $LIBS" + AC_TRY_LINK([ + #include + #include + #include + #include + int foo_test_dpms() + { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], + [ + ac_cv_have_dpms="-lXdpms" + ],ac_cv_have_dpms="no") + ]) + LDFLAGS="$ac_save_ldflags" + CFLAGS="$ac_save_cflags" + LIBS="$ac_save_libs" + fi + ])dnl + + if test "$ac_cv_have_dpms" = no; then + AC_MSG_RESULT(no) + DPMS_LDFLAGS="" + DPMSINC="" + $2 + else + AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support]) + if test "$ac_cv_have_dpms" = "-lXdpms"; then + DPMS_LIB="-lXdpms" + fi + if test "$DPMS_LDFLAGS" = ""; then + DPMSLIB="$DPMS_LIB "'$(LIB_X11)' + else + DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)' + fi + if test "$DPMS_INCLUDE" = ""; then + DPMSINC="" + else + DPMSINC="-I$DPMS_INCLUDE" + fi + AC_MSG_RESULT(yes) + $1 + fi + fi + ac_save_cflags="$CFLAGS" + CFLAGS="$CFLAGS $X_INCLUDES" + test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" + AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO, + [Define if you have the DPMSCapable prototype in ]) + AC_CHECK_DECL(DPMSCapable, + AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),, + [#include + #include ]) + AH_TEMPLATE(HAVE_DPMSINFO_PROTO, + [Define if you have the DPMSInfo prototype in ]) + AC_CHECK_DECL(DPMSInfo, + AC_DEFINE(HAVE_DPMSINFO_PROTO),, + [#include + #include ]) + CFLAGS="$ac_save_cflags" + AC_SUBST(DPMSINC) + AC_SUBST(DPMSLIB) +]) + +AC_DEFUN([AC_HAVE_GL], + [AC_REQUIRE_CPP()dnl + AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) + + test -z "$GL_LDFLAGS" && GL_LDFLAGS= + test -z "$GL_INCLUDE" && GL_INCLUDE= + + AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]), + gl_test=$withval, gl_test="yes") + if test "x$kde_use_qt_emb" = "xyes"; then + # GL and Qt Embedded is a no-go for now. + ac_cv_have_gl=no + elif test "x$gl_test" = xno; then + ac_cv_have_gl=no + else + AC_MSG_CHECKING(for GL) + AC_CACHE_VAL(ac_cv_have_gl, + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + ac_save_ldflags=$LDFLAGS + ac_save_cxxflags=$CXXFLAGS + ac_save_libs=$LIBS + LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries" + LIBS="$LIBS -lGL -lGLU" + test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11" + LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET" + CXXFLAGS="$CFLAGS $X_INCLUDES" + test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" + AC_TRY_LINK([#include +#include +], [], + ac_cv_have_gl="yes", ac_cv_have_gl="no") + AC_LANG_RESTORE + LDFLAGS=$ac_save_ldflags + CXXFLAGS=$ac_save_cxxflags + LIBS=$ac_save_libs + ])dnl + + if test "$ac_cv_have_gl" = "no"; then + AC_MSG_RESULT(no) + GL_LDFLAGS="" + GLINC="" + $2 + else + AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)]) + if test "$GL_LDFLAGS" = ""; then + GLLIB='-lGLU -lGL $(LIB_X11)' + else + GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)' + fi + if test "$GL_INCLUDE" = ""; then + GLINC="" + else + GLINC="-I$GL_INCLUDE" + fi + AC_MSG_RESULT($ac_cv_have_gl) + $1 + fi + fi + AC_SUBST(GLINC) + AC_SUBST(GLLIB) +]) + + + dnl shadow password and PAM magic - maintained by ossi@kde.org + +AC_DEFUN([KDE_PAM], [ + AC_REQUIRE([KDE_CHECK_LIBDL]) + + want_pam= + AC_ARG_WITH(pam, + AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]), + [ if test "x$withval" = "xyes"; then + want_pam=yes + pam_service=kde + elif test "x$withval" = "xno"; then + want_pam=no + else + want_pam=yes + pam_service=$withval + fi + ], [ pam_service=kde ]) + + use_pam= + PAMLIBS= + if test "x$want_pam" != xno; then + AC_CHECK_LIB(pam, pam_start, [ + AC_CHECK_HEADER(security/pam_appl.h, + [ pam_header=security/pam_appl.h ], + [ AC_CHECK_HEADER(pam/pam_appl.h, + [ pam_header=pam/pam_appl.h ], + [ + AC_MSG_WARN([PAM detected, but no headers found! +Make sure you have the necessary development packages installed.]) + ] + ) + ] + ) + ], , $LIBDL) + if test -z "$pam_header"; then + if test "x$want_pam" = xyes; then + AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!]) + fi + else + AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)]) + PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL" + use_pam=yes + + dnl darwin claims to be something special + if test "$pam_header" = "pam/pam_appl.h"; then + AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/]) + fi + + dnl test whether struct pam_message is const (Linux) or not (Sun) + AC_MSG_CHECKING(for const pam_message) + AC_EGREP_HEADER([struct pam_message], $pam_header, + [ AC_EGREP_HEADER([const struct pam_message], $pam_header, + [AC_MSG_RESULT([const: Linux-type PAM])], + [AC_MSG_RESULT([nonconst: Sun-type PAM]) + AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])] + )], + [AC_MSG_RESULT([not found - assume const, Linux-type PAM])]) + fi + fi + + AC_SUBST(PAMLIBS) +]) + +dnl DEF_PAM_SERVICE(arg name, full name, define name) +AC_DEFUN([DEF_PAM_SERVICE], [ + AC_ARG_WITH($1-pam, + AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]), + [ if test "x$use_pam" = xyes; then + $3_PAM_SERVICE=$withval + else + AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected. +You may want to enforce it by using --with-pam.]) + fi + ], + [ if test "x$use_pam" = xyes; then + $3_PAM_SERVICE="$pam_service" + fi + ]) + if test -n "$$3_PAM_SERVICE"; then + AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE]) + AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2]) + fi + AC_SUBST($3_PAM_SERVICE) +]) + +AC_DEFUN([KDE_SHADOWPASSWD], [ + AC_REQUIRE([KDE_PAM]) + + AC_CHECK_LIB(shadow, getspent, + [ LIBSHADOW="-lshadow" + ac_use_shadow=yes + ], + [ dnl for UnixWare + AC_CHECK_LIB(gen, getspent, + [ LIBGEN="-lgen" + ac_use_shadow=yes + ], + [ AC_CHECK_FUNC(getspent, + [ ac_use_shadow=yes ], + [ ac_use_shadow=no ]) + ]) + ]) + AC_SUBST(LIBSHADOW) + AC_SUBST(LIBGEN) + + AC_MSG_CHECKING([for shadow passwords]) + + AC_ARG_WITH(shadow, + AC_HELP_STRING([--with-shadow],[If you want shadow password support]), + [ if test "x$withval" != "xno"; then + use_shadow=yes + else + use_shadow=no + fi + ], [ + use_shadow="$ac_use_shadow" + ]) + + if test "x$use_shadow" = xyes; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords]) + else + AC_MSG_RESULT(no) + LIBSHADOW= + LIBGEN= + fi + + dnl finally make the relevant binaries setuid root, if we have shadow passwds. + dnl this still applies, if we could use it indirectly through pam. + if test "x$use_shadow" = xyes || + ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then + case $host in + *-*-freebsd* | *-*-netbsd* | *-*-openbsd*) + SETUIDFLAGS="-m 4755 -o root";; + *) + SETUIDFLAGS="-m 4755";; + esac + fi + AC_SUBST(SETUIDFLAGS) + +]) + +AC_DEFUN([KDE_PASSWDLIBS], [ + AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT + AC_REQUIRE([KDE_PAM]) + AC_REQUIRE([KDE_SHADOWPASSWD]) + + if test "x$use_pam" = "xyes"; then + PASSWDLIBS="$PAMLIBS" + else + PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN" + fi + + dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but + dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires + dnl root to read, so kcheckpass needs to be root (even when using pam, since pam + dnl may need to read /etc/master.passwd). + case $host in + *-*-freebsd*) + SETUIDFLAGS="-m 4755 -o root" + ;; + *) + ;; + esac + + AC_SUBST(PASSWDLIBS) +]) + +AC_DEFUN([KDE_CHECK_LIBDL], +[ +AC_CHECK_LIB(dl, dlopen, [ +LIBDL="-ldl" +ac_cv_have_dlfcn=yes +]) + +AC_CHECK_LIB(dld, shl_unload, [ +LIBDL="-ldld" +ac_cv_have_shload=yes +]) + +AC_SUBST(LIBDL) +]) + +AC_DEFUN([KDE_CHECK_DLOPEN], +[ +KDE_CHECK_LIBDL +AC_CHECK_HEADERS(dlfcn.h dl.h) +if test "$ac_cv_header_dlfcn_h" = "no"; then + ac_cv_have_dlfcn=no +fi + +if test "$ac_cv_header_dl_h" = "no"; then + ac_cv_have_shload=no +fi + +dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE +dnl (MM) +AC_ARG_ENABLE(dlopen, +AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]), +enable_dlopen=$enableval, +enable_dlopen=yes) + +# override the user's opinion, if we know it better ;) +if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then + enable_dlopen=no +fi + +if test "$ac_cv_have_dlfcn" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn]) +fi + +if test "$ac_cv_have_shload" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload]) +fi + +if test "$enable_dlopen" = no ; then + test -n "$1" && eval $1 +else + test -n "$2" && eval $2 +fi + +]) + +AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING], +[ +KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no) +KDE_PROG_LIBTOOL +AC_MSG_CHECKING([dynamic loading]) +eval "`egrep '^build_libtool_libs=' libtool`" +if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then + dynamic_loading=yes + AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING) +else + dynamic_loading=no +fi +AC_MSG_RESULT($dynamic_loading) +if test "$dynamic_loading" = "yes"; then + $1 +else + $2 +fi +]) + +AC_DEFUN([KDE_ADD_INCLUDES], +[ +if test -z "$1"; then + test_include="Pix.h" +else + test_include="$1" +fi + +AC_MSG_CHECKING([for libg++ ($test_include)]) + +AC_CACHE_VAL(kde_cv_libgpp_includes, +[ +kde_cv_libgpp_includes=no + + for ac_dir in \ + \ + /usr/include/g++ \ + /usr/include \ + /usr/unsupported/include \ + /opt/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$test_include"; then + kde_cv_libgpp_includes=$ac_dir + break + fi + done +]) + +AC_MSG_RESULT($kde_cv_libgpp_includes) +if test "$kde_cv_libgpp_includes" != "no"; then + all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES" +fi +]) +]) + +AC_DEFUN([KDE_CHECK_LIBPTHREAD], +[ + dnl This code is here specifically to handle the + dnl various flavors of threading library on FreeBSD + dnl 4-, 5-, and 6-, and the (weird) rules around it. + dnl There may be an environment PTHREAD_LIBS that + dnl specifies what to use; otherwise, search for it. + dnl -pthread is special cased and unsets LIBPTHREAD + dnl below if found. + LIBPTHREAD="" + + if test -n "$PTHREAD_LIBS"; then + if test "x$PTHREAD_LIBS" = "x-pthread" ; then + LIBPTHREAD="PTHREAD" + else + PTHREAD_LIBS_save="$PTHREAD_LIBS" + PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'` + AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS]) + KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [ + LIBPTHREAD="$PTHREAD_LIBS_save"]) + PTHREAD_LIBS="$PTHREAD_LIBS_save" + fi + fi + + dnl Is this test really needed, in the face of the Tru64 test below? + if test -z "$LIBPTHREAD"; then + AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"]) + fi + + dnl This is a special Tru64 check, see BR 76171 issue #18. + if test -z "$LIBPTHREAD" ; then + AC_MSG_CHECKING([for pthread_create in -lpthread]) + kde_safe_libs=$LIBS + LIBS="$LIBS -lpthread" + AC_TRY_LINK([#include ],[(void)pthread_create(0,0,0,0);],[ + AC_MSG_RESULT(yes) + LIBPTHREAD="-lpthread"],[ + AC_MSG_RESULT(no)]) + LIBS=$kde_safe_libs + fi + + dnl Un-special-case for FreeBSD. + if test "x$LIBPTHREAD" = "xPTHREAD" ; then + LIBPTHREAD="" + fi + + AC_SUBST(LIBPTHREAD) +]) + +AC_DEFUN([KDE_CHECK_PTHREAD_OPTION], +[ + USE_THREADS="" + if test -z "$LIBPTHREAD"; then + KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"]) + fi + + AH_VERBATIM(__svr_define, [ +#if defined(__SVR4) && !defined(__svr4__) +#define __svr4__ 1 +#endif +]) + case $host_os in + solaris*) + KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"]) + CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4" + ;; + freebsd*) + CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS" + ;; + aix*) + CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" + LIBPTHREAD="$LIBPTHREAD -lc_r" + ;; + linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" + if test "$CXX" = "KCC"; then + CXXFLAGS="$CXXFLAGS --thread_safe" + NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe" + fi + ;; + *) + ;; + esac + AC_SUBST(USE_THREADS) + AC_SUBST(LIBPTHREAD) +]) + +AC_DEFUN([KDE_CHECK_THREADING], +[ + AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) + AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION]) + dnl default is yes if libpthread is found and no if no libpthread is available + if test -z "$LIBPTHREAD"; then + if test -z "$USE_THREADS"; then + kde_check_threading_default=no + else + kde_check_threading_default=yes + fi + else + kde_check_threading_default=yes + fi + AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]), + kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default) + if test "x$kde_use_threading" = "xyes"; then + AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)]) + fi +]) + +AC_DEFUN([KDE_TRY_LINK_PYTHON], +[ +if test "$kde_python_link_found" = no; then + +if test "$1" = normal; then + AC_MSG_CHECKING(if a Python application links) +else + AC_MSG_CHECKING(if Python depends on $2) +fi + +AC_CACHE_VAL(kde_cv_try_link_python_$1, +[ +kde_save_cflags="$CFLAGS" +CFLAGS="$CFLAGS $PYTHONINC" +kde_save_libs="$LIBS" +LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET" +kde_save_ldflags="$LDFLAGS" +LDFLAGS="$LDFLAGS $PYTHONLIB" + +AC_TRY_LINK( +[ +#include +],[ + PySys_SetArgv(1, 0); +], + [kde_cv_try_link_python_$1=yes], + [kde_cv_try_link_python_$1=no] +) +CFLAGS="$kde_save_cflags" +LIBS="$kde_save_libs" +LDFLAGS="$kde_save_ldflags" +]) + +if test "$kde_cv_try_link_python_$1" = "yes"; then + AC_MSG_RESULT(yes) + kde_python_link_found=yes + if test ! "$1" = normal; then + LIBPYTHON="$LIBPYTHON $2" + fi + $3 +else + AC_MSG_RESULT(no) + $4 +fi + +fi + +]) + +AC_DEFUN([KDE_CHECK_PYTHON_DIR], +[ +AC_MSG_CHECKING([for Python directory]) + +AC_CACHE_VAL(kde_cv_pythondir, +[ + if test -z "$PYTHONDIR"; then + kde_cv_pythondir=/usr/local + else + kde_cv_pythondir="$PYTHONDIR" + fi +]) + +AC_ARG_WITH(pythondir, +AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]), +[ + ac_python_dir=$withval +], ac_python_dir=$kde_cv_pythondir +) + +AC_MSG_RESULT($ac_python_dir) +]) + +AC_DEFUN([KDE_CHECK_PYTHON_INTERN], +[ +AC_REQUIRE([KDE_CHECK_LIBDL]) +AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) +AC_REQUIRE([KDE_CHECK_PYTHON_DIR]) + +if test -z "$1"; then + version="1.5" +else + version="$1" +fi + +AC_MSG_CHECKING([for Python$version]) + +python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes" +AC_FIND_FILE(Python.h, $python_incdirs, python_incdir) +if test ! -r $python_incdir/Python.h; then + AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir) + python_incdir=$python_incdir/python$version + if test ! -r $python_incdir/Python.h; then + python_incdir=no + fi +fi + +PYTHONINC=-I$python_incdir + +python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs" +AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir) +if test ! -r $python_libdir/libpython$version.so; then + AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir) + if test ! -r $python_libdir/libpython$version.a; then + AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir) + python_libdir=$python_libdir/python$version/config + if test ! -r $python_libdir/libpython$version.a; then + python_libdir=no + fi + fi +fi + +PYTHONLIB=-L$python_libdir +kde_orig_LIBPYTHON=$LIBPYTHON +if test -z "$LIBPYTHON"; then + LIBPYTHON=-lpython$version +fi + +AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir) +python_moddir=$python_moddir/python$version +if test ! -r $python_moddir/copy.py; then + python_moddir=no +fi + +PYTHONMODDIR=$python_moddir + +AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir) + +if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then + LIBPYTHON=$kde_orig_LIBPYTHON + test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB="" + test "x$PYTHONINC" = "x-Ino" && PYTHONINC="" + $2 +else + dnl Note: this test is very weak + kde_python_link_found=no + KDE_TRY_LINK_PYTHON(normal) + KDE_TRY_LINK_PYTHON(m, -lm) + KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD) + KDE_TRY_LINK_PYTHON(tcl, -ltcl) + KDE_TRY_LINK_PYTHON(db2, -ldb2) + KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm]) + KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil]) + KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil]) + KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3]) + KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil]) + KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm]) + KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses]) + KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [], + [AC_MSG_WARN([it seems, Python depends on another library. + Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this + and contact the authors to let them know about this problem]) + ]) + + LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET" + AC_SUBST(PYTHONINC) + AC_SUBST(PYTHONLIB) + AC_SUBST(LIBPYTHON) + AC_SUBST(PYTHONMODDIR) + AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python]) +fi + +]) + + +AC_DEFUN([KDE_CHECK_PYTHON], +[ + KDE_CHECK_PYTHON_INTERN("2.5", + [KDE_CHECK_PYTHON_INTERN("2.4", + [KDE_CHECK_PYTHON_INTERN("2.3", + [KDE_CHECK_PYTHON_INTERN("2.2", + [KDE_CHECK_PYTHON_INTERN("2.1", + [KDE_CHECK_PYTHON_INTERN("2.0", + [KDE_CHECK_PYTHON_INTERN($1, $2) ]) + ]) + ]) + ]) + ]) + ]) +]) + +AC_DEFUN([KDE_CHECK_STL], +[ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`" + + AC_MSG_CHECKING([if C++ programs can be compiled]) + AC_CACHE_VAL(kde_cv_stl_works, + [ + AC_TRY_COMPILE([ +#include +using namespace std; +],[ + string astring="Hallo Welt."; + astring.erase(0, 6); // now astring is "Welt" + return 0; +], kde_cv_stl_works=yes, + kde_cv_stl_works=no) +]) + + AC_MSG_RESULT($kde_cv_stl_works) + + if test "$kde_cv_stl_works" = "yes"; then + # back compatible + AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI]) + else + AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs. +Check config.log for details - if you're using a Linux distribution you might miss +a package named similar to libstdc++-dev.]) + fi + + CXXFLAGS="$ac_save_CXXFLAGS" + AC_LANG_RESTORE +]) + +AC_DEFUN([AC_FIND_QIMGIO], + [AC_REQUIRE([AC_FIND_JPEG]) +AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) +AC_MSG_CHECKING([for qimgio]) +AC_CACHE_VAL(ac_cv_lib_qimgio, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +ac_save_LIBS="$LIBS" +ac_save_CXXFLAGS="$CXXFLAGS" +LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT" +CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" +AC_TRY_RUN(dnl +[ +#include +#include +int main() { + QString t = "hallo"; + t.fill('t'); + qInitImageIO(); +} +], + ac_cv_lib_qimgio=yes, + ac_cv_lib_qimgio=no, + ac_cv_lib_qimgio=no) +LIBS="$ac_save_LIBS" +CXXFLAGS="$ac_save_CXXFLAGS" +AC_LANG_RESTORE +])dnl +if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then + LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG" + AC_MSG_RESULT(yes) + AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available]) + AC_SUBST(LIBQIMGIO) +else + AC_MSG_RESULT(not found) +fi +]) + +AC_DEFUN([AM_DISABLE_LIBRARIES], +[ + AC_PROVIDE([AM_ENABLE_STATIC]) + AC_PROVIDE([AM_ENABLE_SHARED]) + enable_static=no + enable_shared=yes +]) + + +AC_DEFUN([AC_CHECK_UTMP_FILE], +[ + AC_MSG_CHECKING([for utmp file]) + + AC_CACHE_VAL(kde_cv_utmp_file, + [ + kde_cv_utmp_file=no + + for ac_file in \ + \ + /var/run/utmp \ + /var/adm/utmp \ + /etc/utmp \ + ; \ + do + if test -r "$ac_file"; then + kde_cv_utmp_file=$ac_file + break + fi + done + ]) + + if test "$kde_cv_utmp_file" != "no"; then + AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries]) + $1 + AC_MSG_RESULT($kde_cv_utmp_file) + else + $2 + AC_MSG_RESULT([non found]) + fi +]) + + +AC_DEFUN([KDE_CREATE_SUBDIRSLIST], +[ + +DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin" +TOPSUBDIRS="" + +if test ! -s $srcdir/subdirs; then + dnl Note: Makefile.common creates subdirs, so this is just a fallback + files=`cd $srcdir && ls -1` + dirs=`for i in $files; do if test -d $i; then echo $i; fi; done` + for i in $dirs; do + echo $i >> $srcdir/subdirs + done +fi + +ac_topsubdirs= +if test -s $srcdir/inst-apps; then + ac_topsubdirs="`cat $srcdir/inst-apps`" +elif test -s $srcdir/subdirs; then + ac_topsubdirs="`cat $srcdir/subdirs`" +fi + +for i in $ac_topsubdirs; do + AC_MSG_CHECKING([if $i should be compiled]) + if test -d $srcdir/$i; then + install_it="yes" + for j in $DO_NOT_COMPILE; do + if test $i = $j; then + install_it="no" + fi + done + else + install_it="no" + fi + AC_MSG_RESULT($install_it) + vari=`echo $i | sed -e 's,[[-+.@]],_,g'` + if test $install_it = "yes"; then + TOPSUBDIRS="$TOPSUBDIRS $i" + eval "$vari""_SUBDIR_included=yes" + else + eval "$vari""_SUBDIR_included=no" + fi +done + +AC_SUBST(TOPSUBDIRS) +]) + +AC_DEFUN([KDE_CHECK_NAMESPACES], +[ +AC_MSG_CHECKING(whether C++ compiler supports namespaces) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_TRY_COMPILE([ +], +[ +namespace Foo { + extern int i; + namespace Bar { + extern int i; + } +} + +int Foo::i = 0; +int Foo::Bar::i = 1; +],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_NAMESPACES) +], [ +AC_MSG_RESULT(no) +]) +AC_LANG_RESTORE +]) + +dnl ------------------------------------------------------------------------ +dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([AC_CHECK_S_ISSOCK], +[ +AC_MSG_CHECKING(for S_ISSOCK) +AC_CACHE_VAL(ac_cv_have_s_issock, +[ +AC_TRY_LINK( +[ +#include +], +[ +struct stat buff; +int b = S_ISSOCK( buff.st_mode ); +], +ac_cv_have_s_issock=yes, +ac_cv_have_s_issock=no) +]) +AC_MSG_RESULT($ac_cv_have_s_issock) +if test "$ac_cv_have_s_issock" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.]) +fi + +AH_VERBATIM(_ISSOCK, +[ +#ifndef HAVE_S_ISSOCK +#define HAVE_S_ISSOCK +#define S_ISSOCK(mode) (1==0) +#endif +]) + +]) + +dnl ------------------------------------------------------------------------ +dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([AC_CHECK_KDEMAXPATHLEN], +[ +AC_MSG_CHECKING(for MAXPATHLEN) +AC_CACHE_VAL(ac_cv_maxpathlen, +[ +cat > conftest.$ac_ext < +#endif +#include +#include +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + +KDE_HELLO MAXPATHLEN + +EOF + +ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out" + +if AC_TRY_EVAL(ac_try) && test -s conftest.out; then + ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out` +else + ac_cv_maxpathlen=1024 +fi + +rm conftest.* + +]) +AC_MSG_RESULT($ac_cv_maxpathlen) +AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] ) +]) + +AC_DEFUN([KDE_CHECK_HEADER], +[ + kde_safe_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $all_includes" + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_CHECK_HEADER([$1], [$2], [$3], [$4]) + AC_LANG_RESTORE + CPPFLAGS=$kde_safe_cppflags +]) + +AC_DEFUN([KDE_CHECK_HEADERS], +[ + AH_CHECK_HEADERS([$1]) + AC_LANG_SAVE + kde_safe_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $all_includes" + AC_LANG_CPLUSPLUS + AC_CHECK_HEADERS([$1], [$2], [$3], [$4]) + CPPFLAGS=$kde_safe_cppflags + AC_LANG_RESTORE +]) + +AC_DEFUN([KDE_FAST_CONFIGURE], +[ + dnl makes configure fast (needs perl) + AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]), + with_fast_perl=$enableval, with_fast_perl=yes) +]) + +AC_DEFUN([KDE_CONF_FILES], +[ + val= + if test -f $srcdir/configure.files ; then + val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files` + fi + CONF_FILES= + if test -n "$val" ; then + for i in $val ; do + CONF_FILES="$CONF_FILES $i" + done + fi + AC_SUBST(CONF_FILES) +])dnl + +dnl This sets the prefix, for arts and kdelibs +dnl Do NOT use in any other module. +dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde +AC_DEFUN([KDE_SET_PREFIX_CORE], +[ + unset CDPATH + dnl make $KDEDIR the default for the installation + AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) + + if test "x$prefix" = "xNONE"; then + prefix=$ac_default_prefix + ac_configure_args="$ac_configure_args --prefix=$prefix" + fi + # And delete superfluous '/' to make compares easier + prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` + exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` + + kde_libs_prefix='$(prefix)' + kde_libs_htmldir='$(kde_htmldir)' + AC_SUBST(kde_libs_prefix) + AC_SUBST(kde_libs_htmldir) + KDE_FAST_CONFIGURE + KDE_CONF_FILES +]) + + +AC_DEFUN([KDE_SET_PREFIX], +[ + unset CDPATH + dnl We can't give real code to that macro, only a value. + dnl It only matters for --help, since we set the prefix in this function anyway. + AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix}) + + KDE_SET_DEFAULT_BINDIRS + if test "x$prefix" = "xNONE"; then + dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it + KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend) + else + dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH + kde_save_PATH="$PATH" + PATH="$exec_prefix/bin:$prefix/bin:$PATH" + KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend) + PATH="$kde_save_PATH" + fi + + kde_libs_prefix=`$KDECONFIG --prefix` + if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then + AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs. + This means it has been moved since you installed it. + This won't work. Please recompile kdelibs for the new prefix. + ]) + fi + kde_libs_htmldir=`$KDECONFIG --install html --expandvars` + + AC_MSG_CHECKING([where to install]) + if test "x$prefix" = "xNONE"; then + prefix=$kde_libs_prefix + AC_MSG_RESULT([$prefix (as returned by kde-config)]) + else + dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different + given_prefix=$prefix + AC_MSG_RESULT([$prefix (as requested)]) + fi + + # And delete superfluous '/' to make compares easier + prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` + exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` + given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` + + AC_SUBST(KDECONFIG) + AC_SUBST(kde_libs_prefix) + AC_SUBST(kde_libs_htmldir) + + KDE_FAST_CONFIGURE + KDE_CONF_FILES +]) + +pushdef([AC_PROG_INSTALL], +[ + dnl our own version, testing for a -p flag + popdef([AC_PROG_INSTALL]) + dnl as AC_PROG_INSTALL works as it works we first have + dnl to save if the user didn't specify INSTALL, as the + dnl autoconf one overwrites INSTALL and we have no chance to find + dnl out afterwards + test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL + test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM + test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT + AC_PROG_INSTALL + + if test -z "$kde_save_INSTALL_given" ; then + # OK, user hasn't given any INSTALL, autoconf found one for us + # now we test, if it supports the -p flag + AC_MSG_CHECKING(for -p flag to install) + rm -f confinst.$$.* > /dev/null 2>&1 + echo "Testtest" > confinst.$$.orig + ac_res=no + if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then + if test -f confinst.$$.new ; then + # OK, -p seems to do no harm to install + INSTALL="${INSTALL} -p" + ac_res=yes + fi + fi + rm -f confinst.$$.* + AC_MSG_RESULT($ac_res) + fi + dnl the following tries to resolve some signs and wonders coming up + dnl with different autoconf/automake versions + dnl e.g.: + dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s + dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS) + dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s + dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has + dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the + dnl install-@DIR@PROGRAMS targets to explicitly use that flag + dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as + dnl INSTALL_SCRIPT, which breaks with automake <= 1.4 + dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure + dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from + dnl automake (due to broken Makefile.am or whatever) to install programs, + dnl and so does not see the -s flag in automake > 1.4 + dnl to clean up that mess we: + dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG + dnl which cleans KDE's program with automake > 1.4; + dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems + dnl with automake<=1.4 + dnl note that dues to this sometimes two '-s' flags are used (if KDE + dnl properly uses install-@DIR@PROGRAMS, but I don't care + dnl + dnl And to all this comes, that I even can't write in comments variable + dnl names used by automake, because it is so stupid to think I wanted to + dnl _use_ them, therefor I have written A_M_... instead of AM_ + dnl hmm, I wanted to say something ... ahh yes: Arghhh. + + if test -z "$kde_save_INSTALL_PROGRAM_given" ; then + INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)' + fi + if test -z "$kde_save_INSTALL_SCRIPT_given" ; then + INSTALL_SCRIPT='${INSTALL}' + fi +])dnl + +AC_DEFUN([KDE_LANG_CPLUSPLUS], +[AC_LANG_CPLUSPLUS +ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' +pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS]) +]) + +pushdef([AC_LANG_CPLUSPLUS], +[popdef([AC_LANG_CPLUSPLUS]) +KDE_LANG_CPLUSPLUS +]) + +AC_DEFUN([KDE_CHECK_LONG_LONG], +[ +AC_MSG_CHECKING(for long long) +AC_CACHE_VAL(kde_cv_c_long_long, +[ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_LINK([], [ + long long foo = 0; + foo = foo+1; + ], + kde_cv_c_long_long=yes, kde_cv_c_long_long=no) + AC_LANG_RESTORE +]) +AC_MSG_RESULT($kde_cv_c_long_long) +if test "$kde_cv_c_long_long" = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype]) +fi +]) + +AC_DEFUN([KDE_CHECK_LIB], +[ + kde_save_LDFLAGS="$LDFLAGS" + dnl AC_CHECK_LIB modifies LIBS, so save it here + kde_save_LIBS="$LIBS" + LDFLAGS="$LDFLAGS $all_libraries" + case $host_os in + aix*) LDFLAGS="-brtl $LDFLAGS" + test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS" + ;; + esac + AC_CHECK_LIB($1, $2, $3, $4, $5) + LDFLAGS="$kde_save_LDFLAGS" + LIBS="$kde_save_LIBS" +]) + +AC_DEFUN([KDE_JAVA_PREFIX], +[ + dir=`dirname "$1"` + base=`basename "$1"` + list=`ls -1 $dir 2> /dev/null` + for entry in $list; do + if test -d $dir/$entry/bin; then + case $entry in + $base) + javadirs="$javadirs $dir/$entry/bin" + ;; + esac + elif test -d $dir/$entry/jre/bin; then + case $entry in + $base) + javadirs="$javadirs $dir/$entry/jre/bin" + ;; + esac + fi + done +]) + +dnl KDE_CHEC_JAVA_DIR(onlyjre) +AC_DEFUN([KDE_CHECK_JAVA_DIR], +[ + +AC_ARG_WITH(java, +AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]), +[ ac_java_dir=$withval +], ac_java_dir="" +) + +AC_MSG_CHECKING([for Java]) + +dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH +if test "x$ac_java_dir" = "xno"; then + kde_java_bindir=no + kde_java_includedir=no + kde_java_libjvmdir=no + kde_java_libgcjdir=no + kde_java_libhpidir=no +else + if test "x$ac_java_dir" = "x"; then + + + dnl No option set -> collect list of candidate paths + if test -n "$JAVA_HOME"; then + KDE_JAVA_PREFIX($JAVA_HOME) + fi + KDE_JAVA_PREFIX(/usr/j2se) + KDE_JAVA_PREFIX(/usr/lib/j2se) + KDE_JAVA_PREFIX(/usr/j*dk*) + KDE_JAVA_PREFIX(/usr/lib/j*dk*) + KDE_JAVA_PREFIX(/opt/j*sdk*) + KDE_JAVA_PREFIX(/usr/lib/java*) + KDE_JAVA_PREFIX(/usr/java*) + KDE_JAVA_PREFIX(/usr/java/j*dk*) + KDE_JAVA_PREFIX(/usr/java/j*re*) + KDE_JAVA_PREFIX(/usr/lib/SunJava2*) + KDE_JAVA_PREFIX(/usr/lib/SunJava*) + KDE_JAVA_PREFIX(/usr/lib/IBMJava2*) + KDE_JAVA_PREFIX(/usr/lib/IBMJava*) + KDE_JAVA_PREFIX(/opt/java*) + + kde_cv_path="NONE" + kde_save_IFS=$IFS + IFS=':' + for dir in $PATH; do + if test -d "$dir"; then + javadirs="$javadirs $dir" + fi + done + IFS=$kde_save_IFS + jredirs= + + dnl Now javadirs contains a list of paths that exist, all ending with bin/ + for dir in $javadirs; do + dnl Check for the java executable + if test -x "$dir/java"; then + dnl And also check for a libjvm.so somewhere under there + dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big. + if test "$dir" != "/usr/bin"; then + libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` + if test ! -f $libjvmdir/libjvm.so; then continue; fi + jredirs="$jredirs $dir" + fi + fi + done + + dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found + JAVAC= + JAVA= + kde_java_bindir=no + for dir in $jredirs; do + JAVA="$dir/java" + kde_java_bindir=$dir + if test -x "$dir/javac"; then + JAVAC="$dir/javac" + break + fi + done + + if test -n "$JAVAC"; then + dnl this substitution might not work - well, we test for jni.h below + kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'` + else + kde_java_includedir=no + fi + else + dnl config option set + kde_java_bindir=$ac_java_dir/bin + if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then + kde_java_includedir=no + else + kde_java_includedir=$ac_java_dir/include + fi + fi +fi + +dnl At this point kde_java_bindir and kde_java_includedir are either set or "no" +if test "x$kde_java_bindir" != "xno"; then + + dnl Look for libjvm.so + kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` + dnl Look for libgcj.so + kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1` + dnl Look for libhpi.so and avoid green threads + kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1` + + dnl Now check everything's fine under there + dnl the include dir is our flag for having the JDK + if test -d "$kde_java_includedir"; then + if test ! -x "$kde_java_bindir/javac"; then + AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.]) + fi + if test ! -x "$kde_java_bindir/javah"; then + AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) + fi + if test ! -x "$kde_java_bindir/jar"; then + AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) + fi + if test ! -r "$kde_java_includedir/jni.h"; then + AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.]) + fi + + jni_includes="-I$kde_java_includedir" + dnl Strange thing, jni.h requires jni_md.h which is under genunix here.. + dnl and under linux here.. + + dnl not needed for gcj + + if test "x$kde_java_libgcjdir" = "x"; then + test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux" + test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris" + test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix" + fi + + else + JAVAC= + jni_includes= + fi + + if test "x$kde_java_libgcjdir" = "x"; then + if test ! -r "$kde_java_libjvmdir/libjvm.so"; then + AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.]) + fi + else + if test ! -r "$kde_java_libgcjdir/libgcj.so"; then + AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.]) + fi + fi + + if test ! -x "$kde_java_bindir/java"; then + AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) + fi + + dnl not needed for gcj compile + + if test "x$kde_java_libgcjdir" = "x"; then + if test ! -r "$kde_java_libhpidir/libhpi.so"; then + AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.]) + fi + fi + + if test -n "$jni_includes"; then + dnl Check for JNI version + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + ac_cxxflags_safe="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $all_includes $jni_includes" + + AC_TRY_COMPILE([ + #include + ], + [ + #ifndef JNI_VERSION_1_2 + Syntax Error + #endif + ],[ kde_jni_works=yes ], + [ kde_jni_works=no ]) + + if test $kde_jni_works = no; then + AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h. + You need to have Java Development Kit (JDK) version 1.2. + + Use --with-java to specify another location. + Use --without-java to configure without java support. + Or download a newer JDK and try again. + See e.g. http://java.sun.com/products/jdk/1.2 ]) + fi + + CXXFLAGS="$ac_cxxflags_safe" + AC_LANG_RESTORE + + dnl All tests ok, inform and subst the variables + + JAVAC=$kde_java_bindir/javac + JAVAH=$kde_java_bindir/javah + JAR=$kde_java_bindir/jar + AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) + if test "x$kde_java_libgcjdir" = "x"; then + JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi" + else + JVMLIBS="-L$kde_java_libgcjdir -lgcj" + fi + AC_MSG_RESULT([java JDK in $kde_java_bindir]) + + else + AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) + AC_MSG_RESULT([java JRE in $kde_java_bindir]) + fi +elif test -d "/Library/Java/Home"; then + kde_java_bindir="/Library/Java/Home/bin" + jni_includes="-I/Library/Java/Home/include" + + JAVAC=$kde_java_bindir/javac + JAVAH=$kde_java_bindir/javah + JAR=$kde_java_bindir/jar + JVMLIBS="-Wl,-framework,JavaVM" + + AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) + AC_MSG_RESULT([Apple Java Framework]) +else + AC_MSG_RESULT([none found]) +fi + +AC_SUBST(JAVAC) +AC_SUBST(JAVAH) +AC_SUBST(JAR) +AC_SUBST(JVMLIBS) +AC_SUBST(jni_includes) + +# for backward compat +kde_cv_java_includedir=$kde_java_includedir +kde_cv_java_bindir=$kde_java_bindir +]) + +dnl this is a redefinition of autoconf 2.5x's AC_FOREACH. +dnl When the argument list becomes big, as in KDE for AC_OUTPUT in +dnl big packages, m4_foreach is dog-slow. So use our own version of +dnl it. (matz@kde.org) +m4_define([mm_foreach], +[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])]) +m4_define([mm_car], [[$1]]) +m4_define([mm_car2], [[$@]]) +m4_define([_mm_foreach], +[m4_if(m4_quote($2), [], [], + [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1], + mm_car2(m4_shift($2)), + [$3])])]) +m4_define([AC_FOREACH], +[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])]) + +AC_DEFUN([KDE_NEED_FLEX], +[ +kde_libs_safe=$LIBS +LIBS="$LIBS $USER_LDFLAGS" +AM_PROG_LEX +LIBS=$kde_libs_safe +if test -z "$LEXLIB"; then + AC_MSG_ERROR([You need to have flex installed.]) +fi +AC_SUBST(LEXLIB) +]) + +AC_DEFUN([AC_PATH_QTOPIA], +[ + dnl TODO: use AC_CACHE_VAL + + if test -z "$1"; then + qtopia_minver_maj=1 + qtopia_minver_min=5 + qtopia_minver_pat=0 + else + qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"` + qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"` + qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"` + fi + + qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat" + qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat" + + AC_REQUIRE([AC_PATH_QT]) + + AC_MSG_CHECKING([for Qtopia]) + + LIB_QTOPIA="-lqpe" + AC_SUBST(LIB_QTOPIA) + + kde_qtopia_dirs="$QPEDIR /opt/Qtopia" + + ac_qtopia_incdir=NO + + AC_ARG_WITH(qtopia-dir, + AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]), + [ ac_qtopia_incdir="$withval"/include] ) + + qtopia_incdirs="" + for dir in $kde_qtopia_dirs; do + qtopia_incdirs="$qtopia_incdirs $dir/include" + done + + if test ! "$ac_qtopia_incdir" = "NO"; then + qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs" + fi + + qtopia_incdir="" + AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir) + ac_qtopia_incdir="$qtopia_incdir" + + if test -z "$qtopia_incdir"; then + AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.]) + fi + + qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`; + qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`; + qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`; + + qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat" + qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat" + if test "$qtopia_ver" -lt "$qtopia_minver"; then + AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr +is required.]) + fi + + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + ac_cxxflags_safe="$CXXFLAGS" + ac_ldflags_safe="$LDFLAGS" + ac_libs_safe="$LIBS" + + CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes" + LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" + LIBS="$LIBS $LIB_QTOPIA $LIBQT" + + cat > conftest.$ac_ext < +#include + +int main( int argc, char **argv ) +{ + QPEApplication app( argc, argv ); + return 0; +} +EOF + + if AC_TRY_EVAL(ac_link) && test -s conftest; then + rm -f conftest* + else + rm -f conftest* + AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at +the end of config.log]) + fi + + CXXFLAGS="$ac_cxxflags_safe" + LDFLAGS="$ac_ldflags_safe" + LIBS="$ac_libs_safe" + + AC_LANG_RESTORE + + QTOPIA_INCLUDES="-I$qtopia_incdir" + AC_SUBST(QTOPIA_INCLUDES) + + AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir]) +]) + + +AC_DEFUN([KDE_INIT_DOXYGEN], +[ +AC_MSG_CHECKING([for Qt docs]) +kde_qtdir= +if test "${with_qt_dir+set}" = set; then + kde_qtdir="$with_qt_dir" +fi + +AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR) +AC_MSG_RESULT($QTDOCDIR) + +AC_SUBST(QTDOCDIR) + +KDE_FIND_PATH(dot, DOT, [], []) +if test -n "$DOT"; then + KDE_HAVE_DOT="YES" +else + KDE_HAVE_DOT="NO" +fi +AC_SUBST(KDE_HAVE_DOT) +KDE_FIND_PATH(doxygen, DOXYGEN, [], []) +AC_SUBST(DOXYGEN) + +DOXYGEN_PROJECT_NAME="$1" +DOXYGEN_PROJECT_NUMBER="$2" +AC_SUBST(DOXYGEN_PROJECT_NAME) +AC_SUBST(DOXYGEN_PROJECT_NUMBER) + +KDE_HAS_DOXYGEN=no +if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then + KDE_HAS_DOXYGEN=yes +fi +AC_SUBST(KDE_HAS_DOXYGEN) + +]) + + +AC_DEFUN([AC_FIND_BZIP2], +[ +AC_MSG_CHECKING([for bzDecompress in libbz2]) +AC_CACHE_VAL(ac_cv_lib_bzip2, +[ +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +kde_save_LIBS="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET" +kde_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" +AC_TRY_LINK(dnl +[ +#define BZ_NO_STDIO +#include +], + [ bz_stream s; (void) bzDecompress(&s); ], + eval "ac_cv_lib_bzip2='-lbz2'", + eval "ac_cv_lib_bzip2=no") +LIBS="$kde_save_LIBS" +CXXFLAGS="$kde_save_CXXFLAGS" +AC_LANG_RESTORE +])dnl +AC_MSG_RESULT($ac_cv_lib_bzip2) + +if test ! "$ac_cv_lib_bzip2" = no; then + BZIP2DIR=bzip2 + + LIBBZ2="$ac_cv_lib_bzip2" + AC_SUBST(LIBBZ2) + +else + + cxx_shared_flag= + ld_shared_flag= + KDE_CHECK_COMPILER_FLAG(shared, [ + ld_shared_flag="-shared" + ]) + KDE_CHECK_COMPILER_FLAG(fPIC, [ + cxx_shared_flag="-fPIC" + ]) + + AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2]) + AC_CACHE_VAL(ac_cv_lib_bzip2_prefix, + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + kde_save_LIBS="$LIBS" + LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET" + kde_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES" + + AC_TRY_LINK(dnl + [ + #define BZ_NO_STDIO + #include + ], + [ bz_stream s; (void) BZ2_bzDecompress(&s); ], + eval "ac_cv_lib_bzip2_prefix='-lbz2'", + eval "ac_cv_lib_bzip2_prefix=no") + LIBS="$kde_save_LIBS" + CXXFLAGS="$kde_save_CXXFLAGS" + AC_LANG_RESTORE + ])dnl + + AC_MSG_RESULT($ac_cv_lib_bzip2_prefix) + + if test ! "$ac_cv_lib_bzip2_prefix" = no; then + BZIP2DIR=bzip2 + + LIBBZ2="$ac_cv_lib_bzip2_prefix" + AC_SUBST(LIBBZ2) + + AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix]) + dnl else, we just ignore this + fi + +fi +AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR") +]) + +dnl ------------------------------------------------------------------------ +dnl Try to find the SSL headers and libraries. +dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed) +dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed) +dnl ------------------------------------------------------------------------ +dnl +AC_DEFUN([KDE_CHECK_SSL], +[ +LIBSSL="-lssl -lcrypto" +AC_REQUIRE([KDE_CHECK_LIB64]) + +ac_ssl_includes=NO ac_ssl_libraries=NO +ssl_libraries="" +ssl_includes="" +AC_ARG_WITH(ssl-dir, + AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]), + [ ac_ssl_includes="$withval"/include + ac_ssl_libraries="$withval"/lib$kdelibsuff + ]) + +want_ssl=yes +AC_ARG_WITH(ssl, + AC_HELP_STRING([--without-ssl],[disable SSL checks]), + [want_ssl=$withval]) + +if test $want_ssl = yes; then + +AC_MSG_CHECKING(for OpenSSL) + +AC_CACHE_VAL(ac_cv_have_ssl, +[#try to guess OpenSSL locations + + ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes" + ssl_incdirs="$ac_ssl_includes $ssl_incdirs" + AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir) + ac_ssl_includes="$ssl_incdir" + + ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs" + if test ! "$ac_ssl_libraries" = "NO"; then + ssl_libdirs="$ac_ssl_libraries $ssl_libdirs" + fi + + test=NONE + ssl_libdir=NONE + for dir in $ssl_libdirs; do + try="ls -1 $dir/libssl*" + if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi + done + + ac_ssl_libraries="$ssl_libdir" + + ac_ldflags_safe="$LDFLAGS" + ac_libs_safe="$LIBS" + + LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries" + LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref" + + AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();, + ac_ssl_rsaref="yes" + , + ac_ssl_rsaref="no" + ) + + LDFLAGS="$ac_ldflags_safe" + LIBS="$ac_libs_safe" + + if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then + have_ssl=no + else + have_ssl=yes; + fi + + ]) + + eval "$ac_cv_have_ssl" + + AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes]) + + AC_MSG_CHECKING([whether OpenSSL uses rsaref]) + AC_MSG_RESULT($ac_ssl_rsaref) + + AC_MSG_CHECKING([for easter eggs]) + AC_MSG_RESULT([none found]) + +else + have_ssl=no +fi + +if test "$have_ssl" = yes; then + AC_MSG_CHECKING(for OpenSSL version) + dnl Check for SSL version + AC_CACHE_VAL(ac_cv_ssl_version, + [ + + cat >conftest.$ac_ext < +#include + int main() { + +#ifndef OPENSSL_VERSION_NUMBER + printf("ssl_version=\\"error\\"\n"); +#else + if (OPENSSL_VERSION_NUMBER < 0x00906000) + printf("ssl_version=\\"old\\"\n"); + else + printf("ssl_version=\\"ok\\"\n"); +#endif + return (0); + } +EOF + + ac_save_CPPFLAGS=$CPPFLAGS + if test "$ac_ssl_includes" != "/usr/include"; then + CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes" + fi + + if AC_TRY_EVAL(ac_link); then + + if eval `./conftest 2>&5`; then + if test $ssl_version = error; then + AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !]) + else + if test $ssl_version = old; then + AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.]) + have_ssl=no + fi + fi + ac_cv_ssl_version="ssl_version=$ssl_version" + else + AC_MSG_ERROR([Your system couldn't run a small SSL test program. + Check config.log, and if you can't figure it out, send a mail to + David Faure , attaching your config.log]) + fi + + else + AC_MSG_ERROR([Your system couldn't link a small SSL test program. + Check config.log, and if you can't figure it out, send a mail to + David Faure , attaching your config.log]) + fi + CPPFLAGS=$ac_save_CPPFLAGS + + ]) + + eval "$ac_cv_ssl_version" + AC_MSG_RESULT($ssl_version) +fi + +if test "$have_ssl" != yes; then + LIBSSL=""; +else + AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL]) + ac_cv_have_ssl="have_ssl=yes \ + ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref" + + + ssl_libraries="$ac_ssl_libraries" + ssl_includes="$ac_ssl_includes" + + if test "$ac_ssl_rsaref" = yes; then + LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" + fi + + if test $ssl_version = "old"; then + AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6]) + fi +fi + +SSL_INCLUDES= + +if test "$ssl_includes" = "/usr/include"; then + if test -f /usr/kerberos/include/krb5.h; then + SSL_INCLUDES="-I/usr/kerberos/include" + fi +elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then + SSL_INCLUDES="-I$ssl_includes" +fi + +if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then + SSL_LDFLAGS="" +else + SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries" +fi + +AC_SUBST(SSL_INCLUDES) +AC_SUBST(SSL_LDFLAGS) +AC_SUBST(LIBSSL) +]) + +AC_DEFUN([KDE_CHECK_STRLCPY], +[ + AC_REQUIRE([AC_CHECK_STRLCAT]) + AC_REQUIRE([AC_CHECK_STRLCPY]) + AC_CHECK_SIZEOF(size_t) + AC_CHECK_SIZEOF(unsigned long) + + AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long]) + AC_TRY_COMPILE(,[ + #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG + choke me + #endif + ],AC_MSG_RESULT([yes]),[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + Apparently on your system our assumption sizeof size_t == sizeof unsigned long + does not apply. Please mail kde-devel@kde.org with a description of your system! + ]) + ]) +]) + +AC_DEFUN([KDE_CHECK_BINUTILS], +[ + AC_MSG_CHECKING([if ld supports unversioned version maps]) + + kde_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + echo "{ local: extern \"C++\" { foo }; };" > conftest.map + AC_TRY_LINK([int foo;], +[ +#ifdef __INTEL_COMPILER +icc apparently does not support libtools version-info and version-script +at the same time. Dunno where the bug is, but until somebody figured out, +better disable the optional version scripts. +#endif + + foo = 42; +], kde_supports_versionmaps=yes, kde_supports_versionmaps=no) + LDFLAGS="$kde_save_LDFLAGS" + rm -f conftest.map + AM_CONDITIONAL(include_VERSION_SCRIPT, + [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"]) + + AC_MSG_RESULT($kde_supports_versionmaps) +]) + +AC_DEFUN([AM_PROG_OBJC],[ +AC_CHECK_PROGS(OBJC, gcc, gcc) +test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH]) +if test "x${OBJCFLAGS-unset}" = xunset; then + OBJCFLAGS="-g -O2" +fi +AC_SUBST(OBJCFLAGS) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)]) +]) + +AC_DEFUN([KDE_CHECK_PERL], +[ + KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [ + AC_MSG_ERROR([No Perl found in your $PATH. +We need perl to generate some code.]) + ]) + AC_SUBST(PERL) +]) + +AC_DEFUN([KDE_CHECK_LARGEFILE], +[ +AC_SYS_LARGEFILE +if test "$ac_cv_sys_file_offset_bits" != no; then + CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +fi + +if test "x$ac_cv_sys_large_files" != "xno"; then + CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1" +fi + +]) + +dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in) +dnl which allows to search for libs that get installed into the KDE prefix. +dnl +dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not) +dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page +dnl also defines KSTUFF_PKG_ERRORS on error +AC_DEFUN([KDE_PKG_CHECK_MODULES], [ + + PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH" + if test "$prefix" != "$kde_libs_prefix"; then + PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH" + fi + export PKG_CONFIG_PATH + PKG_CHECK_MODULES([$1],[$2],[$3],[$4]) +]) + + +dnl Check for PIE support in the compiler and linker +AC_DEFUN([KDE_CHECK_PIE_SUPPORT], +[ + AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support, + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + safe_CXXFLAGS=$CXXFLAGS + safe_LDFLAGS=$LDFLAGS + CXXFLAGS="$CXXFLAGS -fPIE" + LDFLAGS="$LDFLAGS -pie" + + AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no]) + + CXXFLAGS=$safe_CXXFLAGS + LDFLAGS=$safe_LDFLAGS + AC_LANG_RESTORE + ]) + + AC_MSG_CHECKING(if enabling -pie/fPIE support) + + AC_ARG_ENABLE(pie, + AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]), + [kde_has_pie_support=$enableval], + [kde_has_pie_support=detect]) + + if test "$kde_has_pie_support" = "detect"; then + kde_has_pie_support=$kde_cv_val_pie_support + fi + + AC_MSG_RESULT([$kde_has_pie_support]) + + KDE_USE_FPIE="" + KDE_USE_PIE="" + + AC_SUBST([KDE_USE_FPIE]) + AC_SUBST([KDE_USE_PIE]) + + if test "$kde_has_pie_support" = "yes"; then + KDE_USE_FPIE="-fPIE" + KDE_USE_PIE="-pie" + fi +]) +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +## Copyright 1996, 1997, 1998, 1999, 2000, 2001 +## Free Software Foundation, Inc. +## Originally by Gordon Matzigkeit , 1996 +## +## 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. +## +## As a special exception to the GNU General Public License, if you +## distribute this file as part of a program that contains a +## configuration script generated by Autoconf, you may include it under +## the same distribution terms that you use for the rest of that program. + +# serial 47 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LINUX_64_MODE="32" + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + LINUX_64_MODE="64" + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + testring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ + = "XX$testring") >/dev/null 2>&1 && + new_result=`expr "X$testring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + testring=$testring$testring + done + testring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# -------------------- +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ------------------------------------------------------------------ +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_unknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . + $rm conftest* out/* + rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + libsuff= + if test "x$LINUX_64_MODE" = x64; then + # Some platforms are per default 64-bit, so there's no /lib64 + if test -d /lib64; then + libsuff=64 + fi + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && test "X$CXX" != "Xno"; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 dll's +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +#- set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case "$host_cpu" in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + irix5* | nonstopux*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + case $host_cpu in + alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* ) + lt_cv_deplibs_check_method=pass_all ;; + # the debian people say, arm and glibc 2.3.1 works for them with pass_all + arm* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If +# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will +# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that LIBLTDL +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If +# DIRECTORY is not provided and an installed libltdl is not found, it is +# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' +# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single +# quotes!). If your package is not flat and you're not using automake, +# define top_builddir and top_srcdir appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# -------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# +# Check for any special shared library compilation flags. +# +_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' + ;; + esac +fi +if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then + AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) + if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : + else + AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) + _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no + fi +fi + + +# +# Check to make sure the static flag actually works. +# +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF($1) + +# Report which librarie types wil actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + darwin* | rhapsody*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi + ;; + esac + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cc + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # KDE requires run time linking. Make it the default. + aix_use_runtimelinking=yes + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='-qmkshrobj ${wl}-G' + else + shared_flag='-qmkshrobj' + fi + fi + fi + + # Let the compiler handle the export list. + _LT_AC_TAGVAR(always_export_symbols, $1)=no + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=no + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sco*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris* | sysv5*) + symcode='[[BDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGISTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=no + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + + # KDE requires run time linking. Make it the default. + aix_use_runtimelinking=yes + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='-qmkshrobj ${wl}-G' + else + shared_flag='-qmkshrobj' + fi + fi + fi + + # Let the compiler handle the export list. + _LT_AC_TAGVAR(always_export_symbols, $1)=no + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi4*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=no + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4.2uw2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs' + fi + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv5*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_MSG_RESULT([$SED]) +]) + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_MODULES], [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..dd92cb3 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,863 @@ +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. +# This file 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. + +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.9.6])]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 7 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 8 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([acinclude.m4]) diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..c125996 --- /dev/null +++ b/config.h.in @@ -0,0 +1,248 @@ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_CARBON_CARBON_H + +/* Define if you have the CoreAudio API */ +#undef HAVE_COREAUDIO + +/* Define to 1 if you have the header file. */ +#undef HAVE_CRT_EXTERNS_H + +/* Defines if your system has the crypt function */ +#undef HAVE_CRYPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `acl' library (-lacl). */ +#undef HAVE_LIBACL + +/* Define if you have libjpeg */ +#undef HAVE_LIBJPEG + +/* Define if you have libpng */ +#undef HAVE_LIBPNG + +/* Define if you have a working libpthread (will enable threaded code) */ +#undef HAVE_LIBPTHREAD + +/* Define if you have libz */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if system has non-POSIX extensions to the ACL support. */ +#undef HAVE_NON_POSIX_ACL_EXTENSIONS + +/* Define if your system needs _NSGetEnviron to set up the environment */ +#undef HAVE_NSGETENVIRON + +/* Define if system has POSIX ACL support. */ +#undef HAVE_POSIX_ACL + +/* Define if you have res_init */ +#undef HAVE_RES_INIT + +/* Define if you have the res_init prototype */ +#undef HAVE_RES_INIT_PROTO + +/* Define if you have a STL implementation by SGI */ +#undef HAVE_SGI_STL + +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have strlcat */ +#undef HAVE_STRLCAT + +/* Define if you have the strlcat prototype */ +#undef HAVE_STRLCAT_PROTO + +/* Define if you have strlcpy */ +#undef HAVE_STRLCPY + +/* Define if you have the strlcpy prototype */ +#undef HAVE_STRLCPY_PROTO + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_BITYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* Suffix for lib directories */ +#undef KDELIBSUFF + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of `char *', as computed by sizeof. */ +#undef SIZEOF_CHAR_P + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + +/* The size of `unsigned long', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_LONG + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Defined if compiling without arts */ +#undef WITHOUT_ARTS + +/* + * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system + * headers and I'm too lazy to write a configure test as long as only + * unixware is related + */ +#ifdef _UNIXWARE +#define HAVE_BOOLEAN +#endif + + + +/* + * AIX defines FD_SET in terms of bzero, but fails to include + * that defines bzero. + */ + +#if defined(_AIX) +#include +#endif + + + +#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H) +# include +# include +# define environ (*_NSGetEnviron()) +#endif + + + +#if !defined(HAVE_RES_INIT_PROTO) +#ifdef __cplusplus +extern "C" { +#endif +int res_init(void); +#ifdef __cplusplus +} +#endif +#endif + + + +#if !defined(HAVE_STRLCAT_PROTO) +#ifdef __cplusplus +extern "C" { +#endif +unsigned long strlcat(char*, const char*, unsigned long); +#ifdef __cplusplus +} +#endif +#endif + + + +#if !defined(HAVE_STRLCPY_PROTO) +#ifdef __cplusplus +extern "C" { +#endif +unsigned long strlcpy(char*, const char*, unsigned long); +#ifdef __cplusplus +} +#endif +#endif + + + +/* + * On HP-UX, the declaration of vsnprintf() is needed every time ! + */ + +#if !defined(HAVE_VSNPRINTF) || defined(hpux) +#if __STDC__ +#include +#include +#else +#include +#endif +#ifdef __cplusplus +extern "C" +#endif +int vsnprintf(char *str, size_t n, char const *fmt, va_list ap); +#ifdef __cplusplus +extern "C" +#endif +int snprintf(char *str, size_t n, char const *fmt, ...); +#endif + + + +#if defined(__SVR4) && !defined(__svr4__) +#define __svr4__ 1 +#endif + + +/* type to use in place of socklen_t if not defined */ +#undef kde_socklen_t + +/* type to use in place of socklen_t if not defined (deprecated, use + kde_socklen_t) */ +#undef ksize_t + +#define RELEASE_NAME "Power Stone" diff --git a/configure.files b/configure.files new file mode 100644 index 0000000..030bce8 --- /dev/null +++ b/configure.files @@ -0,0 +1,2 @@ +./admin/configure.in.min +configure.in.in diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..ecfda06 --- /dev/null +++ b/configure.in @@ -0,0 +1,297 @@ +dnl ======================================================= +dnl FILE: ./admin/configure.in.min +dnl ======================================================= + +dnl This file is part of the KDE libraries/packages +dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org) + +dnl This file is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Library General Public +dnl License as published by the Free Software Foundation; either +dnl version 2 of the License, or (at your option) any later version. + +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Library General Public License for more details. + +dnl You should have received a copy of the GNU Library General Public License +dnl along with this library; see the file COPYING.LIB. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +dnl Boston, MA 02110-1301, USA. + +# Original Author was Kalle@kde.org +# I lifted it in some mater. (Stephan Kulow) +# I used much code from Janos Farkas + +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(acinclude.m4) dnl a source file from your sub dir + +dnl This is so we can use kde-common +AC_CONFIG_AUX_DIR(admin) + +dnl This ksh/zsh feature conflicts with `cd blah ; pwd` +unset CDPATH + +dnl Checking host/target/build systems, for make, install etc. +AC_CANONICAL_SYSTEM +dnl Perform program name transformation +AC_ARG_PROGRAM + +dnl Automake doc recommends to do this only here. (Janos) +AM_INIT_AUTOMAKE(krusader, 1.90.0) dnl searches for some needed programs + +KDE_SET_PREFIX + +dnl generate the config header +AM_CONFIG_HEADER(config.h) dnl at the distribution this done + +dnl Checks for programs. +AC_CHECK_COMPILERS +AC_ENABLE_SHARED(yes) +AC_ENABLE_STATIC(no) +KDE_PROG_LIBTOOL + +dnl for NLS support. Call them in this order! +dnl WITH_NLS is for the po files +AM_KDE_WITH_NLS + +KDE_USE_QT(3) +AC_PATH_KDE +dnl ======================================================= +dnl FILE: configure.in.in +dnl ======================================================= + +#MIN_CONFIG(3) + +################################################### +# Check for Konqueror +################################################### + +AC_ARG_WITH(konqueror, + AC_HELP_STRING([--without-konqueror],[build Krusader without support Konqueror's servicemenus [default=with]]), + [with_konq=$withval], + [with_konq=yes] +) + +if test "$with_konq" != "no"; then + # check for the headers + have_libkonq=yes + KDE_CHECK_HEADER(konq_popupmenu.h, ,[have_libkonq=no] ) + KDE_CHECK_HEADER(konqbookmarkmanager.h, ,[have_libkonq=no] ) + + if test "$have_libkonq" = "no"; then + # if this var is 'yes', the configure-suppery drops a warning. + # see admin/configure.in.bot.end + warn_konq=yes + fi +fi + +AM_CONDITIONAL(include_libkonq, test "$have_libkonq" = yes) + +################################################### +# Check for ACL +################################################### + +AC_ARG_WITH(acl, + AC_HELP_STRING([--without-acl],[build Krusader without ACL support [default=with]]), + [with_acl=$withval], + [with_acl=yes] +) + +if test "$with_acl" != "no"; then + # check for the headers + have_posix_acl=yes + AC_CHECK_HEADER(sys/acl.h, ,[have_posix_acl=no] ) + have_non_posix_acl_ext=yes + AC_CHECK_HEADER(acl/libacl.h, ,[have_non_posix_acl_ext=no] ) + + if test "$have_posix_acl" = "yes" ; then + AC_DEFINE([HAVE_POSIX_ACL], 1, [Define if system has POSIX ACL support.]) + if test "$have_non_posix_acl_ext" = "yes" ; then + AC_DEFINE([HAVE_NON_POSIX_ACL_EXTENSIONS], 1, [Define if system has non-POSIX extensions to the ACL support.]) + fi + fi + + if test "$have_posix_acl" = "yes" ; then + AC_CHECK_LIB(acl, acl_free) + fi +fi + +################################################### +# Check for JavaScript +################################################### + +AC_ARG_WITH(javascript, + AC_HELP_STRING([--without-javascript],[build Krusader without JavaScript support [default=with]]), + [with_js=$withval], + [with_js=yes] +) + +if test "$with_js" != "no"; then + # check for the header + have_libkjsembed=yes + KDE_CHECK_HEADER(kjsembed/kjsembedpart.h, ,[have_libkjsembed=no] ) + + if test "$have_libkjsembed" = "no"; then + # if this var is 'yes', the configure-suppery drops a warning. + # see admin/configure.in.bot.end + warn_js=yes + fi +fi + +AM_CONDITIONAL(include_libkjsembed, test "$have_libkjsembed" = yes) + +################################################### +# If our own tar-KIO schould be build +################################################### + +AC_ARG_WITH(kiotar, + AC_HELP_STRING([--with-kiotar],[use our write-enabled version of KDE's tar KIO-Slave [default=without]]), + [with_tar=$withval], + [with_tar=no] +) + +AM_CONDITIONAL(with_tar, test "$with_tar" != "no") + +################################################### + +dnl PACKAGE set before +# This adds the RELEASE_NAME-Marco to config.h (where also VERSION is defined). +# It can be used to add a name to a release. If commented out only VERSION is used, see main.cpp +AH_BOTTOM([#define RELEASE_NAME "Power Stone"]) + +dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__ +dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__ +dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__ + +dnl KDE_NEED_FLEX dnl __kdevelop__ +dnl AC_PROG_YACC dnl __kdevelop__ + + +CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -DKDE_NO_COMPAT -DQT_NO_ASCII_CAST" +KDE_CREATE_SUBDIRSLIST +AC_CONFIG_FILES([ Makefile ]) +AC_CONFIG_FILES([ doc/Makefile ]) +AC_CONFIG_FILES([ doc/en/Makefile ]) +AC_CONFIG_FILES([ doc/pics/Makefile ]) +AC_CONFIG_FILES([ doc/ru/Makefile ]) +AC_CONFIG_FILES([ iso/Makefile ]) +AC_CONFIG_FILES([ iso/libisofs/Makefile ]) +AC_CONFIG_FILES([ krArc/Makefile ]) +AC_CONFIG_FILES([ krusader/Makefile ]) +AC_CONFIG_FILES([ krusader/ActionMan/Makefile ]) +AC_CONFIG_FILES([ krusader/BookMan/Makefile ]) +AC_CONFIG_FILES([ krusader/Dialogs/Makefile ]) +AC_CONFIG_FILES([ krusader/DiskUsage/Makefile ]) +AC_CONFIG_FILES([ krusader/DiskUsage/filelightParts/Makefile ]) +AC_CONFIG_FILES([ krusader/DiskUsage/radialMap/Makefile ]) +AC_CONFIG_FILES([ krusader/Filter/Makefile ]) +AC_CONFIG_FILES([ krusader/GUI/Makefile ]) +AC_CONFIG_FILES([ krusader/KViewer/Makefile ]) +AC_CONFIG_FILES([ krusader/Konfigurator/Makefile ]) +AC_CONFIG_FILES([ krusader/KrJS/Makefile ]) +AC_CONFIG_FILES([ krusader/Locate/Makefile ]) +AC_CONFIG_FILES([ krusader/MountMan/Makefile ]) +AC_CONFIG_FILES([ krusader/Panel/Makefile ]) +AC_CONFIG_FILES([ krusader/Queue/Makefile ]) +AC_CONFIG_FILES([ krusader/RemoteMan/Makefile ]) +AC_CONFIG_FILES([ krusader/Search/Makefile ]) +AC_CONFIG_FILES([ krusader/Splitter/Makefile ]) +AC_CONFIG_FILES([ krusader/Synchronizer/Makefile ]) +AC_CONFIG_FILES([ krusader/UserAction/Makefile ]) +AC_CONFIG_FILES([ krusader/UserMenu/Makefile ]) +AC_CONFIG_FILES([ krusader/VFS/Makefile ]) +AC_CONFIG_FILES([ pics/Makefile ]) +AC_CONFIG_FILES([ po/Makefile ]) +AC_CONFIG_FILES([ tar/Makefile ]) +AC_CONFIG_FILES([ virt/Makefile ]) +AC_OUTPUT +# added manualy, it dumps a summary of the most important settings +# and displays a warning if the KDEDIR or QTDIR is empty +echo " +Krusader Project: +----------------- + Source code location: ${srcdir} + C Compiler: ${CC} + C Compiler flags: ${CFLAGS} + C++ Compiler: ${CXX} + prefix: ${prefix} + kde_includes: ${ac_kde_includes} + kde_libraries: ${ac_kde_libraries} + kde_locale: ${prefix}/share/locale + qt_libraries: ${ac_qt_libraries} + qt_includes: ${ac_qt_includes} + KDEDIR: ${KDEDIR} + QTDIR: ${QTDIR} + Install path: ${prefix}/bin + krusader version: ${VERSION} + krusader binary: ${prefix}/bin/${PACKAGE} (after 'make install') +" + +# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure +if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then + # And if so, warn when they don't match + if test "$kde_libs_prefix" != "$given_prefix"; then + # And if kde doesn't know about the prefix yet + echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null + if test $? -ne 0; then + echo "" + echo "Warning: you chose to install this package in $given_prefix," + echo "but KDE was found in $kde_libs_prefix." + echo "For this to work, you will need to tell KDE about the new prefix, by ensuring" + echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix" + echo "Then restart KDE." + echo "" + fi + fi +fi + +if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then + echo "" + echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility" + echo "was not included. Therefore, GCC symbol visibility support remains disabled." + echo "" + echo "For better performance, consider including the Qt visibility supporting patch" + echo "located at:" + echo "" + echo "http://bugs.kde.org/show_bug.cgi?id=109386" + echo "" + echo "and recompile all of Qt and KDE. Note, this is entirely optional and" + echo "everything will continue to work just fine without it." + echo "" +fi + +if test "$all_tests" = "bad"; then + if test ! "$cache_file" = "/dev/null"; then + echo "" + echo "Please remove the file $cache_file after changing your setup" + echo "so that configure will find the changes next time." + echo "" + fi +else + +if (test $warn_konq); + then echo "NOTICE: Since the Konqueror-headers are not found Krusader will be build without support for its service-menus" +fi + +if (test $warn_js); + then echo "NOTICE: Since the KJSEmbed-headers are not found Krusader will be build without JS support" +fi + +if (test $with_tar != "no"); + then echo "NOTICE: Our write-enabled version of KDE's tar KIO-Slave will be build. \"make install\" will may overwrite the KDE-version!" +fi + +if (test -z "$KDEDIR"); + then echo "WARNING: KDEDIR enviroment variable is empty! Please read Krusader FAQ" +fi + +if (test -z "$QTDIR"); + then echo "WARNING: QTDIR enviroment variable is empty! Please read Krusader FAQ" +fi + echo "" + echo "Good - your configure finished. Start make now" + echo "" +fi diff --git a/configure.in.in b/configure.in.in new file mode 100644 index 0000000..440ee70 --- /dev/null +++ b/configure.in.in @@ -0,0 +1,108 @@ +#MIN_CONFIG(3) + +################################################### +# Check for Konqueror +################################################### + +AC_ARG_WITH(konqueror, + AC_HELP_STRING([--without-konqueror],[build Krusader without support Konqueror's servicemenus [default=with]]), + [with_konq=$withval], + [with_konq=yes] +) + +if test "$with_konq" != "no"; then + # check for the headers + have_libkonq=yes + KDE_CHECK_HEADER(konq_popupmenu.h, ,[have_libkonq=no] ) + KDE_CHECK_HEADER(konqbookmarkmanager.h, ,[have_libkonq=no] ) + + if test "$have_libkonq" = "no"; then + # if this var is 'yes', the configure-suppery drops a warning. + # see admin/configure.in.bot.end + warn_konq=yes + fi +fi + +AM_CONDITIONAL(include_libkonq, test "$have_libkonq" = yes) + +################################################### +# Check for ACL +################################################### + +AC_ARG_WITH(acl, + AC_HELP_STRING([--without-acl],[build Krusader without ACL support [default=with]]), + [with_acl=$withval], + [with_acl=yes] +) + +if test "$with_acl" != "no"; then + # check for the headers + have_posix_acl=yes + AC_CHECK_HEADER(sys/acl.h, ,[have_posix_acl=no] ) + have_non_posix_acl_ext=yes + AC_CHECK_HEADER(acl/libacl.h, ,[have_non_posix_acl_ext=no] ) + + if test "$have_posix_acl" = "yes" ; then + AC_DEFINE([HAVE_POSIX_ACL], 1, [Define if system has POSIX ACL support.]) + if test "$have_non_posix_acl_ext" = "yes" ; then + AC_DEFINE([HAVE_NON_POSIX_ACL_EXTENSIONS], 1, [Define if system has non-POSIX extensions to the ACL support.]) + fi + fi + + if test "$have_posix_acl" = "yes" ; then + AC_CHECK_LIB(acl, acl_free) + fi +fi + +################################################### +# Check for JavaScript +################################################### + +AC_ARG_WITH(javascript, + AC_HELP_STRING([--without-javascript],[build Krusader without JavaScript support [default=with]]), + [with_js=$withval], + [with_js=yes] +) + +if test "$with_js" != "no"; then + # check for the header + have_libkjsembed=yes + KDE_CHECK_HEADER(kjsembed/kjsembedpart.h, ,[have_libkjsembed=no] ) + + if test "$have_libkjsembed" = "no"; then + # if this var is 'yes', the configure-suppery drops a warning. + # see admin/configure.in.bot.end + warn_js=yes + fi +fi + +AM_CONDITIONAL(include_libkjsembed, test "$have_libkjsembed" = yes) + +################################################### +# If our own tar-KIO schould be build +################################################### + +AC_ARG_WITH(kiotar, + AC_HELP_STRING([--with-kiotar],[use our write-enabled version of KDE's tar KIO-Slave [default=without]]), + [with_tar=$withval], + [with_tar=no] +) + +AM_CONDITIONAL(with_tar, test "$with_tar" != "no") + +################################################### + +AM_INIT_AUTOMAKE(krusader,1.90.0) +# This adds the RELEASE_NAME-Marco to config.h (where also VERSION is defined). +# It can be used to add a name to a release. If commented out only VERSION is used, see main.cpp +AH_BOTTOM([#define RELEASE_NAME "Power Stone"]) + +dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__ +dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__ +dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__ + +dnl KDE_NEED_FLEX dnl __kdevelop__ +dnl AC_PROG_YACC dnl __kdevelop__ + + +CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -DKDE_NO_COMPAT -DQT_NO_ASCII_CAST" diff --git a/dist2rpm b/dist2rpm new file mode 100755 index 0000000..4c96cd1 --- /dev/null +++ b/dist2rpm @@ -0,0 +1,6 @@ +#! /bin/sh +mkdir /usr/tmp/rpms +export RPM_BUILD_ROOT=/usr/tmp/rpms +mv krusader*.tar.gz /usr/src/RPM/SOURCES +rpmbuild -ba krusader.spec + diff --git a/doc/ChangeLog b/doc/ChangeLog new file mode 100644 index 0000000..072e163 --- /dev/null +++ b/doc/ChangeLog @@ -0,0 +1,577 @@ +The Krusader Handbook ChangeLog +------------------------------- + +1.90.0 "Power Stone" +================================== +Date: 2008-03-15 scheduled release date + + ADDED: Useractions for the 1.90.0 release + ADDED: KDE4.0 installation instructions + ADDED: Howto executing jar files (and not enter the jar archive)? + ADDED: FAQ How don't add ".part" suffix when copying files via ftp? + ADDED: FAQ Where is Konfigurator? + + UPDATED: Howto diplay the complete filename in the Name column (by hiding ext column) + +FIXED: workaround for DBLATEX 0.2.5-1, it doesn't accept "&" to display "&" + in the tag, so i changed it to "and" +FIXED: removed all tags inside , no additional tags + needed inside <title>, it looks bad in HTML version (stylesheet) + +1.80.0 "Final 3rd Stone" +================================== +Date: 2007-07-05 scheduled release date + + + ADDED: Terminal Emulator, paste with SHIFT+INSERT and CTRL+V + ADDED: Vaclav's checksum patches (added sha* tools, fixed bugs etc...) + Nothing to add in the docs i guess for this feature. + ADDED: Synchronizer: ignore hidden files option + ADDED: Synchronizer-results: drag [left], SHIFT+drag [right], + Copy left/right selected items to clipboard + ADDED: Locate-results: dragging items, copy to clipboard (CTRL+C) + ADDED: Searcher-results: dragging items, copy to clipboard (CTRL+C) + + ADDED: Terminal Emulator keybindings in a separate section + + UPDATED: MacOS install instructions and fink repository, thanks to Catalin Hritcu + UPDATED: screenshots + UPDATED: make the Synchronizer chapter more readable and more undertandable + UPDATED: Command Line / Terminal Emulator chapter + UPDATED: FAQ, Sourceforge patch tracker tool + UPDATED: keybindings + UPDATED: old urls of old releases + + FIXED: removed all '_' signs in the entities for the openjade parser + +1.80.0-beta2 "Last Unstable Stone" +================================== +Date: 2007-03-31 + + ADDED: Support for useraction placeholders in Krusader's commandline + ADDED: New default user action "Backup current" + ADDED: ALT+C as default shortcut for compare directories + ADDED: GUI for configuring the atomic extensions in Konfigurator + ADDED: quotation mark handling at search (ex. "Program Files") + + ---------------------------------------------------- + Other todo items not related to Krusader's changelog: + TODO: complete Keyboard Usage + TODO: complete glossary + TODO: complete Mouse Usage + TODO: selection modes + http://krusader.sourceforge.net/phpBB/viewtopic.php?p=8255#8255 + ---------------------------------------------------- + + ADDED: Remote LAN Connections (zeroconf) + ADDED: NewsLetter Forum + ADDED: Quickstart Installation Tutorial + ADDED: FAQ: What todo if an extenal tool doesn't seem to work? + ADDED: FAQ: What todo if the KDEcrashhandler sends no usefull backtrace information? + ADDED: FAQ: How can i send good debug or crash reports? + ADDED: Brief view + + Documentation updates by the Technical Communication team of 2007, + University of Oulu, Finland http://www.oulu.fi/english/ + under the lead of Minna Hekanaho + + ADDED: FAQ: Does krusader supports the FXP protocol? + ADDED: webdav and nfs url + ADDED: FAQ: How can I set the look & Feel of 2 different users equal? + + REMOVED: Outdated and unused Italian handbook translation + +1.80.0-beta1 "The Last Krusade" +=============================== +Date: 2007-01-07 + + ADDED: full support for ACL permissions (properties, preserve attrs, synchronizer) + ADDED: actionman.png screenshot + ADDED: i18n scripts update_docbook, update_pot, update_po + They only should be used by the doc 18n coordinator + Wrong usage of this script might result in outdated documentation files + ADDED: Russian Handbook (translation is work in progress) thanks to Roman Batejkin + + ADDED: TerminalEmulator: Ctrl+F switches between full-widget TE, normal TE + (thanks to Vaclav Juza) + ADDED: Ctrl+Up from panel focuses the origin editbox, Ctrl+Down from origin + editbox focuses the panel (thanks to Vaclav Juza) + ADDED: TerminalEmulator: Ctrl+Shift+Up/Down always focus/unfocus TE + independently whether the command line is shown or not + ADDED: TerminalEmulator: if the command line is hidden, + TE receives Ctrl+Up / Ctrl+Down (thanks to Vaclav Juza) + ADDED: synchronizer: double click on a file calls the diff utility (kompare) + ADDED: atomic extensions (see CVSNEWS) + ADDED: renaming of just the filename, without extension + ADDED: full screen terminal window (mc-style) + ADDED: keeping the directory structures for virt folders at copy/move + ADDED: synchronizer, parallel threads for slow FTP servers + + ADDED: Better quick navigation: first move mouse over subdir, then + press ctrl + left mouse button (patch by Jiri Palecek) + + ------------- Docbook file splitting Design changes ------------------- +UPDATED: split up krusader-tools.docbook in smaller files +UPDATED: split up using-krusader.docbook in smaller files + ADDED: more.docbook (formerly part of using-krusader.docbook) + ADDED: diskusage.docbook (formerly part of krusader-tools.docbook) + ADDED: java.docbook (formerly part of krusader-tools.docbook) + ADDED: viewer-editor.docbook (formerly part of krusader-tools.docbook) + ADDED: locate.docbook (formerly part of krusader-tools.docbook) + ADDED: search.docbook (formerly part of krusader-tools.docbook) + ADDED: bookmarks.docbook (formerly part of krusader-tools.docbook) + ADDED: mount.docbook (formerly part of krusader-tools.docbook) + ADDED: remote-connections.docbook (formerly part of krusader-tools.docbook) + ADDED: archives.docbook (formerly part of using-krusader.docbook) + ADDED: checksum.docbook (formerly part of using-krusader.docbook) + ADDED: occupied-space.docbook (formerly part of using-krusader.docbook) + ADDED: compare.docbook (formerly part of using-krusader.docbook) + ADDED: splitter.docbook (formerly part of using-krusader.docbook) + ADDED: vfs.docbook (formerly part of using-krusader.docbook) + ADDED: profiles.docbook (formerly part of using-krusader.docbook) + ADDED: useractions.docbook (formerly part of krusader-tools.docbook) + ADDED: Mouse Commands, mouse.docbook (formerly part of using-krusader.docbook) + ADDED: Keyboard Commands, keyboard.docbook (formerly part of using-krusader.docbook) + ADDED: abc-index by using <indexterm> + ADDED: List of Figures (index) <screenshot> -> <figure> + ADDED: List of Tables (index) <informaltable> -> <table> + ADDED: release-overview.docbook (formerly part of installation.docbook) + ADDED: useraction-xml.docbook (formerly part of installation.docbook) + ADDED: configuration-files.docbook (formerly part of installation.docbook) + ADDED: help.docbook (formerly part of index.docbook) + ADDED: editorsnote.docbook (formerly part of index.docbook) + ADDED: features.docbook (formerly part of introduction.docbook) + ADDED: glossary.docbook + ---------------------------------------------------------- + + + ADDED: ActionMan for useraction configuration + ADDED: single instance mode (Konfigurator Startup) + ADDED: start to system tray (Konfigurator Startup) + ADDED: right click menu for bookmarks (context menu) + ADDED: enable/disable special bookmarks by right clicking on them + ADDED: an option for directories to be always sorted by name (Konfigurator L&F) + ADDED: FAQ: Why "save last location" doesn't work? + ADDED: Inactive panel color dimming + ADDED: FAQ: How can I send a patch? + ADDED: FAQ: Why does krusader-cvs shows an old version number in the about box? + ADDED: kioslaves: trash:/ and ipod:/ + ADDED: Subversion checkout + ADDED: Profiles chapter + ADDED: Media button, Ctrl+M, Ctrl+Shift+Left, Ctrl+Shift+Right + +UPDATED: Rename 'mark' to 'select' +UPDATED: checksum creation/verification mechanism +UPDATED: Command Reference -> Menu Commands +UPDATED: moved the "Foreword" from index.docbbook to introduction.docbook +UPDATED: Shortcut- and Toolbardialogs are removed from Konfigurator +UPDATED: Heavily extended and reordered menubar, + Updated commands.docbook (thanks to Dan Price) +UPDATED: UserActions examples in the documentation appendix +UPDATED: UserActions are now managed with ActionMan. In Konfigurator + you can change settings _about_ useractions. +UPDATED: Shortcuts are now exported in as plaintext, legacy import still works. +UPDATED: Konfigurator +UPDATED: Konfigurator: MouseMode got now it's own Tab in Look&Feel +UPDATED: Bookman and passwords +UPDATED: Copy/Move: preserve all attributes (time, owner, group) +UPDATED: New cvs checkout url + cvs.sourceforge -> krusader.cvs.sourceforge +UPDATED: FAQ +UPDATED: Command Reference +UPDATED: Marking (Selecting) files and directories +UPDATED: Virtual file systems (VFS) +UPDATED: Archives +UPDATED: Features list rewritten to make it more clear + + FIXED: KruSearcher 'ftp' group -> 'users', thanks to Roman Batejkin + +REMOVED: remoteman.png screenshot + +1.70.0 "Round Robin" +==================== +Date: 2006-01-23 + + ADDED: Help: Upload your extensions/plugins at kde.files.org + ADDED: Help: Spread the Word Krusader + ADDED: FAQ: Crashes in Krusader caused by Qt 3.3.5 + ADDED: Newsfeeds + ADDED: Krusader users mailinglist + ADDED: Mouse Gestures + ADDED: Ctrl+Alt+T to show/hide the terminal emulator + +UPDATED: F10 -> Ctrl+Q : Quit viewer/editor +UPDATED: Ctrl+D -> Ctrl+Shift+B : Detach Tab +UPDATED: Ctrl+E -> Ctrl+Shift+E : Text Viewer +UPDATED: Ctrl+H -> Ctrl+Shift+H : Hex Viewer +UPDATED: Ctrl+G -> Ctrl+Shift+G : Generic Viewer + +UPDATED: Ctrl+Alt+C -> Ctrl+W : Close Tab (panel) +UPDATED: Keybindings (major update and clean up) + + FIXED: Proofread and fixed spelling, etc. - Thanks to Richard Holt + +1.70.0-beta2 "Afterburner" +========================== +Date: 2005-11-05 + + ADDED: New logo, thanks to Andrew Neupokoev (nwmod) + ADDED: FAQ Why do i have some trouble with the media:// protocol? + ADDED: FAQ How can i close a remote connection (⪚ a FTP connection) ? + ADDED: Alt+Enter keybinding, File -> Properties + ADDED: you can turn off sending CDs to the terminal emulator (general tab) + ADDED: our own content category on kde-files.org + ADDED: useraction: View placeholder + ADDED: klik protocol + ADDED: useraction: ColSort placeholder + ADDED: FAQ Why krusader-1.60.0 does not compile with gcc4? + +screenshots: +import -depth 8 -dither -delay 2000 -colors 128 -resize 60% -frame filename.png +pngcrush --brute filename.png ./crush/filename.png + +1.70.0-beta1 "Hellfire" +======================= +Date: 2005-09-27 + + ADDED: JavaScript interface + ADDED: Quick Navigation in the Location Toolbar + ADDED: checksum creation/verification mechanism + ADDED: ctrl-alt-s creates a new symlink + ADDED: ctrl-h opens history on the active panel + ADDED: 1.70.0 (Hellfire) + ADDED: appendix: release overview + ADDED: FAQ, Why does the handbook not work? + ADDED: MacOS-X port installation instructions + ADDED: Column Headers can be changed and saved individually to each panel + ADDED: Commands -> Select Remote Charset + ADDED: credit for Matej Urbancic, Marketing & Product Research + ADDED: Accept URL's from clipboard through middle click + ADDED: permissions column as octal numbers + ADDED: clear-location-bar button, konfigurator->look'n'feel + ADDED: calculate space on remote filesystems + ADDED: when custom filter is set, the Totals label will show the filter. example: [*.cpp] + ADDED: Open the current folder in a new tab + ctrl-alt-enter keybinding + ADDED: Bookmarks as action buttons on the Toolbar, thanks Googie and Shie + ADDED: FAQ, Is there a Windows version? + ADDED: FAQ, Is there a MacOS X version? + ADDED: preserve date for local targets at copy / move + ADDED: new ./configure-switches: --without-konqueror and --without-javascript + ADDED: Keyboard Usage + ADDED: PopUp Panel (3rd Hand) -> Viewer Panel -> is a "Thumbnail viewer" on a folder + ADDED: credits for Brazilian Portuguese translation for Doutor Zero + ADDED: credits for Krusader packagers + ADDED: A Safari-like Jump-Back feature (Ctrl-J and in the bookmark-menu) + This feature is inspired by the Snap-Back feature of Apple's webbrowser Safari + ADDED: i18n help (Help Krusader) + +UPDATED: Distro's who include distro urls +UPDATED: Remote connections +UPDATED: Bookman: in kde 3.4, devices:/ is now media:/ +UPDATED: new i18n page url +UPDATED: mailing lists +UPDATED: installation $ find /usr /opt -name qtconfig -type f 2>/dev/null + $ find /usr /opt -name kdeinit -type f 2>/dev/null + thanks Dirk +UPDATED: Commands, Settings -> Save Position +UPDATED: kgstartup.png used $ import ... -resize 60% and $ pngcrush +UPDATED: Konfigurator startup page +UPDATED: FAQ, Why have i trouble with my FTP connection? + thanks to Peter J. [ pecko {*} pecko {.} sk] at http://www.pecko.sk +UPDATED: How to obtain Krusader +UPDATED: changed locate-gui shortcut from ctrl-l to ctrl+shift+l + +FIXED: Some manpage issues, thanks S�ke Dibbern + +REMOVED: RemoteMan, the FTP/SMB connection manager + RemoteMan has been replaced by our new bookmark manager since Krusader 1.25-beta1 + RemoteMan is disabled since Krusader-1.60.0 +REMOVED: remoteman.png (NOT YET DONE IN CVS, TODO) +REMOVED: Ctrl+C: Commands -> Net Connections (RemoteMan) +REMOVED: Ctrl+C+N Disconnect From Net (RemoteMan) + +1.60.0 +====================== +Date: 2005-04-15 +Final handbook revision for "Krusader 1.60.0 stable" + + ADDED: credit for Sven Opitz, for the first donation + ADDED: credit for http://usefularts.org/ + ADDED: FAQ Why mimetype magic isn't sometimes working inside archives? + ADDED: credit for Gabor Lehel (illissius) + ADDED: FAQ Why does &krusader; freezes on a dead mountpoint? + ADDED: Help Krusader: Maintainer for porting Krusader to Windows + ADDED: Help Krusader: Maintainer for porting Krusader to MacOS X + ADDED: Help Krusader: UserActions + ADDED: Version scheme (installation.docbook) + ADDED: ACE archive note (konfigurator.docbook) + ADDED: Custom Selection Mode + ADDED: useraction: new placeholder: %_ListFile()% + ADDED: Ctrl+z (popular url's) + ADDED: useraction placeholder %_Script(path/to/script.js)% + ADDED: kguseractions.png and kgprotocols.png for the HTML/RTF/PDF version + ADDED: Useractions menu entry + ADDED: credit for Terry "Fudoki" Wilkinson, documentation + ADDED: JavaScript console (incomplete description) + ADDED: Remote-man FAQ, url Bookmark transfer procedure + ADDED: Remote Connections + ADDED: Bookmarks Password handling + ADDED: Bookmarks can be placed into the Main Toolbar and the Actions Toolbars + ADDED: Popular urls in Folder History + ADDED: Ctrl+Alt+j keybinding for the JavaScript console + ADDED: Help Krusader + ADDED: Actions Toolbar + ADDED: color scheme export/import + ADDED: searcher, feed to listbox (with virtual folders) + ADDED: useraction placeholder %_ask(..)% + ADDED: PanelSize placeholder %_PanelSize% %aPanelSize("80")% + ADDED: show/hide listpanel Columns by right clicking the Column Header + ADDED: Disk Usage, Alt+D + ADDED: Useraction placeholders %_Each% and %_Move(src, dest)% + ADDED: PopUp Panel has now a Full Viewer + ADDED: Shift+DEL will delete a file permanently + ADDED: inport/export keybindings (konfigurator, look & feel) + ADDED: kio_krarc.* "Protocol not supported by Krusader" (FAQ) + ADDED: krusader-devel-ro mailing list + ADDED: Ctrl+O keybinding + ADDED: This handbook is available in several formats (HTML, TXT, RTF, PDF) + ADDED: resize to a small size even with Fn keys showing (FAQ) + ADDED: vertical-horizontal list panel, Alt+Ctrl+v + ADDED: Ctrl+Up Arrow (from the panel) goes up to the Location Toolbar + ADDED: New commandline option: --profile <panel-profile> + ADDED: UserAction Forum (faq.docbook), thanks Dirk + ADDED: 64 bit FAQ (faq.docbook), thanks Marc on our forum + http://krusader.sourceforge.net/phpBB/viewtopic.php?t=951 + +UPDATED: Krusader KDE version Requirements +UPDATED: DTD DocBook XML V4.2-Based Variant V1.1 (V4.1.2 was the previous version) +UPDATED: Synchronizer, Thanks Csaba +UPDATED: UserMenu usage +UPDATED: UserActions description +UPDATED: krusader1.png, kgstartup.png, mountman.png, search_general.png, + search_advanced.png, syncdir.png, bookmanadd.png, bookmanedit.png + all screenshots in "plastic' theme (the default kde 3.4 theme), made with Imagemagic + $ import -depth 8 -dither -delay 2000 -colors 128 -resize 70% -frame search_advanced.png + except bookmanadd.png with KSnapshot +UPDATED: first Krusader-Tools and then Konfigurator (reversed the order) +UPDATED: mark (obsolete) -> select +UPDATED: date format mm/dd/yyyy -> yyyy/mm/dd +UPDATED: Introduction and features separated into a new chapter +UPDATED: Foreword, thanks to Terry "Fudoki" Wilkinson +UPDATED: Toolbar -> Main Toolbar (due to the Actions Toolbar) +UPDATED: remoteman was disabled. from now on, Bookmark Manager only +UPDATED: Commands - New Net Connection: FTP, SMB, FISH or SFTP connection +UPDATED: mouse selection mode +UPDATED: Function (FN) Keys Bar - keybindings are now configurable +UPDATED: Amarok useraction, thanks Dirk (installation.docbook) + + FIXED: Proofread and fixed spelling, etc. - Thanks to Terry "Fudoki" Wilkinson + +1.51.00 +====================== +Date: 2004-11-28 + +Richard Holt is now an official member of the documentation team. +Welcome aboard Richard! + FIXED: many typos fixed - Thanks to Richard Holt + +1.50.04 +====================== +Date: 2004-11-19 + + FIXED: Proofread and fixed spelling etc. - Thanks to Richard Holt + FIXED: uncommented <?xml version="1.0" ?> in index.docbook + FIXED: removed some acronym elements, the jade parser does not like them + FIXED: <imagedata fileref="foo.eps" ...> -> foo.png +REMOVED: bookmanuse.png not used anymore since hanbook 1.00.02 + ADDED: useraction: Parameter-description for the placeholder + +1.50.03 +====================== +Date: 2004-11-04 + + FIXED: doc/pics/Makefile.am did not remove krusader_title.png & + tabbed_browsing.png when running 'make uninstall' + ADDED: syncdir.png +REMOVED: kglookfeel.png kggeneral.png kgadvanced.png kgarchives.png + in cvs but not in the html documentation + ADDED: FAQ: Does Krusader need KDE? +UPDATED: required KDElib versions +UPDATED: User Actions, thanks for the feedback Jonas Bähr + FIXED: Proofread and fixed spelling, etc. - Thanks to Mark Eatough +UPDATED-FIXED: many small issues + +1.50.02 +====================== +Date: 2004-10-25 + +ADDED: useraction.xml +ADDED: FAQ Nvdia/libGLcore.so.1 compile problem, Thanks Falo and Rafi +UPDATED-FIXED: many small issues + +1.50.01 CVS +====================== +Date: 2004-10-08 + + ADDED: MacOS-X port, Thanks Jonas + ADDED: Compare Directories, Thanks Csaba + ADDED: Konfigurator: arj, lha, kget + ADDED: Konfigurator: protocols, Thanks Csaba + ADDED: Faster navigation in bookmarks, Thanks Shie + ADDED: FAQ How can i disable the default sounds, Thanks thepieman +UPDATED: Synchronizer, Thanks Csaba +UPDATED: Usermenu - Useractions, Thanks Jonas +UPDATED: New TODO forum and NEWS forum +UPDATED-FIXED: many small issues + +1.50.00 CVS +====================== +Date: 2004-08-15 + + ADDED: Synchronizer: multiple include/exclude filter example + ADDED: Dropping URL's onto the status bar / totals line, Thanks Csaba + ADDED: FAQ IRC channel + ADDED: FAQ Debian Qt issue, Thanks Eugen Albiker + ADDED: Sync-browse mode, Thanks Jonas + ADDED: Usermenu, Thanks Jonas + ADDED: 3rd hand of krusader, Thanks Shie +REMOVED: Tree Panel, Quick View Panel -> is now "3rd hand of krusader" +REMOVED: <informalexample> docbook entity in installation.sgml + (gives a double console rectangle in cobination with <screen> under KDE3.2) +UPDATED-FIXED: many small issues + +1.40.02 +====================== +Date: 2004-07-21 +Final handbook revision for "Krusader 1.40 stable" + + ADDED: Krusader Handbook logo for the HTML version +UPDATED: Konfigurator +UPDATED: Credits +UPDATED: KIOSlave +UPDATED: Screenshots +UPDATED: some obsolete issues +UPDATED: Origin Button -> Location Toolbar +UPDATED: usage of more default KDE Docbook entities, often located in + /usr/share/apps/ksgmltools2/customization/en/ + /usr/share/apps/ksgmltools2/customization/entities/ +UPDATED-FIXED: many small issues + +1.40.01 +Date: 2004-05-17 +UPDATED: RPM FAQ + ADDED: FAQ How can i translate Krusader to my native language? +UPDATED-FIXED: many small issues + +1.40.00 +====================== +Date: 2004-04-22 +FIXED: Proof read and fixed spelling etc. - Thanks to Mark Eatough + +1.40.00-beta1 Date: 2004-03-29 + ADDED: configuring the colors of the panel - Thanks to Heiner Eichmann + ADDED: Quickmode for MountMan - Thanks to Shie Erlich +UPDATED: Konfigurator screenschots + +1.31.01 Date: 2004-03-04 + ADDED: locate (using-krusader.sgml) - Thanks to Karai Csaba + ADDED: Right click menu (using-krusader.sgml) +UPDATED: FAQ's "krusaderui.rc" file issue, - Thanks to Karai Csaba +UPDATED-FIXED: many small issues + +1.31.00 +====================== +Date: 2004-02-12 +From now on the <releaseinfo> tag always matches the Krusader version number that is +described in the documentation, e.g., "Krusader Handbook version 1.31.xx" +describes "Krusader version 1.31" + + ADDED: New Quicksearch (using-krusader.sgml) - Thanks to Heiner Eichmann + ADDED: Folder history (using-krusader.sgml) - Thanks to Hans Loffler + ADDED: appendix: configuration files (installation.sgml) +UPDATED: New Konfigurator (konfigurator.sgml) - Thanks to Karai Csaba +UPDATED: I try to follow the guidelines in "The KDE DocBook Authors guide" + but sometimes I don't do it. ;-) +UPDATED: FAQ's (faq.sgml) +UPDATED: Calculate occupied space (using-krusader.sgml) - Thanks to Heiner Eichmann +UPDATED: Krviewer (krusader-tools.sgml) +UPDATED: new package description - Thanks to Jonas Bähr +UPDATED-FIXED: many small issues +Date: 01.02.2004 + FIXED: Proofread and fixed spelling, etc. - Thanks to Mark Eatough +Date: 06.01.2004 + ADDED: User Menu (commands.sgml) - Thanks to Shie Erlich +UPDATED: manpage (krusader.1) +UPDATED: directory synchronisation (moved to krusader-tools.sgml) - Thanks to Karai Csaba +UPDATED: From: DocBook XML V4.1-Based Variant V1.0//EN + To: DocBook XML V4.1.2-Based Variant V1.1//EN + +1.00.05 +====================== +Date: 2003-12-21 + FIXED: added package entity for compilation under KDE3.2-beta2 (index.docbook) + ADDED: file splitter (using-krusader.sgml) + ADDED: directory synchronisation (using-krusader.sgml) +UPDATED: Commands Reference (commands.sgml) +UPDATED: install procedure (installation.sgml) +UPDATED: Questions and Answers (faq.sgml) +UPDATED: many small issues + FIXED: many small issues + FIXED: spelling mistakes/typos corrections + proofreading, thanks to Mark Eatough + +1.00.04 +====================== +Date: 2003-11-26 +UPDATED: Konfigurator (konfigurator.sgml) +UPDATED: KruSearcher (krusader-tools.sgml) +UPDATED: Questions and Answers (faq.sgml) krarc slave issue + Thanks to Karai Csaba + ADDED: Key Bindings (using-krusader.sgml) + ADDED: Starting Krusader (installation.sgml) + ADDED: Note from the Editors (installation.sgml) + FIXED: spelling mistakes/typos corrections + proofreading, thanks to Mark Eatough + +1.00.03 +====================== +Date: 2003-11-15 +ADDED: Krviewer (krusader-tools.sgml), thanks to Rafi Yanai + +1.00.02 +====================== +Date: 2003-10-23 +KRUSADER MANPAGE: ADDED: ~/.kde/share/apps/krusader/krbookmarks.xml + +UPDATED: cmdline.png, fnkeys.png, krusader1.png, listpanel.png + mainwindow.png, terminalEmu.png, toolbar.png (using-krusader.sgml) +UPDATED: BookMan, bookmanadd.png, bookmanedit.png (krusader-tools.sgml) +REMOVED: bookmanuse.png (using-krusader.sgml) [actually, not till 1.50.04 :] +UPDATED: Note: RemoteMan wil be removed (krusader-tools.sgml) + ADDED: tabbed browsing, tabbed_browsing.png (using-krusader.sgml) +UPDATED: Tree Panel, Quick View Panel, + Note: temporarily disabled since Krusader 1.12-beta1 --will be rewritten, sorry. + small issues, Compare mode (using-krusader.sgml) +UPDATED: Chapter 3. Command Reference (commands.sgml) + ADDED: Questions and Answers (faq.sgml) Samba codepage issue + Thanks to Karai Csaba + ADDED: krusader_title.png (introduction.sgml) +UPDATED: Introduction (introduction.sgml) + Krename, Bookmark, Tabbed Browsing, Root mode, screenshot krusader1.png + +1.00.01 +====================== +Date: 2003-10-05 +UPDATED: installation (installation.sgml) +UPDATED: Frequently Asked Questions and Answers (faq.sgml) +UPDATED: Credits and License (credits.sgml) + ADDED: NOTE: We are busy with updating the The Krusader Handbook. (index.docbook) +UPDATED: small issues, eg., KDE2.x -> 3.x (index.docbook) +The Krusader Handbook is now continued and maintained by Frank Schoolmeesters. + +1.00.00 +================== +Date: 2002-01-01 +Initial version +Written by Shie Erlich and Rafi Yanai. + diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..4d78d65 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,15 @@ +####### kdevelop will overwrite this part!!! (begin)########## + +SUBDIRS = en ru pics + +EXTRA_DIST = krusader.1 + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(mandir)/man1/ + $(INSTALL_DATA) $(srcdir)/krusader.1 $(DESTDIR)$(mandir)/man1/krusader.1 + +uninstall-local: + -rm -f $(DESTDIR)$(mandir)/man1/krusader.1 + +####### kdevelop will overwrite this part!!! (end)############ + diff --git a/doc/actions_tutorial.txt b/doc/actions_tutorial.txt new file mode 100644 index 0000000..257def5 --- /dev/null +++ b/doc/actions_tutorial.txt @@ -0,0 +1,70 @@ +A Short Tutorial for the User Actions System +============================================ +Go to the Konfigurator and choose "Useractions". There you manage all your +actions. If you add an new action, you get an empty input-mask where you can +enter all the properties. The action will be added as soon as you press "ok". +Now it's shown in the list on the left. + +You can choose it if you want to edit the properties (the changes will take +effect if you press OK), remove it (per default you will be asked again if +you realy want to delete it but you can disable it by checking "don't ask me again"). + +If you export a useraction you have to give a file where to store it. If it +does not exists it will be created. If it contains already some useractions, +the action you're exporting will be added to that file. + +If you import some actions they will be added automaticly to your list. If +there are name-conflicts (the names have to be unique because these are the +ID for KDE's action-system) you're asked to resolve them. For this, the list on +the left will only show the actions where conflicts exists. You now can give +them new names or remove them. + +All actions you've defined are now shown in the usermenu and in KDE's dialogs +for changing shortcuts and managing the toolbar. In addition all actions +which are available for the current item will also show up in the rightclick +menu. + +The fields of the properties are (* are required): +name*: a unique name of the action, used to identiy it for KDE's action-system +title*: the title displayed in the menus/dialogs +icon: the icon for you action +tooltip: a tooltip for your action - i.e. displayed in the toolbar on mouseover +desctiption: a description of what the action is doing. +command*: that is the command which is finaly executed. you can add + placeholder using a GUI with the 'add'-button +startpath: the working-directory for your command execution-mode should be clear +command eccepts: tells if the placeholder should return local addesses or URLs +Default shortcut: the action will be init with this shortcut + +On the advanced-tab you can say where your command should be visible (for the +rightclick-menu). In addition it's possibe to change the command executed and +confirm it separately. You can also set a user under which the command should +be executed. + +There are basicly two kinds of placeholders: +1) those who access internal functions of Krusader +2) those who are are replaced by a string. + +it's important to know that the first category is performed at expansion-time, +meaning that the extra confirmation has only effect on programms which are +executed, not on internal functions (which aree called earlyer) + +The list of placeholders is accessable via the 'add' button. +Some Placeholders can get parameters, for those is also a GUI provided. +The following list is already implemented: + Path replaced by the panels path + Count replaced by the number of <first parameter> + Filter replaced by the panels filter-mask + Current replaced by the current item + List replaced by a list of all <first paremeter> + Select manipulates the selection in a panel + Goto changes the panels's path to <first parameter> + Ask asks the user for a some text and is replaced by the answer + Clipboard manipulates the clipboard + Copy copies a file, useful for quick, local, backups + Sync opens the Synchronizer with a given profile + NewSearch opens the search-windows with a given profile + Profile loads a given panel-profile + +Enjoy, + diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am new file mode 100644 index 0000000..dc8b999 --- /dev/null +++ b/doc/en/Makefile.am @@ -0,0 +1,11 @@ +####### kdevelop will overwrite this part!!! (begin)########## + + +EXTRA_DIST = archives.docbook editors-note.docbook java.docbook profiles.docbook user-interface.docbook bookmarks.docbook more.docbook faq.docbook keyboard.docbook release-overview.docbook using-krusader.docbook checksum.docbook features.docbook konfigurator.docbook remote-connections.docbook vfs.docbook commands.docbook glossary.docbook krusader-tools.docbook search.docbook viewer-editor.docbook compare.docbook help.docbook locate.docbook splitter.docbook configuration-files.docbook index.docbook mount.docbook synchronizer.docbook credits.docbook installation.docbook mouse.docbook useractions.docbook diskusage.docbook introduction.docbook occupied-space.docbook useraction-xml.docbook + +####### kdevelop will overwrite this part!!! (end)############ + +KDE_LANG = en +KDE_DOCS = krusader + + diff --git a/doc/en/archives.docbook b/doc/en/archives.docbook new file mode 100644 index 0000000..a94afe1 --- /dev/null +++ b/doc/en/archives.docbook @@ -0,0 +1,125 @@ +<sect1 id="archives"> + <title>Archive Handling + + Archives + + + Browsing Archives + The &vfs-lnk; allows you to browse archives as + if it was a directory. Currently &krusader; supports + the following archives types: ace, arj, bzip2, deb, gzip, iso, + lha, rar, rpm, tar, zip and 7-zip and supports the following + passworded archives: arj, ace, rar and zip. Passwords can be + stored in &kwallet;. Please note that the archive + support first needs to be properly + configured in + Konfigurator. To open the archive, use &Enter;, + (double-)click or the + Right Arrow. &krusader; supports + also + hidden archives, these are + renamed archives with a *wrong* extension, ⪚ + &openoffice; uses zip archives with the following + extensions: odt, sxw and odw. &Enter; will open the + &openoffice; document and the + Right Arrow will open the archive. Another + example is J2EE, where the rar extension means a zip archive. + Since &krusader; auto-detects the supported archive + types, it will open with + Right Arrow even if it has another mime type. + Please note that browsing archives has a few limitations: + + + Not all functions are supported by all archive types. + (&ie;: you can not delete files in ace or rar + archives) + + + The permissions you have inside the archive are the + same as the permissions you have for the archive. + + + The command line (if visible) will not follow you + inside the archive but will point to the archive + directory. + + + Before any action is performed on files/directories + inside the archive, they must be extracted. The archive + will be repacked when you leave it or when + &krusader; detects that extracted files have + changed. + + + Packing and un-packing are "blocking operations" that + display a progress dialog. However, this might change in + the future since we are planning to create more background + operations. + + + + + Unpack Files + There are 2 ways to extract files from archives: + If you want to unpack a whole archive(s), browse to the + archive location, select the archive(s) and select + + + File + Unpack + + or + &Alt; + U. &krusader; will ask + you where to put the extracted files. The default location is + the inactive panel directory. If you don't cancel the + operation, &krusader; will try to unpack all the + selected files in the inactive panel. + If you only want to extract a part of the archive, then + browse the archive and + copy the files you want to extract to their new location just + as you would copy "normal" files. Note that unpacking from a + browsed archive takes more time (file by file unpack) compared + to unpacking a whole archive with the first method. + + + Packing Files + If you want to create a new archive, begin by selecting + the elements you want to pack in the active panel and select + + + File + Pack + + or + &Alt; + P. A dialog will pop-up prompting + you to select the archive name and location. Select the packer + from one of the + supported file name + extensions. + To add files to an existing archive(s), open the archive + in one panel and the files to be copied in the other panel, + then simply copy the files into the archive in exactly the same + way you copy files into a "normal" directory. + + + Testing Archives + Krusader will not handle corrupted archives since it may + result in data loss. If you receive an error message when + opening an archive, or if you suspect that there is something + wrong with the archive, you should test it before use. To test + an archive, browse (navigate) to the archive location and + select the archive. Next select + + + File + Test Archive + + or + &Alt; + E. &krusader; will test + the archive file and inform you whether the archive passed or + failed the file integrity test. + + diff --git a/doc/en/bookmarks.docbook b/doc/en/bookmarks.docbook new file mode 100644 index 0000000..9817d77 --- /dev/null +++ b/doc/en/bookmarks.docbook @@ -0,0 +1,289 @@ + + BookMan: Organize your Bookmarks + + Bookmarks + + BookMan is &krusader;'s Bookmark tool for + bookmarking folders, local- and + remote URL's, and later + returning to them in a click of a button. The Bookman menu is + divided into four sections: + + + Your personal bookmarks + + + Popular &URL;'s + + + Permanent bookmarks + + + Manage bookmarks + + + + You can bookmark inside a remote file system + (&FTP; or SAMBA) and later use the bookmark to + quickly connect to the remote machine, but you cannot bookmark + inside an archive. + + +
+ Bookmark menu + + + + + + Bookmark menu + + +
+ + Using Bookmarks + Usually, you click on the + Bookmark button when you are in the target + folder. For example, to bookmark + /usr/tmp, navigate + &krusader; there and click the + Bookmark button and select + Bookmark Current. When the + Bookmark Current dialog box appears, the + &URL; line will say + /usr/tmp. + Name is for the name you would like to give + to the bookmark (e.g.: temporary folder). Hotkeys are supported + by adding + & to the bookmark name + ⪚ + &sourceforge, &home, + down&loads &etc;, so you can + quickly call the bookmark name with + &Alt; + foo. If you add the bookmark + without entering a name, the bookmarks name will be the same as + its target. + URL + + is where the bookmark points to. + Create in creates bookmark folders for + organizing your bookmarks. + To use your bookmarks, click the + Bookmark button and choose a bookmark. + You may also use the &keybindigs-lnk; : + &Ctrl;&Shift; + d to bookmark the current item, + &Alt; + right/left arrow to + open right/left panel bookmarks list and + &Ctrl; + d to open the bookmarks of the + active panel. A &MMB; click on bookmarks opens them + in a new + Folder tab. + Navigation in bookmarks: + + + Start typing letters + + + ⪚ when you type + 'h' and only one bookmark starts with + 'h', it is executed immediately - no + enter needed + + + If more than one bookmarks begins with + 'h', you will have to continue adding + letters, until you have specified enough and again, the + bookmark is executed. + + + + + Password handling + One of the benefits of the + bookmark manager is that the + passwords are saved using &kde;'s services - where + ⪚ your &konqueror;/&kmail; + password are saved. If you have a wallet, &kde; will + save the passwords there. By clicking the bookmarks, a dialog + will open and ask for your username and password. Supply them + and click 'save password'. The passwords and usernames will be + saved securely by &kde;'s wallet (make sure it is + enabled by your distro). The downside here is that if you + reinstall and do not backup your passwords from the wallet as + well as &krusader;'s bookmark file, something will + be lost. + + + Popular URL's + + Popular URL's + + The submenu + Popular URL's + + holds persistent the most popular visited &URL;'s + (local or remote). This submenu displays the top 15 popular + URLs, sorted by ranking, so that the top &URL; is + the most popular. This is easy for when you need to visit + &URL;s often, but do not want to create + &bookmarks-lnk;, it serves as a temporary bookmark + list for the most visited links. + Quicksearch Popular URL's is a fast way to + browse/select the popular &URL;s: + + + Open the + Popular URL's + + or use + &Ctrl; + z + + + Type a few letters to narrow the search + + + Press enter (you will go to the &URL; + list) + + + Press enter again and the panel is refreshed + + + + + Permanent bookmarks + These are hardcoded bookmarks to the top bookmark menu; + there is no need for them to be saved to the file. With the + &context-menu-lnk; you can enable/disable these + permanent bookmarks. The following permanent bookmarks are + available: + + + + Media uses &kde;'s + Media protocol + media:/ + + + + Local Network uses &kde;'s + lan:/ protocol. + + + + Virtual Filesystem &vfs-lnk; + + virt:/ is not a virtual folder, but a + container for &URL;'s from different file + systems. It is used for ⪚ the + Feed to Listbox feature of the search + module and the synchronizer. The location toolbar will + display ⪚ + virt:/Search results 1 or + virt:/Synchronise results 1. + + + + Jump back or + &Ctrl; + J brings you back to your + starting position when you did create a new tab in the + panel window. This feature is very handy if you go deep + into a directory tree, than you can return with one action + to the starting point. With + Set jump back point here or + + &Ctrl;&Shift; + J sets the current directory as + a jump back point. + + + + + Manage bookmarks + To edit and organize your bookmarks, by clicking the + Bookmark button and selecting the + Manage Bookmarks, + &keditbookmarks; will be displayed. This is where + you can edit/remove and rearrange the bookmarks. + &keditbookmarks; (part of the kdebase package) is a + bookmark editor for &konqueror;, + &krusader; and other applications, which use the + &xbel-url; standard for the bookmark format. The + bookmarks are stored in + + ~/.kde/share/apps/krusader/krbookmarks.xml. + You can import bookmarks from + IE, + Opera, + Galeon, &kde;, + Mozilla, &Netscape;. + &keditbookmarks; is easy to use, however, if you + need more information, please read the + &keditbookmarks; or the &konqueror; + handbook. + +
+ &keditbookmarks; Bookmark Manager + + + + + + &keditbookmarks; Bookmark + Manager + + +
+
+ + Bookmarks as action buttons on the Toolbar + Bookmarks can be placed as buttons on the + &main-toolbar-lnk; or the + &actions-toolbar-lnk;. You can even make a + key-binding for them: + + + Create your &bookmarks-lnk;. + + + If you want, create keybindings for the bookmarks in + the + Key-bindings section of the + &konfiglookandfeel-lnk;. + + + Add your bookmarks as action buttons on the + &main-toolbar-lnk; or the + &actions-toolbar-lnk; with the + Toolbar section of the + &konfiglookandfeel-lnk;. + + + +
diff --git a/doc/en/checksum.docbook b/doc/en/checksum.docbook new file mode 100644 index 0000000..e6a3c0b --- /dev/null +++ b/doc/en/checksum.docbook @@ -0,0 +1,34 @@ + + Checksum creation-verification + + Checksum + + + + + File + Create Checksum + + : &krusader; checks which tools you have + and if those tools allow recursive operation (in case you + selected folders), you can generate a checksum by choosing a + checksum type from the list (md5, sha...). You can then save the + checksum to a file, usually called checksum.md5 or + checksum.sha1. + + + + File + Verify Checksum + + : &krusader; checks if you have a tool that + supports the type of checksum you need (from your specified + checksum file) and displays the files that failed the checksum + (if any). + The system abstracts over different checksum mechanisms and + Checksum Utilities. At the moment, the following checksums are + supported: md5, sha1, sha256, sha224, sha256, sha384, sha512, + tiger, whirlpool, cfv and crc. Please check your + Checksum Utilities + settings before using this function. + diff --git a/doc/en/commands.docbook b/doc/en/commands.docbook new file mode 100644 index 0000000..54b6336 --- /dev/null +++ b/doc/en/commands.docbook @@ -0,0 +1,2129 @@ + + + Menu Commands + + Commands + Menu + + + File Menu + + + + + + &Shift; + F4 + + File + New Text File + + + + Creates a new text file in the current directory, + unless another directory is specified. The new file is + opened for editing after it is created. + + + + + + + F7 + + File + New Directory + + + + Creates a new directory in the current + directory. + + + + + + + + &Alt;&Ctrl; + S + + File + New Symlink + + + + Creates a symbolic link to the currently selected + file. + + + + + + + F3 + + File + View File + + + + Opens the currently selected file for + viewing. + + + + + + + F4 + + File + Edit File + + + + Opens the currently selected file for + editing. + + + + + + + F5 + + File + Copy + + + + Opens a dialog to + copy the currently selected + files or directories to a specified location. + + + + + + + F6 + + File + Move + + + + Opens a dialog to + move the currently selected + files or directories to a specified location. + + + + + + + &Alt; + P + + File + Pack + + + + Creates a + new archive of all the + selected files and directories in the active + panel. + + + + + + + &Alt; + U + + File + Unpack + + + + + Unpacks all the + selected files in the active panel. + + + + + + + &Alt; + E + + File + Test Archive + + + + + Tests archive for + corruption. + + + + + + File + Compare by content + + + + Compares two current files by content - one from + each panel via an external graphical diff utility. By + default &kompare; (part of the kdebase + package) is used, but you can also use ⪚ + &xxdiff-url; or &kdiff3-url; , + change it in the + &konfigdependencie-lnk;. + + + + + + + &Shift; + F9 + + File + Multi Rename + + + + This menu option starts &krename-url; a + very powerful external batch renamer for &kde; + 3.x. + + Krename Features + + Renaming a list of files based on a set of + expressions + + + Copying/moving a list of files to another + directory + + + Convert filenames to upper/lower case + + + Adding numbers to filenames + + + Finding and replacing parts of the + filename + + + Renaming MP3/OGG Vorbis files based on their + ID3 tags + + + Setting access and modification dates + + + Changing permissions and file ownership + + + A plug-in API which allows you to extend + Krename's features + + + Renaming directories recursively + + + Support for KFilePlugins + + + Create undo file + + + And many more.... + + + + + + + + File + Create Checksum + + + + + Checksum creation on + file(s) and/or folder(s). + + + + + + File + Verify Checksum + + + + + Verify Checksum + + + + + + + + + &Ctrl; + P + + File + Split file + + + + The &splitfile-lnk; function splits a + file up into multiple smaller files so that it can be + stored on several smaller media (like + diskettes, zip-drives, ...) or sent by + e-mail. + + + + + + + &Ctrl; + B + + File + Combine files + + + + The &combinefiles-lnk; function combines + multiple files into one file after the + &splitfile-lnk; function was used. + + + + + + + + &Ctrl; + Q + + File + Quit + + + + Closes &krusader; and cleans up the + temporary directory, the same as pressing + F10 key. + + + + + + Edit Menu + + + + + + &Ctrl; + X + + Edit + Cut to Clipboard + + + + + Cuts the selected file(s) + to the clipboard to be moved to another location. + + + + + + + &Ctrl; + C + + Edit + Copy to Clipboard + + + + + Copies the selected file(s) + to the clipboard to be moved to another location. + + + + + + + &Ctrl; + V + + Edit + Paste from Clipboard + + + + + Pastes previously cut or + copied items from the clipboard to the current + directory. + + + + + + + F9 + + Edit + Rename + + + + + Renames the currently + selected file. + + + + + + + F8 + + Edit + Delete + + + + + Deletes the currently + selected file(s). + + + + + + + &Ctrl; + + + + Edit + Select Group + + + + Opens a dialog which allows you to select files in + the active panel. In the + Search for dialog place the main + search criteria. Enter a filename, a wildcard ( + *.o.*, + *.c &etc;) + or both - separated by a space. When using + 'text', the results are the same as + '*text*'. You can exclude files from + the search with '|' (⪚ + '*.cpp *.h | + *.moc.cpp'). With the + profile handler you can + manage your selections for future usage. A double-click + on a profile is the same as entering the selection and + pressing the + OK button. More options for + Select Group dialog are explained in + the + Search dialog, which + are basically almost the same dialogs. + + + + + + + &Ctrl; + - + + Edit + Unselect Group + + + + The opposite of + Select Group. The files that + match the pattern in the active panel will be + deselected. + + + + + + + &Alt; + + + + Edit + Select All + + + + Selects all files in the active panel. You can also + select all directories by activating the + Automark directories option in the + &konfiglookandfeel-lnk;. + + + + + + + &Alt; + - + + Edit + Unselect All + + + + Unselects all the files in the active panel. + + + + + + + &Alt; + * + + Edit + Invert Selection + + + + Inverts the selection status of all the files in + the active panel (&ie; selected files will + become unselected and deselected files will become + selected). + + + + + + + &Alt; + C + + Edit + Compare Directories + + + + Toggles &krusader; + &comparedir-lnk; function. + + + + + + Edit + Compare setup + + + + Configures the + Compare Directories function. + + + + Select Newer and Single (default) + + + + Select Single + + + + + Select Newer + + + + + Select Different and Single + + + + + Select Different + + + + + + + + + Edit + Calculate Occupied Space + + + + + Calculates occupied + space of files and folders, archives and remote + filesystems. + + + + + + + &Alt; + KP_Enter + + Edit + Properties + + + + Opens the properties dialog for the currently + selected file. (KP refers to Key Pad.) + + + + + + View Menu + The action in this submenu usually affects the current + &krusader; session. If you want to make permanent + changes use &konfigstartpg-lnk;. + + + + + + + &Alt;&Shift; + D + + View + Detailed View + + + + Shows the file names, file size, creation date and time and their attributes. + + + + + + + + &Alt;&Shift; + B + + View + Brief View + + + + Shows only the file names. + + + + + + + &Ctrl; + . + + View + Show Hidden Files + + + + Toggles the option to display the hidden files in + the &krusader; panels. + + + + + + + &Shift; + F10 + + View + All Files + + + + Turns off all filters and display all files. + + + + + + + &Shift; + F12 + + View + Custom + + + + Allows you to install a custom filter on the + &krusader; panel. Only files that match the + filter pattern(s) and directories will be displayed. Do + not forget to deactivate the custom filter after use, or + some files may not be visible. + + + + + + View + Select Remote Charset + + + + Selects the remote charset for + &remote-connections-lnk;. + + + + + + + &Ctrl; + R + + View + Reload + + + + Refreshes the contents of the active panel. + + + + + + Go Menu + + + + + Go + Back + + + + Navigates to the previously viewed directory in the + active panel. + + + + + + + &Ctrl; + PageUp + + Go + Up + + + + Navigates to the parent directory of the active + panel. + + + + + + + &Ctrl; + Backspace + + Go + Root + + + + Navigates to the root directory of the + system. + + + + + + + &Ctrl; + Home + + Go + Home + + + + Navigates to the home directory of the current + user. + + + + + + + &Ctrl; + Z + + Go + Popular URLs + + + + Displays a listing of frequently viewed directories + from which you may navigate to one by double-clicking on + it. + + + + + + + + &Ctrl;&Shift; + J + + Go + Set Jump Back Point + + + + Sets the current directory as a "jump back" point. + To navigate to this directory quickly, select the "Jump + Back" command from the Go Menu. + + + + + + + &Ctrl; + J + + Go + Jump Back + + + + Returns to a previous "jump back" point. + + + + + + Useractions Menu + + + + + Useractions + Manage useractions + + + + Opens the &useractions-lnk; + manager. + + + + + + Useractions + Your own Useractions + + + + Opens the default user actions and those + created by the user. + + + + + + Useractions + Equal panel-size + + + + Sets the ratio between the two panels to + 50/50. + + + + + + + + Win + 1 + + + Useractions + Sort By Name + + + + When this action is turned on, the main sorting key + in the &krusader; panel becomes the file + name. + + + + + + + + Win + 2 + + + Useractions + Sort By Extension + + + + When this action is turned on, the main sorting key + in the &krusader; panel becomes the file + extension (the part of the filename after the last '.'). + This is useful for grouping files of the same type closer + together. + + + + + + + + Win + 3 + + + Useractions + Sort By Size + + + + When this action is turned on, the main sorting key + in the &krusader; panel becomes the file size. + This is useful for determining the largest files in a + particular directory. + + + + + + + + Win + 4 + + + Useractions + Sort By Modified + + + + When this action is turned on, the main sorting key + in the &krusader; panel becomes the last + modified date for each file. This is useful for finding + files you recently worked on. + + + + + + Useractions + Edit as root + + + + Allows you to edit a file with kwrite using root + permissions. + + + + + + Useractions + Mount + + + + Mounts a new filesystem. + + + + + + Useractions + Enqueue in Amarok + + + + Appends selected item(s) to Amarok playlist. + + + + + + Useractions + Copy current item to + clipboard + + + + Copies selected item(s) to the clipboard. + + + + + + + + + &Shift;F5 + + + Useractions + Backup current + + + + Backups current file in current directory and asks the user for a new filename. + By default .old is appended to the original filename. + + + + + + +&krusader;-1.90.0 "Power Stone" additional Useractions + + + + + + Useractions + Copy as root + + + + Copy selected files & directories with root privileges, also inside archives! + Useraction contributed by + Andrew Svet and MaxiPunkt. + + + + + + + Useractions + Search and Replace in file + + + + This Useraction uses the &UNIX; standard-tool sed (the stream-editor) so perform + search and replace operations in all selected files + It is possible to give a regular expression for both strings. + Please note: The sed-command is "s/search/repleace/", so you have to escape the slash when you need it! + Useraction contributed by + Jonas Bähr. + + + + + + + Useractions + Unmount + + + + Umount selected directory. + Useraction contributed by + Stefan Endrullis. + + + + + + + Useractions + Eject cd/dvd + + + + Unmounts and ejects current cdrom/dvd. + + + + + + + Useractions + gzip current + + + + Gzip current file with maximum (9) compression, preserving original file. In case of directory, it is first tarred. + Useraction contributed by + Fathi Boudra. + + + + + + + Useractions + 7zip current file + + + + Make a 7zip archive containing current file to other panel. + Useraction contributed by + Václav Jůza. + + + + + + + Useractions + Lzma current file + + + + Lzma current file and keep input files to other panel. + + + + + + + Useractions + tar.gz current + + + + tar.gz current file/directory. + Václav Jůza. + + + + + + + Useractions + tar.lzma selected files + + + + tar.lzma selected files to other panel. + + + + + + + Useractions + Pack/Unpack ar archive (.a, .deb, ...) + + + + Make an archive or extract from it using the ar utility, which is + used for static libraries *.a or &debian; packages + You can extract &debian; packages this way without having dpkg installed. + Like tar, ar does not use any compression. + Useraction contributed by + Václav Jůza. + + + + + + + Useractions + tar.7z selected files + + + + tar.7z selected files to other panel. + + + + + + + Useractions + Unpack archive to dir + + + + Creates a directory with the current archive name in the other panel before unpacking + the files into it. It uses ark and tries to guess the directory name (archive name + without file extension). + Useraction contributed by + Dirk Eschler. + + + + + + + Useractions + Unpack current tar.7z + + + + Unpack current tar.7z to other panel. + + + + + + + Useractions + Unpack current tar.lzma + + + + Unpack current tar.lzma to other panel and keep original input file. + + + + + + + Useractions + Unpack current lzma + + + + Unpack current lzma to other panel and keep original input file. + + + + + + + Useractions + Unpack current lzma + + + + Unpack current lzma to other panel and keep original input file. + + + + + + + Useractions + Unpack multiple zip archives + + + + Unpack all selected zip archives into seperate directories. + Useraction contributed by + Ernest Beinrohr (OERNii), + and Jonas Bähr. + + + + + + + Useractions + Split large mp3 + + + + Splits large mp3's using mp3splt. + Useraction contributed by + Andrew Svet. + + + + + + + Useractions + Encrypt with kgpg + + + + Encrypts the current file with kpgp (which has to be in your $PATH). + Useraction contributed by + Dirk Eschler. + + + + + + + Useractions + Decrypt with kgpg + + + + Decrypts the current file with kpgp (which has to be in your $PATH). + Useraction contributed by + Dirk Eschler. + + + + + + + Useractions + Sign with kgpg + + + + Signs the current file with kpgp (which has to be in your $PATH). + Useraction contributed by + Dirk Eschler. + + + + + + + Useractions + Verify signature with kgpg + + + + Tries to verify the signature of the current file with kpgp (which has to be in your $PATH). + Useraction contributed by + Dirk Eschler. + + + + + + + Useractions + Decode current file created with uuencode. + + + + Decode a file created with uuencode. Requirements: Sharutils. + Useraction contributed by + Andrew Svet. + + + + + + + + Useractions + Uuencode current file. + + + + Uuencode creates an encoded ASCII copy of a file. Requirements: Sharutils. + Useraction contributed by + Andrew Svet. + + + + + + + + Useractions + Select from file + + + + A javascript useraction, TC-like "load selection from file". + Use this action on a text file which contains a list of filenames and these files will be selected. + Useraction contributed by + Dirk Eschler. + + + + + + + Useractions + Recode files using GNU recode or iconv + + + + A javascript useraction, which converts either file names or their content or both from one + to another character encoding. It processes all selected files and directories in the active panel + (for the directories, recurse their content). You can select, whether a recoded copy is created or + if the file is moved (there is no warranty, so don't test move on any important data) + Requirements: You need krusader compiled with javascript support and GNU recode installed. + Useraction contributed by + Václav Jůza. + + + + + + + Useractions + Mount as root + + + + A javascript useraction, Mounts a device with root-privileges. + Requirements: You need krusader compiled with javascript support. + Useraction contributed by + Jonas Bähr. + + + + + + + Useractions + Calculator + + + + A javascript useraction, a simple calculator. + Requirements: You need krusader compiled with javascript support. + Useraction contributed by + Jonas Bähr. + + + + + + + + + Tools Menu + + + + + + &Ctrl; + S + + Tools + Search + + + + Opens + KruSearcher - the + Krusader search module. + + + + + + + + &Ctrl;&Shift; + L + + Tools + Locate + + + + Opens the &locate-lnk; for fast file + searching. + + + + + + + &Ctrl; + Y + + Tools + Synchronize Directories + + + + The &syncdirs-lnk; function compares the + left and right panels and shows the differences between + them. After the compare function, you can move + files/directories so that they can be + synchronized. + + + + + + + &Alt; + / + + Tools + MountMan + + + + Opens + MountMan - the + Mount-Manager. + + + + + + + &Alt; + D + + Tools + Disk Usage + + + + Opens &diskusage-lnk;. + + + + + + + &Ctrl; + N + + Tools + New Net Connection + + + + Opens the + New Network + Connectiondialog to start a &FTP;, SMB, + FISH or SFTP connection to a remote host. If you leave + the user name and password fields empty, you will login as + anonymous. You can + Bookmark these remote + sessions. + + + + + + + + &Shift;&Ctrl; + F + + Tools + Disconnect From Net + + + + Ends the + remote + connection in the active panel and returns to the + start-up path. + + + + + + + Tools + Start Terminal + + + + Opens a terminal window in the default directory + (usually your home directory). You can choose your + favorite terminal application in the + &konfiggereral-lnk;. + + + + + + + + F2 + + + Tools + Start Terminal Here + + + + Opens a terminal window in the currently browsed + directory of the active panel. You can choose your + favorite terminal application in the + &konfiggereral-lnk;. + + + + + + + + &Alt; + K + + Tools + Start Root Mode Krusader + + + + Starts &krusader; in + &rootmode-lnk; at the same location. + + Be careful when using &krusader; with + ROOT PRIVILEGES. + + + + + + + + + + &Alt;&Ctrl; + J + + Tools + Javascript Console + + + + Opens the + Javascript + Console. + + + + + + + + + + + + + + + + + + + + + + + + + Settings Menu + + + + + View + Show Toolbar + + + + Shows the &main-toolbar-lnk; if + checked. + + + + + + View + Show Actions Toolbar + + + + Shows the &actions-toolbar-lnk; if + checked. + + + + + + View + Show Statusbar + + + + Shows the + Statusbar if + chosen. + + + + + + View + Hide Statusbar + + + + Hides the + Statusbar if + chosen. + + + + + + View + Show FN Keys bar + + + + Shows the &fnkeybar-lnk; if + checked. + + + + + + View + Show Command Line + + + + Shows the + Command Line if + checked. + + + + + + + + &Alt;&Ctrl; + T + + View + Show Terminal Emulator + + + + Show the + Terminal Emulator if + checked. + + + + + + Settings + Configure Shortcuts + + + + + Configure + Shortcuts + + Opens a dialog which allows you to configure the + &krusader; key bindings. + With the + Import shortcuts and + Export shortcuts buttons you can + load and save a Key-binding profile. This allows + &krusader; to have the &tcmd;, + &mc;, foo-commander, or your custom + Key-bindings. The only limitation is that global + &kde; key-bindings and some + &krusader; key-bindings can not be changed yet, + as well as some features in foo-commander that we either + do not have or need. The Key-bindings are stored in + $KDEDIR/share/apps/krusader, + foo.keymap.info contains a + description, + foo.keymap is an ini file that holds + the Key-bindings. Until &krusader;-1.70.1 this + was a binary file, &krusader; is backwards + compatible for importing this legacy binary format. If a + *.keymap.info text file exists, + &krusader; will display it, showing additional + information regarding the loaded Key-bindings file. Here + you have a chance to exit without importing the proposed + Key-bindings file. + + A &tcmd; Key-bindings file is + provided. Please + upload your favorite + Key-bindings schemes so that they become + available for the &krusader; community. + Thanks! + + + + + + + Settings + Configure Toolbars + + + + Opens a dialog which allows you to configure the + &main-toolbar-lnk; or the + &actions-toolbar-lnk;. You can add action + buttons of your favourite &useractions-lnk; to + the desired toolbar. + + + + + + Settings + Configure + &krusader; + + + + Opens + Konfigurator - the + &krusader; configuration center. + + + + + + Window Menu + + + + + + + &Alt;&Ctrl; + N + + Window + New Tab + + + + Opens a new tab in the active panel. + + + + + + + + &Alt;&Ctrl;&Shift; + N + + Window + Duplicate Current Tab + + + + Opens a new tab that is a duplicate of the active + tab in the active panel. + + + + + + + &Ctrl; + W + + Window + Close Current Tab + + + + Closes the current tab in the active panel. This + command is only available if there is more than one tab + in the active panel. + + + + + + + &Shift; + Right + + Window + Next Tab + + + + Navigates to the next tab in the active panel. This + command is only available if there is more than one tab + in the active panel. + + + + + + + &Shift; + Left + + Window + Previous Tab + + + + Navigates to the previous tab in the active panel. + This command is only available if there is more than one + tab in the active panel. + + + + + + + &Alt; + L + + Window + Profiles + + + + Opens a menu where + Panel profiles can + be saved and restored. + + + + + + + &Ctrl; + U + + Window + Swap Panels + + + + The left panel will become the right panel and vice + versa, only the current tabs will be swapped. + + + + + + + + &Ctrl;&Shift; + U + + Window + Swap Sides + + + + The complete left panel will become the right panel + and vice versa, and all tabs will be swapped. + + + + + + + + &Alt;&Ctrl; + r + + Window + Vertical Mode + + + + Toggles the &list-panel-lnk; between + horizontal and vertical mode. + + + + + + + &Ctrl; + F + + Window + Toggle Fullwidget Terminal + Emulator + + + + Toggles full screen mode of the terminal editor. + This option is only available when "Show Terminal + Emulator" is activated. + + + + + + Window + Save Position + + + + Saves the current size and position of the + &krusader; main window. This action can be + automated with + "Save settings on exit" in + &konfigstartpg-lnk; + + + + + + Help Menu + + + + + Help + Krusader Handbook + + + + Opens the &kde; Help system starting at + the &krusader; help pages (this + document). + + + + + + + &Shift; + F1 + + Help + What's This? + + + + The &whatsthis-url; help function + changes the mouse cursor to a combination arrow and + question mark. Clicking on items within + &krusader; will open a help window (if one + exists for that particular item) explaining the item + function. Use this feature if you want to know more about + a specific item. A right-click on an item will also open + the &whatsthis-url; help. + + + + + + + Help + Report Bug + + + + Opens the bug report dialog for sending bug reports + via mail. + + + If you have bugs to report please do not + use &kde;'s bugzilla http://bugs.kde.org/, + &kde;'s Bug Tracking System. We use + Sourceforge.net for reporting and managing our + &faqbugreports-lnk;. + + + Wishes, patches, and comments are always + welcome. + + + + + + + Help + About Krusader + + + + Displays version, author, and license + information. + + + + + + Help + About KDE + + + + Displays the &kde; version and basic + information. + + + + + diff --git a/doc/en/compare.docbook b/doc/en/compare.docbook new file mode 100644 index 0000000..7b9774c --- /dev/null +++ b/doc/en/compare.docbook @@ -0,0 +1,89 @@ + + Compare + &krusader; contains several compare functions: + Compare by content, + Compare Directories and the + Synchronizer compare + function. + + Compare by Content + + Compare + Content + + Select one file in each panel and use + + + File + Compare by content + + . &krusader; will open an external + graphical difference tool that is + configured. + &kompare;, &kdiff3-url; and + &xxdiff-url; are supported. + + + Compare Directories + + Compare + Directories + + Compare the files of each panel by using + + + Edit + Compare Directories + + . By default newer and single files will be selected + in each panel, this behaviour can be changed in the + Compare Setup menu. + + The files are not compared by content but by their + names and dates only. + + + + + + Edit + Compare Setup + + + + Configures the + Compare + Directories function. + + + + Select Newer and + Single (default) + + + + Select Single + + + + + Select Newer + + + + + Select Different and + Single + + + + + Select Different + + + + + + + + diff --git a/doc/en/configuration-files.docbook b/doc/en/configuration-files.docbook new file mode 100644 index 0000000..9b94149 --- /dev/null +++ b/doc/en/configuration-files.docbook @@ -0,0 +1,165 @@ + + + Configuration files + + Configuration files + + This appendix gives an overview of the configuration files + used by &krusader;. + + krusaderui.rc + + This file stores the users toolbar settings and the menu + structure. Tip: read also the + krusaderui.rc + &FAQ;. + Location: + $KDEDIR/share/apps/krusader/krusaderui.rc or + + ~/.kde/share/apps/krusader/krusaderui.rc + + krusaderrc + + This file stores the &krusader; + configuration. + Location: + ~/.kde/share/config/krusaderrc + The following settings are ⪚ stored: + + + Actions Toolbar + + + Archives + + + Colors + + + Dependencies + + + DiskUsage + + + DiskUsageViewer + + + General + + + HTML Settings + + + KFileDialog + + + KFileDialog Speedbar + + + KrDetailedViewLeft + + + KrDetailedViewRight + + + KrViewerWindow + + + KrViewerWindow Toolbar extraToolBar + + + Look&Feel + + + Notification Messages + + + Panel Profiles + + + Private + + + Protocols + + + Search + + + Startup + + + Synchronize + + + Locate + + + SynchronizerProfile - 1 + + + + krbookmarks.xml + + This file stores the &krusader; bookmarks and + uses the &xbel-url; standard. + Location: + + ~/.kde/share/apps/krusader/krbookmarks.xml + + useractions.xml + + This file stores the &useractions-lnk; + configuration. The file structure is documented in + doxygen-headers of UserActionXML. + Location: + + ~/.kde/share/apps/krusader/useractions.xml + + useraction-examples.xml + + This is the default User-Actions provided by us. The + file-structure is documented in doxygen-headers of + UserActionXML. + Location: + + $KDEDIR/share/apps/krusader/useraction-examples.xml + + foo.keymap + + Is an ini file that holds a + Key-binding profile. + Until &krusader;-1.70.0 this was a binary file. + &krusader; is backwards compatible for importing this + legacy binary format. + Location: + + $KDEDIR/share/apps/krusader/foo.keymap + + foo.color + + This is a binary file that holds the + Color Scheme. + Location: + $KDEDIR/share/apps/krusader/foo.color + diff --git a/doc/en/credits.docbook b/doc/en/credits.docbook new file mode 100644 index 0000000..6cd627a --- /dev/null +++ b/doc/en/credits.docbook @@ -0,0 +1,310 @@ + + + Credits and License + + Credits + + + License + + + &krusader; + + Program copyright 2000-2003 Shie Erlich and Rafi Yanai, + 2004-2008 &krusader; Krew + krusader@users.sourceforge.net + &krusader; is developed by a dedicated team of + individuals, known as the &krusader; Krew. + + + Shie Erlich, author + erlich@users.sourceforge.net + + + Rafi Yanai, author + yanai@users.sourceforge.net + + + Dirk Eschler, webmaster & i18n + coordinator + deschler@users.sourceforge.net + + + Csaba Karai, developer + ckarai@users.sourceforge.net + + + Heiner Eichmann, developer + h.eichmann@gmx.de + + + Jonas Bähr, developer + jonas.baehr@web.de + + + Frank Schoolmeesters, Documentation & + Marketing coordinator + frank_schoolmeesters@yahoo.com + + + Richard Holt, Documentation & Proofing + richard.holt@gmail.com + + + Matej Urbančič, + Marketing & Product Research + matej.urban@gmail.com + + The project is written using + KDevelopand + &Qt; Designer. + We would especially like to thank Dirk Eschler the + &krusader; web master. If you visit the + &kruwebsite-url; you'll appreciate the hard work and + effort that Dirk has put into the site as much as we do. + Contributors: We would like to thank all the + &krusader; users who submitted bugs, wishes and + patches. Sorry we can't mention all of you. + Donations: We would like to thank the following + organisations and individuals for their recent financial + + support. In addition we would to thank those who have + contributed + + anonymously. Your support is very much appreciated. + + + + + distroWatch.com (donation) + + + Sven Opitz (the first donation ever !) + + + Christian Bock (webspace) + + + Special thanks to: + + + &sourceforge-net-url;, webhosting + services + + + Jiri Klement, &kde;4 porting help + + + &kde-files-url; & + &kde-apps-url; creator Frank Karlitschek + + + &openusability-url; + + + Google.com + + + &krusader; &MacOS;-X port with the &fink-url;-project: Jonas Bähr, &bodo-tasche-url;, + Alexander K. Hansen + Catalin Hritcu + + + Technical Communication team of 2007, University of Oulu, Finland; + Documentation for &krusader; 1.80.0 + + + Václav Jůza, QA, + bug-hunting, patches and general help + + + Jiří + Paleček, QA, bug-hunting, patches and + general help + + + Andrew Neupokoev (nwmod) &krusader; Logo and + Icons, art contest winner. + + + Angel Ramos, &debian; package + maintainer + + + Terry "Fudoki" Wilkinson, handbook proofreader + + + Gábor Lehel (illissius), Viewer + module for the 3rd Hand Panel + + + Szombathelyi György, ISO KIO + slave + + + David Harel, panel toolbar buttons + + + Jan Willem van de Meent (Adios), &krusader; + icons + + + + usefularts.org, + &krusader; icons + + + Hans Loffler, directory history list + + + Jan Halasa, new bookmark module + + + Mikolaj Machowski, Usability and QA + + + Cristi Dumitrescu, QA, bug-hunting, patches and general + help + + + Aurelien Gateau, patch for KViewer + + + Milan Brabec, the first patch ever ! + + + Thanks to the Documentation translators: + + + Russian: Roman Batejkin + + + Thanks to the GUI translators: + + + Bosnian: Asim Husanovic + + + Brazilian Portuguese: Doutor Zero + + + Bulgarian: Milen Ivanov + + + Catalan: Rafael Munoz Rodriguez, Quim Perez + Noguer + + + Chinese: Jinghua Luo + + + Czech: Martin Sixta, Václav + Jůza + + + Danish: Anders Bruun Olsen, Christian Sonne, Peter + H.S. + + + Dutch: Frank Schoolmeesters + + + French: René-Pierre Lehmann, David + Guillerm + + + German: Christoph Thielecke, Dirk Eschler + + + Greek: Spiros Georgaras + + + Hungarian: Kukk Zoltan, Arpad Biro, Karai Csaba + + + Italian: Giuseppe Bordoni + + + Japanese: UTUMI Hirosi, Hideki Kimura + + + Lithuanian: Dovydas Sankauskas + + + Polish: Marcin Szafran, Lukasz Janyst, Marcin Garski, + Pawel Salawa, Tomek Grzejszczyk + + + Portuguese: Bruno Queirós + + + Russian: Dmitry V. Chernyak, Denis Koryavov, Nick + Shaforostoff, Dmitry A. Bugay + + + Serbian: Sasa Tomic + + + Slovak: Zdenko Podobný + + + Slovenian: Matej + Urbančič + + + Spanish: Rafael Munoz Rodriguez, Alejandro Araiza + Alvarado, Alex Araiza + + + Swedish: Erik Johansson, Anders + Lindén, Peter Landgren + + + Turkish: Bekir Sonat + + + Ukrainian: Ivan Petrouchtchak + + And to all the other translators, we're sorry we + can't list all of your names here. Please take a look in the + headers of the + foo.po files to see + &i18n-credits-url;. + If your native language is not listed above and you would + like to translate &krusader; into your language, + please read the &i18n-page-url;. + For more credits, read the &changelog-url; file + online or in the Krusader sources. + Documentation Copyright 2000-2003 Shie Erlich and Rafi + Yanai. Copyright 2004-2008 &krusader; Krew + krusader@users.sourceforge.net. + + + This program is licensed under the terms of the + GNU General + Public License Version 2, June 1991. + + + This documentation is licensed under the terms of the + GNU Free + Documentation License. + diff --git a/doc/en/diskusage.docbook b/doc/en/diskusage.docbook new file mode 100644 index 0000000..a8868c4 --- /dev/null +++ b/doc/en/diskusage.docbook @@ -0,0 +1,120 @@ + + Disk Usage + + Disk Usage + + The Disk Usage is based on the code of + &filelight;. The Disk Usage shows you how your disk + space is being used by a graphical representation of your + file system. The following presentations are possible: + + + Line view + + + Detailed view + + + &filelight; view: as a set of concentric + segmented-rings + + Choose + + + Tools + Disk Usage + + or + &Alt; + d to start this feature in a separate + window, or open it inside the + &popup-panel-lnk;. + Disk Usage Keybindings, right click menu. + + + + Del: Delete + + + + &Ctrl; + e: Exclude + + + + &Shift; + Arrow Up: parent dir + + + + &Ctrl; + n: new search + + + + &Ctrl; + r: refresh + + + + &Ctrl; + i: include all + + + + &Shift; + Arrow Down: step into + + + View menu: + + + + &Ctrl; + l: Line view + + + + &Ctrl; + d: Detailed view + + + + &Ctrl; + f: Filelight view + + + + &Shift; + Arrow Right: Next view + + + + &Shift; + Arrow Left: Previous + view + + + + + + + diff --git a/doc/en/editors-note.docbook b/doc/en/editors-note.docbook new file mode 100644 index 0000000..cf550b9 --- /dev/null +++ b/doc/en/editors-note.docbook @@ -0,0 +1,73 @@ + + + Note from the Editors + + As you may notice, this handbook is written by various authors. + The draft explanation of new features is done by the developers on the + krusader-devel mailinglist, the editors add this information in this handbook. + We have taken much care in ensuring technical and vocabulary consistency. + The authors write in English even though it is not their native language; + therefore, you may notice strange sentence constructions. + Do not hesitate to let us know, if something is not clear to you. + + An open source project's greatest strength is derived from getting user + feedback. That's why we would love to hear what you have to say. + Documentation contributors are always welcome!, + since this is a time consuming task. + If you have ideas on how to improve the content, + if you would like to write about an undocumented &krusader; feature, or + if you have comments or suggestions about the &krusader; Handbook, please let us know. + You can contact us even if you find typos! + + The Handbook "revision" matches the &krusader; version number. + ⪚ "&krusader; Handbook revision 1.80.x" describes "&krusader; 1.80.x" + + Please read the &docchangelog-url; file online or in the &krusader; sources to find + out the latest changes in the &krusader; Handbook. + + For information about the &krusader; documentation project, + please contact the &krusader; documentation coordinator, Frank Schoolmeesters + frank_schoolmeesters@yahoo.com. + + +This handbook is available in several formats. + + + via the Help Menu when using &krusader; + + + the &onlinehandbook-url; + + + As documentation tarballs (HTML, TXT, RTF, PDF, XML-SOURCE), + download them from the &sfmirrors-url; + + +The most recent version of this handbook is available when using &krusader; from cvs +or the &onlinehandbook-url;. + + +&dev-cvs-note; + +All mentioned Trademarks and Copyrights in this handbook belong to their respective owners. + + diff --git a/doc/en/faq.docbook b/doc/en/faq.docbook new file mode 100644 index 0000000..4051f9c --- /dev/null +++ b/doc/en/faq.docbook @@ -0,0 +1,1848 @@ + + + Frequently Asked Questions (&FAQ;) + + FAQ + + + If you have problems with &krusader; please + check the &install-proc-lnk;, as your problem may be + caused by a bad installation. + The &FAQ; is divided into three sections: + + + + Installation + &FAQ; (this page) + + + + Usage + &FAQ; (issues with running/using + &krusader;) + + + + General + &FAQ; (bug reports, forum, mailing list, + ...) + + If you feel that a &FAQ; is missing or + if something is not clear to you, please + let us know. + + Installation &FAQ; + + + + Does &krusader; need &kde; to + run? + + + + No, &krusader; does not need the + &kde; window manager to run on your + computer but &krusader;'s natural environment + is &kde;, because it relies on services + provided by the &kde; base libraries. Only + some shared libraries are needed ⪚ + &kde; libraries, &Qt; libraries, + &etc; This means that &krusader; + runs on &gnome-url;, + &afterstep-url;, &xfce-url; and + other window managers provided the approriate libraries + are installed on your computer. All this is not a problem + since the apt-get world can resolve these dependencies + instantly. + + + You do not need to switch to the &kde; + window manager to use &krusader;; you can + still use &gnome-url;, + &afterstep-url;, &xfce-url; or + another window manager. However, the configuration of the + &krusader; fonts and some behavior is done by + running + kcontrol. + + + A lot depends on what you want to do with + &krusader;. You should know that + &krusader; uses the &kde; + &kioslaves1-url; to access remote file + systems, and support for only a limited number of file + system types are shipped with &kdelibs-url;, + most of the &kioslaves2-url; are bundled with + &kdebase-url; (including fish, sftp and tar). + However, if you want the property-dialog to show + EXIF-data for .jpeg's, you need &kde;graphics. + If you want ID3-infos, you need + &kde;multimedia, and so on. + + + To summarize, if you want a working + &krusader; - install &kde;libs. If + you want a functional &krusader; then you need + &kde;libs + &kde;base. For maximum + functionality, &krusader; needs all of the + &kde; package libraries, but the + &kde; window manager is optional. + + + + + + + Which libraries does &krusader; need to + run? + + + For running &krusader; (⪚ + when you have installed &krusader; with a + binary RPM) you need less libraries than if you compile + &krusader; from source. ⪚ you + only need the C-compliler &gcc; when you + compile &krusader; from source (see the next + question). + Here is a list of the required shared libraries + when you run &krusader;: + + + + kdelibs (for the required &kde; + version see the &install-proc-lnk;) + + + libacl1 libart-2.0 libattr1 libaudio2 libc6 + libfam0 libfontconfig1 + + + libfreetype6 libgcc1 libgcc2 libice6 libidn11 + libjpeg62 libkjsembed1 + + + libkonq4 libpcre3 libpng12 libqt3-mt libsm6 + libstdc++6 libunwind7 libx11-6 + + + libxcursor1 libxext6 libxft2 libxi6 + libxinerama1 libxrandr2 libxrender1 libxt6 + zlib1g + + If you need more info please take a look + at the &deb-requirements-url; . + + + + + + + I have followed all the steps but + configurecomplains about missing libs + or headers. What do I need to do? + + + Install the missing packages. + Here is a list of the required packages to compile + &krusader; from source: + + + + gcc-cpp gcc-c++ glibc libgcc1 (other + compilers may work but haven't been tested) + + + autoconf automake XFree + + + libqt3 libqt-devel + + + kdelibs kdelibs-devel + + + libjpeg62 libjpeg-devel libpng3 + libmng1 + + + fam libfam-devel + + + zlib1 arts libart_lgpl2 libstdc++5 + libpcre0 + + + libkjsembed, if you use the + &javascript-console-lnk;, often found in + a package called KDEbindings(-devel) and + libkonq-dev for the &konqueror; + right-click menu entries. + + + + Most RPM-based distributions separate the headers + from the libs. The headers are needed to compile + &krusader;. Look for packages in the form + foo-devel-*.rpm (⪚ + kdelibs-devel-foo.i586.rpm) or + foo-dev-*.deb for &debian; based + distributions. These are usually included with your + distribution. + + If you ca not find the needed package, use + &rpmfind-url; and click 'missing lib or + header' in the search line. Or use + apt-cache search + foo to find the + corresponding package for &debian; based + distributions. + + + + + + + + How do I compile &krusader; when I'm + using a 64 bit processor ? + + + As far as we know, there are no issues. + &krusader; is also available on + + many other architectures. + + + + + + + I have downloaded the Source RPM + krusader-x.xx.dist.src.rpm, what to + do now? + + + + + + Check the ownership and the permissions on + + /usr/src/RPM/ and all recursive + directories that your normal user can + read-write-execute in these directories. + + + To produce the binary RPM for your computer, + do this: + $ rpm </path/to/rpmfile/> krusader-x.xx.dist.src.rpm + + + + If all + + dependencies are OK, a binary RPM + krusader-x.xx.dist.rpm will be + created at + + /usr/src/RPM/RPMS/i586 (replace i586 with + your architecture). + + + Test the binary RPM for errors before + installing: + $ rpm </path/to/rpmfile> krusader-x.xx.dist.rpm + If the prompt returns without any message, + then everything is OK. + + + Install the binary RPM as usual, for example: + $ su -c 'rpm </path/to/rpmfile> krusader-x.xx.dist.rpm' + You will be asked to enter your root + password. + + + Now you can + + start &krusader;. + + + + + + + For more information about RPM, visit + &rpm-org-url; and read the + &rpm-guide-url; by Eric + Foster-Johnson. + + + + + + + + I'm trying to install binary foo (RPM or DEB + package), but it fails. What's wrong? + + + Since we only prepare (and use) the source, we have + no way of knowing this. Did you test the binary RPM + before installing? + $ rpm </path/to/rpmfile> krusader-x.xx.dist.rpm + If the prompt returns without any message, then + everything is OK. RPM's downloaded from our website are + usually provided by &krusader; users. Visit + your distro website and search for an updated RPM. + If the RPM is not OK, try to find another package + at &Linux; software archives such as + &freshmeat-url; or &kde-apps-url;. + If you still can't find the appropriate package for your + &Linux; distribution, we recommend searching + for it with &rpmfind-url; or + &rpmpbone-url;. + In general, a package for an older version of your + distrubution or even for another distribution might work + on your computer (⪚ FC RPM's often work on + Mdk and RH, and vice versa), but it is always the best + that you install only RPM's that exactly match your + distribution. If you can't find a package that matches + your distribution version, architecture or distribution, + then use a source RPM. When you use a source RPM, the + Krusader sources will be built, on your computer, + guaranteeing a suitable binary RPM for your specific + distribution and architecture. In addition, this method + results in maximum system speed, since the resulting + binary is customized for your computer. Please read the + previous question, it explains how to install a source + RPM. The best solution is explained in the next + question. + + + + + + + I can't find an RPM or DEB package for + &krusader;, what to do? + + + Check if your distribution provides + &krusader;, if it doesn't then contact your + distribution creator and ask them to include + &krusader;! + Did you take a look at the &URL;'s on + the &install-proc-lnk; page? If you have and + found nothing, you can always compile + &krusader; from source. Even if you feel you + haven't got the necessary skills, you will probably + succeed in compiling &krusader;: we provide a + very detailed installation procedure. This HowTo enables + newcomers to compile &krusader; from source, + even if they have never done a compilation from source + before, just follow the instructions carefully. Feel free + to post a &help-request-lnk; if you encounter + problems. + + + + + + + I've installed &krusader;, but when I + start, only the + "Help" menu appears. Why? + + + In this case only the + Help menu is visible and all other menu + items like ⪚ + File and + Select are missing. This is because + some distributions put the + krusaderui.rc file in the wrong + directory. To solve the problem, just copy the + krusaderui.rc file from the package + + krusader_kde3/krusader/krusaderui.rc to + + $KDEDIR/share/apps/krusader/krusaderui.rc and + + ~/.kde/share/apps/krusader/krusaderui.rc and + re-run &krusader;. If you have compiled + &krusader; from sources this is often caused + if the &kdeqtdir-lnk; environment variables + are not correctly set. The result is that the + krusaderui.rc file is installed in + the wrong directory. Please read the following question, + as well. + + + + + + + Some new menu items are missing after updating + &krusader;, what's wrong? + + + The + krusaderui.rc file is stored in + + $KDEDIR/share/apps/krusader/krusaderui.rc. + When you change the + "Toolbar", &kde; makes a + copy of that file in the home directory at + + ~/.kde/share/apps/krusader/krusaderui.rc. If + Krusader was previously installed on your computer, and + you install a newer &krusader; version the + + ~/.kde/share/apps/krusader/krusaderui.rc file + must be replaced with the newer version. Note: this will + also reset all your changes on toolbars and + shortcuts! + The first line of + krusaderui.rc contains the version + number. After installing a newer &krusader; + version, &kde; will automatically replace the + old + + ~/.kde/share/apps/krusader/krusaderui.rc with + the newer version when starting the new + &krusader; for the first time + (&kde; will detect the newer version number in + the first line). + If you install a CVS or beta version and + &krusader; was already installed on your + computer then you should delete the + krusaderui.rc file from your home + directory to activate the new menu entries + $ + + rm + + + If the + + ~/.kde/share/apps/krusader/krusaderui.rc file + is older, then the new menu elements will not be shown. + Read the previous question for information on how to + update the + krusaderui.rc file. If + krusaderui.rc is missing or in a + wrong directory, only the + "Help" menu appears, please read the + previous question. + + + + + + + When I run + make, it complains about + libfam.la, what's wrong? + + + The + ./configure script does not check for + the presence of + libfam.la, and + make needs + libfam.la to compile + &krusader;. If you know how this can be + solved, please let us know. Install + libfam0-devel-foo.rpm. Note: when + you install &Mandrake;-&Linux; 9.2 + with the default settings, this package is not installed. + If you need more information take a look at + &missing-libs-lnk;. + + + + + + + &debian; complains about &Qt; + when running + ./configure, what's wrong? + + + This problem occurs when you use &gcc; + 2.95, you need to install &gcc; 3.2 (or + higher). You also need to set the enviroment variables + "CC, CPP and CXX" before running the + ./configure script. + $ export CC=/usr/bin/gcc-3.2 + $ export CXX=/usr/bin/g++-3.2 + $ export CPP=/usr/bin/cpp-3.2 + + For more information please take a look + &debian-qt-a-url; and at the + &debian-qt-b-url; on how to build a + &Qt;/&kde;3 application on + &debian;. + + + + + + + I have a + libGLcore.so.1 compile error after + using the &nvidia; installer, what to + do? + + + This problem occurs when you use the + &nvidia; installer and not the official + &nvidia; packages of your distribution. + &krusader; is based on &Qt; which + can be linked against the X OpenGL libraries. As a result + &krusader; may look for OpenGL as well. The + problem is that the &nvidia; installer (prior + to version 7xxx) doesn't perform it's task properly: it + replaces the OpenGL header files (which get included into + &krusader;) but doesn't set the libGL links + correctly. The best solution is to use the + &nvidia; packages provided by your distributor + or a new &nvidia; installer, the current + version at the moment of writing is 7114. If, for some + reason, you must use an old &nvidia; driver, + one solution is the following hack, the exact commands + depend on the distribution used and the version of the + &nvidia; driver (6111 in this example), but it + should read something like this: + $ ln -s libGLcore.so.1.0.6111 libGLcore.so.0 + $ ln -s libGLcore.so.1.0.6111 libGLcore.so + $ ln -s libGLcore.so.1.0.6111 libGLcore.so.1.0.0 + $ ln -s libGLcore.so.1.0.6111 libGLcore.so.0.0.0 + $ ln -s libGLcore.so.1.0.6111 libGL.so + $ ln -s libGLcore.so.1.0.6111 libGL.so.0 + $ ln -s libGLcore.so.1.0.6111 libGL.so.0.0.0 + $ ln -s libGLcore.so.1.0.6111 libGL.so.1 + $ ln -s libGLcore.so.1.0.6111 libGL.so.1.0.0 + $ ln -s /usr/lib/libGLU.la /usr/X11R6/lib/libGLU.la + + + + + + + + Why &krusader;-1.60.x does not compile + with gcc4? + + + Because &krusader;-1.60.x was not gcc4 + compatible, it first needs some patches: + + + add 'class ListPanelFunc;' in + krusader/Panel/listpanel.h + + + add 'class KMountManGUI;' in + krusader/MountMan/kmountman.h + + + add 'class KrDetailedViewItem;' in + krusader/Panel/krdetailedview.h + + More information can be found in our + + forum. + + + + + + + I am having trouble compiling and installing + &krusader;, how do I send a help + request? + + + Please read our detailed + installation + procedure and the &faq-lnk;. If you + can't find a solution to your problem then feel free to + post a + help request at our + &krusader; forum or use the + &kruusers-url; mailing list. But before + posting a help request, please try the following: + + + Use the &kruforumsearch-url; + function on the &forum-lnk;, your problem + might be solved or discussed already. + + + If you can't find a solution, please make a + note of the following issues: + + + the &krusader; version + used + + + the &Linux; distribution + + version used + + + a good description of the problem + + Without this information, it is very + difficult for us to help you. + + If you give us the error messages + (⪚ + make error messages) please start + with the FIRST error message, all the error + messages which follow the first error message are + consequences and not the cause of your + problem. + + + + Send out your help request. + + + Thank you for your co-operation! + + + + + + + How can I build an RPM package for + &krusader;? + + + If you have experience with compiling from source, + you will probably be able to build a + &krusader; RPM too. Information about RPM can + be found at &rpm-org-url; and in the + &rpm-guide-url; by Eric Foster-Johnson. The + following is the short procedure howto on building an + RPM. + + NEVER build RPMs when logged in as root. Mistakes + in building packages (⪚ a bad + krusader.spec file) can do serious + damage to your system when logged in as root. + + + + + Compile &krusader; from source to + check that the compilation works fine. + + + Check the ownership and the permissions on + + /usr/src/RPM/ and all recursive + directories that your normal user can + read-write-execute in these directories. + + + Copy + kusader-1.xx.tar.gz to + + /usr/scr/RPM/SOURCE + + + Copy + kusader.spec to + + /usr/scr/RPM/SPECS Tip: the latest + kusader.spec can be found in + CVS. + + + Edit + kusader.spec and add your name, + your e-mail address, the rpm name, ... Other + changes may be needed if + rpmbuild fails. + + + Build the binary and the source RPM with: + $ rpmbuild /usr/scr/RPM/SPECS/krusader.spec + If everything went OK you will have a + binary RPM in + + /usr/src/RPM/RPMS/i586 (depending on your + architecture) and a source RPM in + + /usr/src/RPM/SRPMS/ ⪚ + + krusader-1.70-beta1.suse10.i586.rpm and + + krusader-1.70-beta1.suse10.src.rpm + + + If the build is not OK you will receive an + error message during the rpmbuild process, try to + fix it and run + rpmbuild again. + + + And finally: + test the RPM + before sending it in. + + + + + + + + + + Why does &krusader;-cvs show an old + version number in the about box? + + + Because we only change the version number just + before we do a new release. &krusader;-cvs + will show an older version number, so ignore the version + number and check the download date. We simply haven't yet + decided what the next version number will be. + + + + + + + + Usage &FAQ; + + + + &krusader; keeps crashing, why? + + + We've been receiving a lot of emails and bug + reports (December 2005) regarding random crashes, + especially during file operations such as copy, move, + etc. + These crashes are related to + &Qt; 3.3.5 and NOT + &krusader;. It seems that + &Qt; 3.3.5 introduced a serious bug which is + currently (December 2005) causing random crashes in many + &kde; applications including + &konqueror;. You can use Google to find out + more. As far as we know, &debian;-Sid and + &SuSE; already posted new &Qt; + binaries that fix the problem, and &gentoo; + has masked &Qt; 3.3.5 completely. As for now, + you either need &Qt; 3.3.4 or a fixed + &Qt; 3.3.5 or a higer version, depending on + your distribution. More information is available on our + + website. + + + + + + + When I try to mount/unmount my cdrom/floppy, + &krusader; reports something about a + supermount, what's this about? + + + Supermount is a daemon which handles the + mounting/unmounting of removable filesystems for you. + Just insert a floppy, and do + + cd + + supermount will do the mount for you + automatically and transparently. Usually this works fine. + However, supermount misleads the system into thinking + that the + floppy/cdrom is mounted at all times! + This creates some problems for &krusader;, as + it cannot really know when the floppy or CD has been + removed because the system information is not correctly + updated by supermount - is there really a + floppy in the + drive? Of course, this can be + solved, but as for now, we don't consider it a + priority. + + + + + + + Why does &krusader; freeze or hang on a + dead mountpoint? + + + When &krusader; is ⪚ + browsing an NFS share and the NFS server goes down, + &krusader; will freeze. This + &krusader; (and all other open internal + viewers/editors) freeze is fatal, and can only be + corrected with the + kill -9. We have no solution for this. + This is an issue not confined to file managers, or even + the &Linux; OS! The problem is that you "hang" + on the first access to the dead share - so there is no + way around it, no check to avoid it, even + ls will freeze. Just trying to read + something - anything - is enough to get you stuck. The + one and only way around this architectural problem is + using a multi-threaded design - this way if we get stuck, + we don't hang the entire application event loop, but we + don't think that the time is right for adding threads, we + are not sure that *all* the &kde; systems out + there are using &Qt;-mt (the multi threaded + version of the &Qt; library), and the Krusader + Krew may not be the right people to address this major + issue in any case; so currently this is just a bug we + have to learn to live with. + + + + + + + When I try to resize &krusader; to make + it smaller, I discover that I can't resize it below a + certain size. Why? + + + See the + F1, F2 (&etc;) buttons? + They are not allowing &krusader; to downsize + as they have a minimum size. Just disable them + + View + Show FN Keys Bar + + and you'll be able to resize + &krusader; to your liking. Since version 1.51 + we have improved this greatly: when downsizing the + buttons will look like 'F5 ..py'. When the button faces + are too small to read a tooltip will give the complete + text. The minimum width is 45 pixels for each + button. + + + + + + + When I perform some file operations, + &krusader;'s panel doesn't refresh / I'm using + &krusader; with fam installed, but updates to + the panel are not shown. Why? + + + The bad news is that we're not sure why, but it + seems that + fam (file alteration monitor) sometimes + refuses to work. We are looking into this problem to make + sure it is not + our problem. We've tried the same + source code on two different Gentoo installations: one + worked, the other did not. The good news is that if you + disable + fam, &krusader; + will automatically revert to its internal update + mechanism (which is less efficient, but works) without + needing to recompile. You can disable + fam with: + $ su -c 'fam -l' + Look at the manpages for more information about + fam. + + + + + + + + + Samba ISO 8859-x codepage / + What to do if &krusader; does not read shared + directories containing special international + characters? + + + &krusader; does not handle (yet) + Samba ISO 8859-x codepages, if + you use a codepage different than 8859-1 you will have to + do a manual configuration. Create or modify the file: + ~/.smb/smb.conf + [global] + workgroup = MyWorkGroup (ex. WORKGROUP) + client code page = MyCodePage (ex. 852) + character set = MyCharSet (ex. ISO8859-2) + + Unfortunately + kcontrol (&kde; + 3.1.1) fails to configure smb.conf properly, so this must + be done manually with a text editor. + + + + + + + + &krusader; reports "krarc:... protocol + not supported" error at opening an archive file, what to + do? + + + Install the krarc slave properly: + Copy the + kio_krarc.so, + kio_krarc.la files into + + $KDEDIR/lib/kde3 + Copy the + krarc.protocol file into + + $KDEDIR/share/services + or the directory where the KIO slaves are placed in + your &Linux; distribution. + + + + + + + I get the error message "Protocol not supported by + Krusader: "krarc:/path/to/foo-archive", when I try to + open foo-Archive, what to do? + + + The icons, kio_slaves and documentation must be + installed in the correct places in the &kde; + directory tree. The + kio_krarc.* files must be in the same + directory with the other KIO slaves. Try this: locate + kio_tar.* and copy/link the + kio_krarc.* files to the same + location. Don't forget to run + # ldconfig on this directory when + you're done. For more information click + + here. + + + + + + + + What todo if an extenal tool doesn't seem to work? + + + Krusader uses several programs as external tools, + and sometimes they appear not to work. + + Open a terminal and check if tool foo is installed. + $ foo + + Check if tool foo is properly configured in the &konfigdependencie-lnk;. + + For Archiving tools: autodetect the archives again with the Auto Configure button + in the Konfigurator archive page. + + Check the &konfigprotocol-lnk; + + If it doesn't work, backup your ~/.kde/share/config/krusaderrc configuration file and remove it from this location, + Restart Krusader, Krusader will now start the first start configuration wizard, follow these guidelines. + + + + + + + + + Howto executing jar files (and not enter the jar archive)? + + + Go to the &konfigprotocol-lnk; and remove application/x-jar + from the krarc node, &krusader; should no longer enter the archive. + Global file associations are handled by &kde; and not by &krusader;. + To assosiate the jar extension: + + + Open &kde;s control center: kcontrol + + + + + + KDE Components + File Associations + + + + + Enter jar as filename pattern + + + + Add java as application + + + + + + + + + + + + Why do I have trouble with my &FTP; + connection? + + + This problem often occurs when you are behind a + firewall or proxy. Open + + KDE Control Center + Network + Preferences + , + "Enable Passive Mode (PASV)" has to + be turned on or off, depending on it's current setting. + Now try your &FTP; session again to see if it + works. Also, make sure you have no other &FTP; + sessions open (using web browsers, etc.), they can cause + complications. More information can be found in + &active-passive-ftp-url;. + + + + + + + + I get + "FTP protocol not supported by + &krusader;" error when trying to + open a remote &FTP; directory, what to + do? + + + The reason for this error is that '&FTP; + via &HTTP; proxy' feature is not yet supported + by &krusader;. This error may be caused by a + misconfiguration of the proxy settings in + &kcontrolcenter;. Modify the proxy settings to + not use &HTTP; proxy and &FTP; will + work. + + + + + + + + How don't add ".part" suffix when copying files via ftp? + + + When uploading files a .part suffix is added to the filename, + once the upload is complete the filename is renamed automagically + to remove the .part suffix. + This works great but sometimes some ftp-servers don't allow a rename operation. + You can solve this by unchecking the checkbox + Mark partially uploaded files in &kde;'s control center. + The checkbox is located at + + Internet and Network + Connection Preferences + . + + + + + + + How can I close a remote connection + (⪚ a FTP connection)? + + + It's explained in the + remote connections + chapter. + + + + + + + I am experiencing problems with the media:// + protocol, why? + + + At the moment of writing the media:// protocol is + instable, we need to wait until the &kde; team + corrects it, every other protocol works properly with + &krusader;, only media fails. More information + regarding this issue is available in + + our forum. + + + + + + + + How can I disable the default sounds, + ⪚ when I do a delete action ? + + + Those are the default &kde; System + sounds, and not related to &krusader;. If you + want to disable them globally open your &kde; + &kcontrolcenter; ( + kcontrol): + + KDE Control Center + Sound & + Multimedia + System Notifications + , + Event Source: "KDE System + Notifications" and uncheck sound items you + don't like. + + + + + + + Where is RemoteMan, the remote connection manager + ? + + + RemoteMan has been replaced by our Bookmark Manager + since Krusader 1.25-beta1. The Bookmark Manager handles + local files and + remote + &URL;'s the same way. RemoteMan was left + as a selection until &krusader;-1.51 to allow + an easier transition and give you a chance to move your + &bookmarks-lnk;. RemoteMan was disabled, as + announced, in &krusader;-1.60. + &URL; transition procedure: + + + install &krusader;-1.51 + + + open the RemoteMan and connect to an + &FTP; + + + once inside, bookmark the current location, + select a name and save. + + + do this for all your connections, all the + &bookmarks-lnk; are now stored in + krbookmarks.xml + + + install &krusader;-1.60, it will use + krbookmarks.xml or import it if + needed. + + + + + + + + + Why doesn't mimetype magic sometimes work inside + archives? + + + When you enter an archive and press + F3 to view a file that has no known + extension, ⪚ + README, INSTALL &etc;. And + if the viewer opens in hex-mode instead of the usual + mode, than you need to configure: + + KDE Control Center + KDE components + File Associations + Application + octet-stream + , + binary viewer needs to be + removed. + + + + + + + + Where is Konfigurator, do i need to install the &kde; Desktop Enviroment to use it? + + + Konfigurator is &krusader;s configuration module, + when you have installed &krusader; than you have also Konfigurator. + For some reason some people think it's an other &kde; application, but it is not, so + you don't need to install the &kde; Desktop Enviroment to use Konfigurator. + When runnig &krusader;, use + + Settings + Configure &krusader; + , and it will start + Konfigurator. + Please read the manual, &krusader; has many many configuration options, + a lot of things can be customized to your needs with Konfigurator. + + + + + + + + + How can I set the look & feel of 2 + different users to be the same? + + + Presuming that the current setup is the good + configuration, you can copy the configuration to the + other user. + # cp ~/.kde/share/config/krusaderrc /home/foo_user/.kde/share/config + And when the other user is Root use: + # cp ~/.kde/share/config/krusaderrc /root/.kde/share/config + + + + + + + + + Why doesn't "save last location" work? + + + Unfortunately the 1.70.x version contains a bug. + The tabs are not saved if a "Panels Save Settings=Tabs" + item is present in the configuration files. The fix is + easy: + + + open and edit + + ~/.kde/share/config/krusaderrc + + + remove the "Panels Save Settings" item + + and it'll work with the + <Last Session> feature in + Konfigurator. More info can be found in + + our forum. + + + + + + + + Why doesn't the handbook work? + + + This error will happen on &debian; (or + &debian; based) distro with the + krusader_1.51-1_i386.deb package. You will see the next + error message if you try to open the handbook: "The + requested help file could not be found. Check that you + have installed the documentation." To fix it go to + + /usr/share/doc/kde/HTML/en/krusader/, you will + see the + foo.docbook.gz files. Now, you need + to extract all these files with root privileges + ("File->Unpack" with &krusader;) + to create + foo.docbook files. Now the handbook + will work. This error is fixed in the + krusader_1.60.0-1_i386.deb package and higher + versions. + + + + + + + + + General &FAQ; + + + + How can I report a wish, a suggestion, or a + comment? + + + An open source project's greatest strength is + derived from getting user feedback. That is why we love + to hear what you have to say. Your "gripes" are our + instructions. After about 6 months, programmers can no + longer see their own mistakes. It's natural. We want the + ideas, qritiques, and feedback because we all want to + make &krusader; the best and most useful file + manager available anywhere. + The most convenient way to contact us is to use the + &forum-lnk;, or the krusader-users + &mailing-lists-url;. For information on what + remains to be done look at the + &todoforum-url;. Adding ToDo items into the + &todoforum-url; is for developers only, but + feel free to post to the &featureforum-url; + for things that aren't on the &todoforum-url;, + but should be. If you have a nice feature request, the + &krusader; Krew will add your request to the + &todoforum-url;. We review and discuss every + submission. For more information how the forum works + click + here. + + + + + + + How can I send a patch? + + + It's not easy to write patch guidelines, but here + are some. + + + Patches, new code or new features are always + welcome! + + + Focus only on one problem at a time, so the + developers can easily understand you, and commit your patch + it works. + + + Preferrably, you can start a discussion + with the developers on the krusader-devel + &mailing-lists-url; or on the + &forum-lnk;. Unfortunatly, we can't apply + a patch if the patch is in conflict with the "general + design" of the &krusader; code (read for more + instructions in this FAQ). + Please send only one change request per mail, so + that the discussion is easier to follow. The + modifications should be committed step by step, + checking each line. + + + + Submit your patch files into our &patch-tracker-url;, + so that all patch proposals stay organised and don't get lost, + tar.gz archives or diffs are usually ok. + Do not copy changes into a mail. Most mailers will change the + white spaces, so that the diff will not apply or the + code snipped does not diff. In the past, patch mails went lost or disorganized in many many mails, + so please use the &patch-tracker-url;, thanks! + + + + Use portable solutions, &krusader; + should run on: + + + All POSIX + (&Linux;/BSD/&UNIX;-like + OSes), &Solaris;. + + + All BSD Platforms + (&freebsd;/&netbsd;/&openbsd;/&MacOS;). + + + &kde; 3.3- &kde; + 3.5 and even on GNOME with + &kde;libs (for krusader-2.x &kde; 4) . + + + GCC 2.95 - GCC 4.1 + + Architecture changes are made by the + team only. + + + A final note: always keep in mind a patch might + be rejected. Either it has side effects, which we + could not fix or it contradicts with the idea behind + the patched module. In this sense, a software project + differs from, let's say a wiki: a software project + has to have someone to make all the final decisions. + Otherwise the software will not work. Furthermore: + keep in mind that the examination of patches might + take time, as we all have private lives. + + + + + + + + + How can I report a bug? + + + Bugs?!?!? Well, ok.... We have an online Bug + Tracking System. + Using the online bug-tracker helps us have a clear + and orderly way to know how many bugs are open, bug + priority and follow-ups. It saves us from browsing + through the entire &krusader; forum, searching + for yesterdays bug. Please use this system. + Before reporting a bug, please read the following: + + + Use the &forum-lnk;'s + &kruforumsearch-url; function , your bug + might be already solved . Please DO NOT post new bugs + to the &bugforum-url; (except if you are + not sure that you have found a bug). We use it for + bug discussions. + + + + Check if the bug is + already posted in the &online-buglist-url; + of the Bug Tracking System. + + + If you can't find this bug mentioned, please + submit it into the + bug tracker by clicking the + Submit New button in the + bug-tracker window. Please submit the following + issues: the &krusader; version used, the + &Linux; distribution + version used, + processor type, and as good a description of the + problem as you can manage. + + + Thank you for your co-operation! + + If possible, try to do the same operation with + &konqueror; or another &kde; + application. If you encounter the same problem then it + is possibly a &kioslaves1-url; or + &kde; (kdelibs) bug, and not a + &krusader; bug. &krusader; uses + the &kde; libraries and the + &kioslaves2-url; for many operations. In + some cases you can encounter problems if your + distribution is incorrectly configured, please test it + first as explained above. + + + + + + If you've got bugs to report please do not + use &kde;'s bugzilla http://bugs.kde.org/, + &kde;'s Bug Tracking System. Report + &krusader; bugs directly to us. + + + + + + + + + + How can i send good debug or crash reports? + + + Usually binary packages that are been used by your distribution do not contain debug information. + Since we usually only develop and fix &krusader;-cvs, compile &krusader;-cvs in debugmode and install it, than check if the bug still exist. + $ ./configure + + Install valgrind, a suite of tools for debugging and profiling &Linux; programs. + + Run Valgrind/&krusader; + $ valgrind {foo_path}/krusader + + The valgrind tool will write to stdout, what really happens. + If you could send these informations before the crash, it's almost sure, that we may fix or tell you what to do. + + + + + + + + What todo if the KDEcrashhandler sends no usefull backtrace information? + + + Usually binary packages that are been used by your distribution do not contain debug information. + Since we usually only develop and fix &krusader;-cvs, compile &krusader;-cvs in debugmode and install it, than check if the bug still exist. + $ ./configure + + If the KDEKrashhandler still doesn't provide usefull backtrace information, than sometimes a coredump will give better information. + Run Krusader, with disabled crashhandler. + $ krusader + + On a crash you will get a .core file, usually in your home directory. + + Run gdb, the GNU Project Debugger + + $ gdb corefile krusader + + Now type bt to get the backtrace and type q to quit gdb. + + Often the best debug results will be given when using the valgrint tool. + + + + + + + + Does &krusader; have a mailing + list? + + + Yes, currently we have 6 + &mailing-lists-url;. No spam, no bother, just + &krusader;. Feel free to subscribe and + unsubscribe. + Tip. our mailing lists can be browsed online or + read with a newsreader, so that you don't even need to + subscribe to follow the action on the mailing lists. + + + &krunews-url; is a very low volume + list, used for newsletters and announcements of new + versions or critical bugfixes. The news can also be + read online at &krulatestnews-url; and in + the &newsforum-url; which are basically + the same but displayed in another format. + + + &krudevel-url; is the developer + mailing list (read-only). If you want to follow the + development of &krusader; on the cutting + edge, this is the list to follow. + + + &kruusers-url; is the + &krusader; users mailing list. Here you + can ask for help and talk with the + &krusader; users and developers. + + + &krui18n-url; is the translations + mailing list. + + + &krudoc-url; is the documentation + mailing list. + + + &krucommits-url; (read-only): when + the &krusader; Krew commits code into CVS, + it will be reported in this mailing list. Want to + keep track? Waiting for a certain feature/bugfix? + Follow &krusader;'s development + here. + + + + + + + + + Does &krusader; provide + newsfeeds? + + + Yes, we do. Several newsfeeds in various formats + are available. &filereleasefeed-url;, + &forumfeed-url;, &krunewsfeed-url;, + &krudevelfeed-url; and even + + additional feeds by gmane.org. + &kruusersfeed-url;, + &krui18nfeed-url;, + &krudocfeed-url;. + + + + + + + Does &krusader; have an IRC + channel? + + + Yes, we do. Feel free to talk to the + &krusader; Krew and fellow-users via + &freenode-url; servers. The server is + irc.freenode.org, the channel is + #krusader. Everyone is + welcome. + + + + + + + How does the &krusader; forum + work? + + + In the spirit of freedom of speech, everything that + is &krusader; related can be discussed in our + forum. It does not matter if you are a newcomer or an + advanced user, everyone is welcome. An open source + project's greatest strength is derived from getting user + feedback. That is why we love to hear what you have to + say. With your feedback we can make &krusader; + better and better; otherwise, we are not aware of issues + and ideas you may have. But please remember the + following, so that we can maintain some order in the + chaos. + If the + Documentation, + &faq-lnk;, &kruforum-url; and + &krudevel-url; (please use the search function + ) can't help you, do not hesitate to post on our forum. + The &krusader; Krew or the + &krusader; community is always available to + help you. + Please use the &kruforumsearch-url; + function of the &kruforum-url;, your issue may + have been previously discussed (this allows us to + minimize the double/triple/... postings). If your issue + has already been discussed in the past there is a great + chance that you will have an instant solution to your + problem. If the issue is currently being discussed, you + can join in the discussion. Some questions are asked over + and over again, that's why we have created this + &faq-lnk;. This allows us to spend more time + developing &krusader;. + The &kruforum-url; is split into seven + sections: + + + &newsforum-url;: all the latest + news. + + + &newsletterforum-url;: all newsletters. + + + &bugforum-url;: discussions about + bugs, please DO NOT use the forum for + &faqbugreports-lnk; (except if you are + unsure if you have found a bug). + + + &featureforum-url;: discussions + about new features for future &krusader; + versions. + + + &todoforum-url; here you will find + the list of the planned features. Registered users + will be able to VOTE and COMMENT on the TODO items. + Here you get the chance to push your favourite + features (+3) and still prefer certain features over + others (+1), if you don't care about a feature just + simply don't vote on that feature. Unregistered users + may only browse the &todoforum-url;. The + &todoranking-url; contains the results + based on the votes. + Adding ToDo items or + removing ToDo items which have been implemented will + be done by the &krusader; Krew. + + + &useractionsforum-url;: discussions + about &useractions-lnk;. Posting your own + User Actions is greatly appreciated. We plan to + include the best ones in the next + &krusader; releases. + + + &krugenforum-url;: everything that + is &krusader; related and doesn't belong + in the other forums. + + + Thank you for your co-operation! + We provide RSS feeds for our forums. You don't have + to check for new posts all the time, instead the news + will come to you! To make use of them, simply point your + RSS aggregator to &rss-url;. + + + + + + + How can I translate &krusader; into my + native language? + + + Please read the &i18n-page-url;. It's + not difficult to translate! Most anyone can do it, it + just takes some time. + + + + + + + How can I support &krusader;? + + + You can + + support &krusader; in many different + ways. Please send us + feedback, + &faqbugreports-lnk;, patches, + donations, + translations, ... + + + + + + + Is there a &MacOS; X port? + + + Yes, there is &MacOS; X port, but you + will not have the all the power you would have on + &Linux;. Please read the + &MacOS; X port + section for more information. A recommended native + file manager for &MacOS; is + &disk-order-url; (shareware). + + + + + + + Is there a &Windows; port? + + + No, but this might change in the future. Please + help us with this + project, contributions are greatly appreciated. A + recommended native file manager for &Windows; + is &tcmd-url; (shareware). + + + + + + + Why is &konqueror; in "midnight + commander style" not an + OFM? + + + The two panels and a commandline are available, all + the other stuff like + OFM features and the + OFM interaction with the + user is missing from this profile. + + + + + + + Why should I use an + OFM? + + + An &ofm-url; is much faster than a one + panel filemanager and faster than the command line. If + you would like to know + + how &krusader; feels, there is only + one way to discover: install it on your computer and use + it for a while. If you prefer to waste time and lose + productivity, continue to use one panel filemanagers + which are based on &Windows; Explorer. Matej + Urbančič has written + a + + blogon why + OFM is better than a one + panel filemanager. + + + + + + + + diff --git a/doc/en/features.docbook b/doc/en/features.docbook new file mode 100644 index 0000000..6170c87 --- /dev/null +++ b/doc/en/features.docbook @@ -0,0 +1,515 @@ + +Features + + Features + + + The most important features and improvements are + highlighted here, it would make this list too long if we were to + include + all the features and improvements. You will + discover even more features in this documentation and in the + &changelog-url; file. + + + + + + + &ofm-url; features + + Two powerful and easy to use + OFM panels. + + + &cmdline-lnk; and optional + &termemu-lnk; below. + + + Strong + + keyboardorientation and the ability to perform + all functions without the mouse. + + + Context-dependent invocation of scripts and + programs ⪚ mouseclick/enter (execute or + open with the associated application), F3 (view) and F4 + (edit). + + + &usermenu-lnk;, create your own + customized menu. + + + History ⪚ + Folder History, + Popular + &URL;s, ... + + + &vfs-lnk; for ⪚ + &remote-connections-lnk;, + &archives-lnk;, search results, + synchronizer. + + + Powerful internal + viewer and editor via + kparts supporting almost every file format. + + + &advanced-search-module-lnk; : + searching in archives and search content on remote + file systems. + + + Several Panel view modes via the + &popup-panel-lnk;. + + + + + + + + &krusader; tools + + &remote-connections-lnk; : + &FTP;/SAMBA with SFTP/SCP support via + &kioslaves1-url; + + + &locate-lnk; + + + &syncdirs-lnk; + + + + Mount-Manager + + + + &diskusage-lnk; + + + &rootmode-lnk; + + + + + + + + &krusader; features + + Archive Handling: browsing, unpack, pack, + testing. Supported &archives-lnk; : ace, + arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip and + 7-zip. + + + + Checksum + creation-verification mechanism that supports + md5, sha1, sha256, sha224, sha256, sha384, sha512, + tiger, whirlpool, cfv and crc. + + + + Calculate occupied + space of files and folders, archives and remote + filesystems. + + + + Directory + comparison and + filtering. + + + + Compare files by + content via external diff programs like + &kompare;, &kdiff3-url; or + &xxdiff-url;. + + + + Rename files and + folders via &krename-url; + + + Completely supports drag'n'drop: drag from + &konqueror; straight into a .tar.gz file, + from &krusader;'s panel into the trash-bin, + the desktop or into &konqueror; + + + + Preserve date for + local targets at copy/move operations. + + + F2 opens a + Terminal Window in the + default directory. + + + Easy editing of + file permissions and + ownership and + Numeric + permissions. + + + + Selection + filters used in ⪚ Synchronizer and + KruSearcher. + + + + Jump-Back + + + + + + mimetype-aware. + + + + Tabbed panels and + Tabbed + Editor/Viewer. + + + &quick-search-lnk; + + + + File splitter + + + + + Mouse Gestures + + + + + Quick Navigation in + the Location Toolbar. + + + &whatsthis-url; Help function in favour + of tooltips where reasonable. + + + &sync-browsing-lnk; + + + + + + + + Customize &krusader; to your own + needs + + + + Konfigurator &krusader;'s + configuration center. + + + &main-toolbar-lnk;, + Actions + Toolbar for user actions and bookmarks. + + + + Key-bindings + + + + + Colors + + + + &panel-profiles-lnk; + + + &bookmark-manager-lnk; + + + &mouse-selection-modes-lnk; + + + Many more features can be + configured the way you + like. + + + + + + + + &krusader; Extensions + + &useractions-lnk; + + + &javascript-console-lnk; + + + &color-profiles-lnk; + + + &keybindigs-profiles-lnk; + + Download and upload your favourite + &krusader; extensions at + &kde-files-url;. + + + + + + New features in the &krusader;-1.80.0 "Final 3rd Stone" + release + + Archive improvements + + + + Password support for: arj, + ace, rar and zip. Passwords can be stored in + &kwallet; + + + + 7-zip support, by + external applications 7z and 7za. + + + + Auto-detection support, + allowing you to open "hidden archives" (⪚ + &openoffice; documents). + + + Packing/unpacking is now in the background. + + + + + Brief View + + + Many improvements of the UserAction &useractions-lnk; system. + + + Countless usability enhancements, especially in Konfigurator and the heavily reordered menubar. + + + + Media button + + + + Copy/Move: + preserve all attributes (time, + owner, group). + + + + Dim the colors of the inactive + panel. + + + Renaming a filename without extension, single instance + mode, start to system tray, check this out in + Konfigurator + + + Configurable + Atomic extensions, + so that extensions like tar.gz are shown as one part in the Ext Column. + + + + Context menu for bookmarks and enable/disable special + bookmarks. + + + Restyled + MenuBar + + + &termemu-lnk; enhancements bringing new functions, new usages and new look. + + + &synchronizer-lnk; enhancements and parallel threads for slow + FTP servers. + + + + Single instance mode, + start to system + tray + + + + Context menu for permanent + bookmarks. + + + + Full support for + ACL permissions permissions, like properties, preserve attributes, synchronizer and other. + + + Searcher-results, Locate-results, Synchronizer-results: support for dragging items and copy to clipboard (CTRL+C). + + + Many bug fixes. + + + + + + + New features in the &krusader;-1.90.0 "Power Stone" + (The final version for KDE3.x) +Basically &krusader;-1.90.0 = &krusader;-1.80.0 + bugfixes + + Krusader Extensions sended in by our users. + + + + + Improvements: + + GCC 4.3 compatibility. + + + &kde; 3.2 - &kde; 3.5 compatibility. + + + bugfixes. + + + + + + + + + Many &krusader; Extensions: + + Keymaps, use keybindings of other commanders or customized keybindings! + + + Colormaps, use colors of other commanders or customized colors ! + + + Useractions, create actions for your own needs ! Click here for and overview. + + + Javascript useractions, create actions with additional javascript power for your own needs ! + + + + + + + Krusader Extensions highlights: + + Color schemes: + + &tcmd; + + + Dos Navigator + + + Midnight Commander + + + bash + + + + + Keymap: + + Midnight Commander + + + + + Useractions: + + Search and Replace in file + + + Split large mp3 files + + + Archive foo to dir + + + lzma and tar.lzma archive support + + + tar.7z archive support + + + ar (.a, .deb,...) archive support + + + Unpack multiple zip archives + + + kgpg: encrypt, decrypt, sign, verify signature + + + .uue file support (uuencode and uudecode) + + + + + + + + + Javascript useractions: + + Recode files using iconv or GNU recode. + + + Mount as root. + + + Select from file. + + + Calculator. + + + + + + + Check the &changelog-url; for a complete overview of changes. + + + + + + +&dev-cvs-note; diff --git a/doc/en/glossary.docbook b/doc/en/glossary.docbook new file mode 100644 index 0000000..70b889f --- /dev/null +++ b/doc/en/glossary.docbook @@ -0,0 +1,355 @@ + + + + Glossary + + This chapter is intended to explain the various words which + have been used throughout the &krusader; + documentation. If you believe some acronyms or terms are missing, + please do not hesitate to contact the &krusader; + documentation team. + Thanks to + wikipedia.org the + free encyclopedia that anyone can edit. + + + ACL + + + + + Access Control List; a concept in computer security + used to enforce privilege separation. It is a means of + determining the appropriate access rights to a given object + depending on certain aspects of the process that is making + the request. + + + + + BSD + + + + Berkeley + Software Distribution; refers to any of several free + &UNIX;-compatible operating systems, derived from + BSD&UNIX;. + + + + + CVS + + + + + Concurrent Versions System; an important component of + Source Configuration Management (SCM). By using it, + developers can record the history of source files and + documents. + + + + + DEB + + + This is a binary file format that is used by + + &debian; and &debian;-based + distributions. It is a suffix of a installation file + specifically built for these distributions; e.g. + krusader_1.70.1-1_amd64.deb. Simply + described it is a special archive containing all the + program files and their proposed location on the + system. + + + + + DCOP + + + + Desktop + Communication Protocol; the interprocess + communication protocol used by &kde; desktop + environment. It enables various &kde; applications + to communicate with each other. + + + + + FAQ + + + + Frequently Asked Questions; a + document where questions that arise many times are answered. + If you have a question to the developers of + &krusader;, you should always have a look at the + &faq-lnk; first. + + + + &FTP; + + + + File Transfer Protocol; it is an Internet protocol + that allows you to retrieve files from so-called + &FTP; servers. + + + + + GPL + + + + GNU General + Public License; a software license created by the + Free Software + Foundation defining the terms for releasing free + software. + + + + &GUI; + + + + Graphical User Interface. + + + + + ISO + + + An + ISO + image (.iso) is an informal term for a disk image of + an ISO 9660 file system. More loosely, it refers to any + optical disk image, even a UDF image. + + + + &kde; + + + K Desktop + Environment; a project to develop a free graphical + desktop environment for &UNIX; compatible + systems. + + + + Key Binding + + All features of &krusader; are available + through the menubar, but you can also bind (link) a certain + key combination to that function. You will find, however, + that using the + keyboard is remakably + faster than using the menubar or + GUI. + Keyboard usage is an + important tool for + Orthodox File Managers. + &krusader; comes with several predefined + &keybindigs-lnk;. + + + + Kpart + + + + Kpart; KParts is the name of the component framework + for the &kde; desktop environment. KParts are + analogous to Bonobo components in &gnome-url;, + both of which are based on the same concepts as + &Microsoft;'s Object Linking and Embedding. e.g. + if you use &krusader;'s viewer to view a PDF file, + KPDF wil be launched inside &krusader;'s + viewer. + + + + + KIO or kioslave + + + KDE + Input/Output; also known as + &kioslaves1-url; is part of the &kde; + architecture. It provides access to files, web sites and + other resources through a single consistent API. + + + + mount + + + + Mouting; in computer science, is the process of + making a file system ready for use by the operating system, + typically by reading certain index data structures from + storage into memory ahead of time. The term recalls a period + in the history of computing when an operator had to mount a + magnetic tape or hard disk on a spindle before using + it. + + + + + OFM + + + + + Orthodox File Manager; also known as "Commanders". + Members of this family of file managers use simple yet very + powerful interface that is a direct derivative of the + + Norton Commander (NC) interface. + + + + RPM + + This is the binary file format for distributions based + on the + RPM Package Manager, + a widely used packaging tool for the &Linux; + operating system. If you still have to get + &krusader; and your system supports RPM packages, + you should get &krusader; packages ending in + .rpm. + + + + + SSH, Secure Shell + + + SSH; + is a set of standards and an associated network protocol that allows + establishing a secure channel between a local and a remote computer. + + + + + SVN, Subversion + + + + Subversion; a version control system that is a + compelling replacement for + CVS. It is used by many + software projects including &kde; and + &krusader;. + + + + Terminal emulator + + + + Terminal emulator; simply a windowed shell; this is + known as command line window in some other environments. If + you want to use the shell and type the commands, you should + know at least a few of the system-level commands for your + operating system. + + + + + POSIX + + + + "Portable + Operating System Interface for uniX"; a collective + name of a family of related standards specified by the IEEE + to define the application programming interface (API) for + software compatible with variants of the &UNIX; + operating system. + + + + + &URL; + + + + Universal + Resource Locater; a universal resource locater is the + technical term for what is commonly referred to as a websites + address. Examples of URLs include + + http://krusader.sourceforge.net and + &remote-connections-lnk;. + + + + + VFS + + + &vfs-lnk; is a basic + OFM feature, this an + abstracted layer over all kinds of archived information (ZIP + files, FTP servers, TAR archives, NFS filesystems, SAMBA + shares, ISO cd/dvd images, RPM catalogs, etc.), which allows + the user to access all the information in these divergent + types of file systems transparently - just like entering an + ordinary sub-directory! &krusader; supports + several &vfs-lnk;. + + + + XML + + + Extensible + Markup Language; a very flexible text format derived + from SGML (ISO 8879). Originally designed to meet the + challenges of large-scale electronic publishing, XML is also + playing an increasingly important role in the exchange of a + wide variety of data on the Web and elsewhere. + + + + Zeroconf + + + Zeroconf; + or Zero Configuration Networking is a set of techniques that automatically + create a usable IP network without configuration or special servers. + This allows inexpert users to connect computers, networked printers, + and other items together and expect them to work automatically. + + + diff --git a/doc/en/help.docbook b/doc/en/help.docbook new file mode 100644 index 0000000..a3b6ee4 --- /dev/null +++ b/doc/en/help.docbook @@ -0,0 +1,158 @@ + + + Help &krusader; + + Help + + Here is your opportunity to &contribute-url; to + the &krusader; project. There are things that need to + be done, but can't be done by us. If you feel you can help, do not + hesitate to contact us; every OpenSource can use some help. + Please also check the &contribute-url; page on our + website for more recent information. Thanks! + + Documentation + + Help is needed (we are looking for documentation writers) + for keeping the &krusader; documentation up to date. + The draft explanation of new features is done by the developers + on the krusader-devel mailing list, but we need editors to add + this information in the handbook. By playing with the new + features these editors can give valuable information to the + developers for making the new features even better! + + &krusader; + Extensions + + Please upload your favourite extensions at + &kde-files-url;, so that they become available for the + &krusader; community. Maybe they will be shipped by + default with &krusader; at the next release :-)) It + features + + Keymaps, + + Colormaps, + + User Actions, + + JavaScript Extensions. + User Actions can be discussed in our + &useractionsforum-url;, please join! + + Spread the Word + &krusader; + + If you like &krusader;, + let + people know! Write articles and reviews for internet or + print publications. Encourage your friends to give + &krusader; a try. Participate in forums to help others + in the community. + + GUI Translations + + &krusader; is available in many languages, but + usually several translations do need an update and translations + to new languages are always welcome, please read the + &i18n-page-url; . Even when there is already a + translator for your native language, it is always helpful to have + a second or third translator ⪚ for proofreading. + Sometimes the regular translator is not available when a + translation update is needed (studies, holiday...). Please + contact the translator/s for your native language; your help will + be appreciated. Any translation (even partial translations) are + accepted by the &krusader;-Krew at any time (feature + freeze or not). + + Documentation Translations + + This documentation is translatable, if you are interested + in translating this documentation please contact Frank. + + OpenUsability + + Using a program, understanding its interface and getting + information out of it, is something that should always be clear + in every application - no matter how advanced your understanding + of operating systems is or how deep your computer literacy is. + For that reason &krusader; asked to be included in the + &openusability-url; project. + This project joins the software developers and usability + experts in an attempt to check all parts of a user interface for + the inappropriate entries. Its main goal is making user + interfaces and dialogs understandable and friendly to every user. + We need our users comments, your comments, to make things better. + In case you find a part of the program's interface to be too + complicated, please do help us correct it and make it + better. + + Donations + + Actually, we hadn't considered donations, until users asked + us for a way to &donate-url; to the project. + &krusader; is, and always will be free, in all the + terms of the GNU Public License. + + Packagers + + We are always in need of packagers for different distro + rpm's, deb's, etc. All help is welcome. + + Users' feedback for the + &krusader; &MacOS; X port + + There is a &macosx-port-url; + with the help of &fink-url; , the port is + maintained by + Catalin Hritcu, + all feedback is welcome. + + Porting &krusader; to + &Windows; + + &krusader; is written using &Qt; as + well as &kde;libs. As long as &kde;libs + does not run on &Windows;, porting + &krusader; is not an option. However, we do believe + that once &Qt;4-GPL is released, efforts will be made + to port &kde;libs to &Windows;, and if that + happens, we're in business and then we need a maintainer for + porting &krusader; to &Windows;. + + FAQ + + If you have a question that is missing in the + &faq-lnk;, we would like to hear it. + + Others + + + Feedback, + Bug reports, patches, + &etc; are always welcome! An open source project's + greatest strength is derived from getting user feedback. + On some websites like &freshmeat-url; or + &kde-apps-url; you can give a rate, if you like + &krusader; go to one of these sites and rate + &krusader;, thanks. + diff --git a/doc/en/index.docbook b/doc/en/index.docbook new file mode 100644 index 0000000..146f1ba --- /dev/null +++ b/doc/en/index.docbook @@ -0,0 +1,594 @@ + + + + + + + + + + + + + + +Backspace"> + + + + + + +Online Handbook'> +&krusader; Screenshots'> +mail'> + +Krusader website'> +here'> +contribute'> +Donate'> + +&krusader; Forum'> +Search'> +General Discussion Forum'> +News and Announcements Forum'> +NewsLetter Forum'> +Bug Discussion Forum'> +New Features Discussion/Requests Forum'> +ToDo Forum'> +ToDo ranking system'> +UserActions Forum'> +here'> +&krusader;'s Cutting Edge page'> +Active &FTP; vs. Passive &FTP;, a Definitive Explanation'> + +ViewCVS'> +Sourceforge mirrors'> +ChangeLog'> +CVSNEWS'> +Documentation ChangeLog'> +i18n page'> + +requirements on &debian;'> +mailing lists'> +&krusader;-news'> +latest news'> + +&krusader;-commits'> +&krusader;-devel'> +&krusader;-users'> +&krusader;-doc'> +&krusader;-i18n'> + +rss-forumfeed'> +rss-filerelease feed'> +krusader-news feed'> +krusader-devel feed'> +krusader-users feed'> +krusader-i18n feed'> +krusader-doc feed'> + +online bug list'> +Patch Tracker'> +more translator credits'> + + +Subversion'> +Browse the Subversion Repository'> + +Filesystem Hierarchy Standard (FHS)'> + + +&krusader; downloadpage'> +&gentoo; Live Ebuild'> + +&gentoo;'> +&SuSE;'> +&mandriva;'> +&freebsd;'> +&debian;'> +&netbsd;'> +&yoper;'> +&MacOS;-X port'> +&ubuntu;/&kubuntu;'> +&linspire;'> +&archlinux;'> +&frugalware-linux;'> +&pclinuxos;'> +&altlinux;'> +&ccuxlinux;'> +&lunarlinux;'> +&qilinux;'> +&rocklinux;'> + +klik protocol'> +klik://krusader'> +klik://krusader-latest'> +klik://krusader-cvs'> +available'> +stable &krusader;'> +cvs snapshot of &krusader;'> + + +&fedora; Extras'> +Distrowatch.com'> + +dag.wieers.com'> +Dries Verachtert RPM Repository'> +Portpkg'> +&krusader; SlackBuild'> + +freshmeat.net'> +rpmfind'> +rpmpbone'> +rpmseek'> + +kde-files.org'> + + +xxdiff'> +Kdiff3'> +Krename'> +Kasablanca'> +Kftpgrabber'> +XBEL standard'> +KDE-APPS.org'> +rpm.org'> +RPM Guide'> +KIOSlaves'> +KIOSlaves'> +KIOipod-slave'> +&kde;libs'> +&kde;base'> +GNOME'> +AfterStep'> +XFce'> + +in our forum'> +instructions'> +freenode.org'> +fink'> +KJSEmbed'> + +Orthodox File Manager (OFM)'> +Disk Order'> +&apple; X11'> +&apple; X11 SDK'> +Bodo Tasche'> + +Sourceforge.net'> +OpenUsability.org'> + +WhatsThis'> + + + + +Context Menu'> +Virtual file systems (VFS)'> +Mouse Selection Modes'> +Konfigurator Startup page'> +Konfigurator Look & Feel page'> +Konfigurator General page'> +Konfigurator Dependencies page'> +Konfigurator Protocol page'> +View menu'> +Edit menu'> +Compare Directories'> +FN Keys Bar'> +Main Toolbar'> +Actions Toolbar'> +Statusbar'> +Location Toolbar'> +Root mode'> +Settings menu'> +Key-Bindings'> +Key-binding Profiles'> +Color Profiles'> +Synchronizer'> +Synchronize Directories'> +Split file'> +Combine files'> +KDEDIR - QTDIR'> +UserActions'> +User Menu'> +FAQ'> +&krusader; Forum'> +help request'> +List Panel'> +PopUp Panel'> +Quick search'> +Locate &GUI; frontend'> +Folder tabs'> +MountMan'> +Command Line'> +Terminal emulator'> +&FAQ; missing libs or headers'> +Panel profiles'> +Sync-browsing'> +Disk Usage'> +Bookmarks'> +Bookmark-Manager'> +Advanced Search module'> +JavaScript console'> +archives'> +Remote Connections'> +krusaderrc'> + +Installation procedure'> +This feature is temporarily disabled and will be rewritten, sorry.'> +bug reports'> +Bug reports.'> +This is a new feature that can be considered as "beta". &hesbugreport-lnk; + User feedback is always welcome!'> +This is a new feature under development. Some descriptions may become obsolete if functionality changes during development. &hesbugreport-lnk; + User feedback is always welcome!'> +This module was rewritten. Some descriptions may become obsolete if + functionality changes during development. &hesbugreport-lnk; + User feedback is always welcome!'> +If you install a CVS or beta version and if &krusader; was previously + installed on your computer, then you should delete the krusaderui.rc file + in your home directory to activate the new menu entries + $ rm + , click here for more info.'> + +&GNU; General Public License (GPL)'> + + + If you are using a development or + CVS version, it is possible that the latest + new features are not yet in the "The Krusader Handbook". + Please read the &changelog-url; file online or in the &krusader; + sources to find out more about the new features. + For a brief description, please read the &cvsnews-url; file online + or in the &krusader; sources. + User feedback and + Bug reports are always welcome! + '> + + + +Folder Tabs'> +Right-click'> + + + +Midnight Commander'> +xxdiff'> +Krename'> +kget'> +Filelight'> +Kdevelop'> +KeditBookmarks'> +Kwallet"> + + +Fedora'> +Yoper'> +OpenLX'> +Apple ipod'> + + +FreeBSD'> +Debian'> +Mandriva'> +Gentoo'> +Mepis'> +Ubuntu'> +Kubuntu'> +Linspire'> +Xandros'> +Slackware'> +Ark Linux'> +Arch Linux'> +NetBSD'> +OpenBSD'> +Knoppix'> +Frugalware Linux'> +PCLinuxOS'> +altlinux'> +Source Mage'> +Kanotix'> +Lunar Linux'> +CCux Linux'> +QiLinux'> +ROCK Linux'> + +NVIDIA'> +Norton Commander'> +OpenOffice'> +Firefox'> +Safari'> +Apple'> + + +FreeBSD'> +Total Commander'> +&tcmd;'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + The Krusader Handbook + + + + + + + Frank + Schoolmeesters + Documentation and Marketing + coordinator + +
+ frank_schoolmeesters@yahoo.com +
+
+
+ + Richard + Holt + Documentation and Proofing + +
+ richard.holt@gmail.com +
+
+
+ + Matej + + Urbančič + Marketing and Product + Research + +
+ matej.urban@gmail.com +
+
+
+ + Shie + Erlich + Author and initial Handbook author + +
+ erlich@users.sourceforge.net +
+
+
+ + Rafi + Yanai + Author and initial Handbook author + +
+ yanai@users.sourceforge.net +
+
+
+ + Dirk + Eschler + Webmaster and i18n + coordinator + +
+ deschler@users.sourceforge.net +
+
+
+ + Csaba + Karai + Developer + +
+ ckarai@users.sourceforge.net +
+
+
+ + Heiner + Eichmann + Developer + +
+ h.eichmann@gmx.de +
+
+
+ + Jonas + Bähr + Developer + +
+ jonas.baehr@web.de +
+
+
+
+ + 2000 + 2001 + 2002 + 2003 + Rafi Yanai + Shie Erlich + + + 2004 + 2005 + 2006 + 2007 + 2008 + Krusader Krew + + + Permission is granted to copy, distribute and/or modify + this document under the terms of the + GNU Free + Documentation License, Version 1.1 or any later + version published by the Free Software Foundation; with no + Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + &krusader; sources. + + 2008-03-06 + 1.90.0 "Power Stone" + + &krusader; is an advanced, twin-panel + (commander-style) file-manager for KDE, and other desktops in + the *nix world + + + KDE + krusader + commander + filemanager + twinpanel + linux + file + manager + dual pane + linux-commander + kde-commander + +
+ + &help; + &editors-note; + + + &introduction; + &features; + &installation; + &user-interface; + &using-krusader; + &more; + &commands; + &keyboard; + &mouse; + &krusader-tools; + + + &konfigurator; + &faq; + &credits; + + + &configuration-files; + &useraction-xml; + &release-overview; + + + &glossary; + + + &documentation.index; +
diff --git a/doc/en/installation.docbook b/doc/en/installation.docbook new file mode 100644 index 0000000..4bd186b --- /dev/null +++ b/doc/en/installation.docbook @@ -0,0 +1,1250 @@ + + + Installation on KDE3.x + + Installation + + + Requirements + In order to successfully use the most recent + &krusader;, you need &kde;libs + >= 3.4 + Required &kde; version: + + + &krusader; v1.01: &kde; + 2 + + + &krusader; v1.02 - 1.40: &kde; + 3.0 - &kde; 3.2 + + + &krusader; 1.40: prefers &kde; + 3.2 (otherwise all features will not be available) + + + &krusader; v1.50 - v1.51: &kde; + 3.2 - &kde; 3.3 (Konfigurator crash on + &kde; 3.4) + + + &krusader; v1.60.0 - v1.70.0: + &kde; 3.3 - &kde; 3.5 + + + &krusader; 1.70.x: prefers + &kde; >= 3.4 (otherwise all + features will not be available) + + + &krusader; 1.80.0: &kde; 3.4 - + &kde; 3.5 + + + &krusader; v2.xx.x: &kde; 4 - + &Qt; 4 The big challenge, a first release in + 2008 + + + NOTE: there are no installation instructions for &kde;4 yet available since at moment of writing &krusader; + was not ported yet to &kde;4. + Platforms: + + + All POSIX + (&Linux;/BSD/&UNIX;-like OSes), + &Solaris; + + + All BSD Platforms + (&freebsd;/&netbsd;/&openbsd;/&MacOS;) + + + &krusader; uses about 3-4 Mbyte of memory to + run and about 15 Mbyte of shared memory, which is also used by + other processes, but this may vary depending on your platform + and configuration. In order to handle archives the archivers + must be configured + here. + A package of popular (un)packers, &krusader; + itself and add-ons can be found on the + &krudownload-url;. + For more requirements, see below. Have a look at the + &faq-lnk; section as well. + + + Obtaining &krusader; + The latest information about &krusader; can be + found on the &kruwebsite-url; . + + &krusader; Downloads + it is recommended to use the &krusader; package + that is provided by your distribution. + &distrowatch-com-url; is a great resource to check + the availability. If your distribution does not offer + &krusader;, please contact the creators of your + distribution and ask them to provide a &krusader; + package + The latest version, as well as the older versions, can + be found on the &krudownload-url; and on the + &sfmirrors-url;. It contains the source tarballs, + RPM and DEB packages to whatever distro the + &krusader;-Krew is using and packages build by + &krusader; users and third parties. + Distributions who provide &krusader;: + + + &suse-download-url; >= + 9.3, Note: please use &krusader;-1.60.0 + instead of &krusader;-1.51 (might be unstable + on &SuSE;9.3-&kde;3.4). + + + &fedora; via + &fedora-extras-url; + # yum install krusader will do the job, + thanks to Marcin Garski. &RedHat; RPM packages + can usually found on the &krudownload-url; or + at &dag-wiers-download-url; and + &dries-verachtert-download-url; . + + + &debian-download-url;, on our + &krudownload-url; you might find more recent + DEB packages. Note: usually &debian; packages + work also on distributions that are "based on + &debian;", and some of these provide their own + (incompatible) packages. + &ubuntu-kubuntu-download-url;, + &linspire-download-url;, &knoppix; + 4.x DVD, &kanotix;, etc. + + + &mandriva-download-url; via the contrib + repository + # urpmi krusader will do the job, + &gentoo-download-url;, + &yoper-download-url;. + + + &archlinux-download-url;, + &frugalware-linux-download-url;, + &pclinuxos-download-url;, + &altlinux-download-url;. + + + &freebsd-download-url;, the port is + maintained by + Heiner Eichmann. + + + &netbsd-download-url;, + &lunarlinux-download-url; + ,&arklinux;, &openlx;, + &sourcemage;. + + + Even more distributions can be found with + &distrowatch-com-url;. + + Use the installation tools included in your + distro to install the &krusader; package. You + might need an internet connection if &krusader; is + not included on the &CD; or DVD. There are + probably other distributions which include + &krusader;. If you know of one, please send + feedback so that we can include it on the distrolist. + Others + + + &slackware; tgz binaries can usually be + found on the &krudownload-url;. You can also + use &portpkg-url; that contains a + &kru-slackbuild-url;, + # portpkg krusader will do the + job. + + + There is a &macosx-port-url; + with the help of &fink-url; , the port is + maintained by Catalin Hritcu. + + + Installation via the &klik-protocol-url; + + + &klik-krusader-url; downloads + &krusader; provided by &debian; + stable, more information is + &klik-available-url; . + + + &klik-krusader-latest-url; downloads the + latest &klik-stable-krusader-url; provided by + the &krusader; Krew. + + + &klik-krusader-cvs-url; downloads a + &klik-cvs-krusader-url; provided by the + &krusader; Krew. + + + Search engines + + + You can also find packages on &Linux; + software archives such as &freshmeat-url; or + &kde-apps-url; . + + + If you can notfind a package for your distribution, + we recommend searching for it with + &rpmfind-url;, &rpmpbone-url; or + &rpmseek-url;. + + If you enjoy using &krusader;, we + would appreciate it if you went to one of these sites and + rated it. + If you still can not find a package, follow the + installation procedure on how to compile + &krusader; from source. This very thorough HowTo + describes the process in such detail that even newcomers + should not have any problems. + + + Version Scheme + A new version scheme has been used since + &krusader;-1.60.0 + + + First digit - the major version + + + Second digit(s) - percentage of features completed + for this major version + + + Third digit(s) - bugfixes. + + In essence, releasing + &krusader;-1.60.0 means that we believe that + &krusader; is about 60% done with all the features + we had scheduled for the 1.x.x series. Series 2.x.x will be + &kde; 4.x releases. Hopefully, it is easy to + understand. + + + Stable Version + + krusader-x.xx.tar.gz + + + &krusader; is released under the + &gpl-lnk;. This means that THE PROGRAM IS + PROVIDED "AS IS" WITH NO WARRANTY OF ANY KIND, even when it + is marked as a stable release. + + + + Development Version (beta release) + + krusader-x.xx-betax.tar.gz + + Before every stable release we release at least one + development version in order to hunt down the bugs. + + These releases are beta releases and will probably + contain some bugs. + &dev-cvs-note; + The beta release has 3 goals: + + + Apply a feature-freeze until the stable is released, + only bugs will be fixed. New features have to wait until + the stable is released. + + + Obtain feedback from &krusader; users so + that we can fix the bugs. + + + Give translators time to update the translations for + the coming stable. Please read the + &i18n-page-url;. + + + + CVS Builds + + krusader-cvs-yyyymmdd.tar.gz + + + These builds are untested and come without any + warranty. They may contain bugfixes, new features, or even + new bugs. + + We provide daily snapshots of &krusader;'s + CVS version. For those who are interested, the + nightly tarball can be found + on the &krucutedge-url;. Depending on the stage of + development, this version will either be stable or unstable. + Just before a stable release, the CVS version is almost + stable. After a stable release new features will be committed + into CVS, which might lead to the appearance of bugs. In some + rare cases, the build will not even compile if we make a + mistake. In that case we try to fix the error as soon as + possible. + &krusader; provides 2 nightly snapshots: + + + + krusader-cvs-yyyymmdd.tar.gz: + make -f Makefile.cvs must be run before + the + ./configure script is available. + + + + krusader-cvs2-yyyymmdd.tar.gz: for + users who have problems with the + make -f Makefile.cvs command, we have + already done this for you and the + ./configure script is included in the + tarball. This tarball is a bit bigger than the first + one. + + + + check out from CVS. + &krusader; can be checked out through anonymous + (pserver) CVS with the following instruction set. The module + you wish to check out must be specified as the module name. + When prompted for a password for anonymous, press the + &Enter; key. + Currently, there are two module options: + + + krusader_kde2: the &kde;2 branch, stable + but it is basically v1.01 and there are no planned + changes + + + krusader_kde3: the &kde;3 branch that we + currently use + + + To check out &krusader; from CVS: + $ cvs + $ cvs + (note: updates from within the modules directory do + not need the -d parameter) + If you want to check out a specific version of + &krusader; from CVS (⪚ + &krusader;-1.60.0) : + $ cvs + + If you want to check out a specific date of + &krusader; from CVS (⪚ + &krusader;-2006-10-29) : + $ cvs + + Mostly being &gentoo; users, we provide a + &gentoo-life-ebuild-url; for all those who want to + stay on the bleeding edge of file management and do not want + to miss the advantages of portage. Please take a look at our + &krucutedge-url; for more installation + details. + We also provide &viewcvs-url; to browse the + CVS repository. + + + Subversion + &subversion-url; is used for + the &krusader; 2.x series for &kde;4. + it is also possible to + &browse-svn-repo-url;. + To check out the latest &krusader; 1.x for + &kde; 3 from SVN: (NOTE: at moment of writing use CVS for krusader_kde3, since krusader_kde3 + is developed in CVS and NOT in SVN, currently you will get an old version in SVN) + $ svn + To check out the latest &krusader; 2.x + for &kde; 4 from SVN: + $ svn + + + + Older Releases + If you are looking for older releases we recommend the + &sfmirrors-url;, available from our project + page. + + + + Compiling and Installing + + Compiling &krusader;. What now? + Check the environment variables + &kdeqtdir-lnk;. + To compile and install &krusader; on your + system, type the following in the base directory of the + &krusader; package: + + $ ./configure + $ make + $ su -c 'make + &krusaderui-rc-text; + Since &krusader; uses + autoconf and + automake you should have no trouble compiling + it. If you run into problems, read the detailed installation + instructions below. + + + +Quickstart Installation Tutorial + + +Debian +These instructions should work as well on &debian; based distributions like: +&ubuntu;, &kubuntu;, &linspire;, &kanotix;, ... + +Add the next lines in the ~/.bashrc configuration file + +export +export +export + + + +Install the build dependencies for &krusader; + +# apt-get + + + +Download the &krusader; sourcecode, unpack and +enter the krusader_kde3 directory. + + +The next command will create ./configure + +$ make -f + +NOTE: you might need to upgrade automake and/or autoconf, if an error message appears. + + +Install &krusader; in the /opt directory to not overwrite the official &debian; binary /usr/bin/krusader, +so that krusader will run the official &debian; package and /opt/bin/krusader runs the compiled version. +It's recommended to use enable the full debug, so that you can possible problems at us. Run configure. + +$ ./configure + + + +Compile &krusader; + +$ make + + + +Install Krusader + +$ su -c + + + +/opt/bin/krusader runs the compiled &krusader; version. + + + +SuSE +Install the build dependencies for &krusader; +Download the &krusader; sourcecode, unpack and +enter the krusader_kde3 directory. Now you can compile and install &krusader; + +$ make -f +$ ./configure +$ make +$ su -c + + + + + +For other Linuxes +Ofcource it's impossible to cover all Linuxes, but here are the general installation instructions. + +Usually ./configure --prefix=/usr should be used, though options like +/opt/krusader are usually better so that you don't overwrite files that +are installed by your package managment system. +Please don't use the /usr/local directory as it simply won't work. +Install the build dependencies for &krusader; +Download the &krusader; sourcecode, unpack and enter the krusader_kde3 directory. Now you can compile and install &krusader; + +$ make -f +$ ./configure +$ make +$ su -c + + + + + + + + Detailed Installation Tutorial + The next section will explain how to install + &krusader; step by step. Questions about the + installation process have been asked many times and + especially users new to &Linux; often have + problems compiling software from source. Therefore, we are + trying to keep the explanations as detailed as possible even + if they are mostly not &krusader; specific. + Experienced users may easily skip most of the steps. + Unfortunately, because not all &Linux; + distributions follow the &fhs-url; it is impossible + to write a tutorial that would cover all circumstances. + However, these guidelines will help you in the right + direction. + + If you encountered problems, please read first this + installation procedure and the &faq-lnk;. If the + problem persists, use the &help-request-lnk; to + ask for help. + + + + Install all packages and libraries that are needed + for the compilation, please read the + &faq-lnk;. + + If you install &kdevelop;, (almost) + everything that you need to compile + &krusader; will be installed on your + computer. However, if you are not a developer, please + follow the instructions and do not use + &kdevelop; to compile + &krusader;. + + + + + + Open your favourite terminal emulator + (⪚ &konsole;). + + + + + We recommend you create a separate directory to + keep all the sources you compile in. This way you will + have a better overview of the installed programs and it + will be easier to uninstall them later. + $ mkdir ~/source + The chosen directory is just an example, any + other will work. + + + + + + + Copy the sources to the + ~/source directory and unpack them. + $ cp /"your_dir" /krusader-x.xx.tar.gz ~/source + $ cd ~/source + $ tar krusader-x.xx.tar.gz + + + + + + Optional step: if you wish you can delete the + tarball at this point as it is no longer needed. + $ rm krusader-x.xx.tar.gz + + + + + + Change to the directory containing the sources. + $ cd krusader-x.xx + + + + + + Check the environment variables + QTDIRand + KDEDIR. &krusader;'s + ./configure script needs to know where + the &Qt; and &kde; directories + are. + + QTDIR: + <path to your Qt + installation> ⪚ + /usr/lib/qt3 or + /usr/qt3 + + KDEDIR: + <path to your KDE + installation> ⪚ + /usr or + /opt/kde3 + Normally your distribution will set them for you, + but experience has shown that some do not. You can easily + check the values with the + echo command. + $ echo $QTDIR/usr/lib/qt3 + $ echo $KDEDIR/usr + + If both commands give an output, the enviroment variables + are set (the above example are the settings of + &mandriva;-&Linux;). In case you + receive empty lines, the variables are not set and you + have to set them manually. If you do not know what to set + the variables to, or if you want to check if the + variables are correctly set, ask your distributor or use + the + find command. +$ find qtconfig +/usr/lib/qt3/bin/qtconfig +$ find kdeinit +/usr/bin/kdeinit + In this case + /usr/lib/qt3 is your + QTDIR and + /usr is your + KDEDIR. The installed binaries will go to + /usr/bin. Now we will set the + enviroment variables with the + export command. + $ export QTDIR=<replace with your QTDIR> + $ export KDEDIR=<replace with your KDEDIR> + + + These enviroment variables are only set for the + lifetime of your current shell. When you close your + terminal and open a new one they will be gone. Assuming + &krusader; is not the only + &Qt;/&kde; program you want to + compile, we recommend to make these settings permanent + (⪚ append both export commands to your + /etc/profile) + file. + + If you can notdetermine your KDEDIR, + kde-config --prefix might help + you. + + + + + + + If you have downloaded a stable version + "krusader-x.xx.tar.gz" or a beta + version + "krusader-x.xx-betax.tar.gz", you + can skip this step. In this case the + ./configure script is + provided. + If you have downloaded a CVS build or nightly + tarball + "krusader-cvs-yyyy-mm-dd.tar.gz"", + you will have to run the following command to create the + ./configure script: + $ make Makefile.cvs + + If everything is OK you will see the following + output on your screen: +$ make Makefile.cvs +This Makefile is only for the CVS repository +This will be deleted before making the distribution +*** Creating acinclude.m4 +*** Creating list of subdirectories +*** Creating configure.in +*** Creating aclocal.m4 +*** Creating configure +*** Creating config.h template +*** Creating Makefile templates +*** Postprocessing Makefile templates +*** Creating date/time stamp +*** Finished +Don't forget to run ./configure +If you haven't done so in a while, run ./configure --help +$ + + + You will need to have + autoconf 2.52, 2.53 or + 2.54 and + automake 1.6 (or higher) to + run the + make -f Makefile.cvs command + + + If you encounter problems with this command click + here. + &krusader; provides two nightly builds + (snapshots) one with a + ./configure script and one + without. + + + + + + + + Your &Linux; distro + &krusader; RPM or DEB package will normally + install &krusader; in the + KDEDIR/bin directory. According to + the &fhs-url;, any user installed files go to + the + /usr/local directory. If you wish + &krusader; to be installed in another + directory, it can be determed with the prefix option. If + you do not have root access, + /home/YOUR_USERNAME/.kde is probably + a good choice. + +foo + +Krusader Project: +----------------- +Source code location: . +C Compiler: gcc +C Compiler flags: -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith +-Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 +-Wformat-security -Wmissing-format-attribute +C++ Compiler: g++ +prefix: /usr/local +kde_libraries: /usr/include +kde_includes: /usr/lib +kde_locale: /usr/share/locale +qt_libraries: /usr/lib/qt3/lib +qt_includes: /usr/lib/qt3/include +KDEDIR: /usr +QTDIR: /usr/lib/qt3 +Install path: /usr/local/bin +krusader version: 1.80.0 +krusader binary: /usr/local/bin/krusader (after 'make install') +Thank you for using Krusader + +Good - your configure finished. Start make now +bash$ + + + This is the output for + &Mandrake;-&Linux; 10, other + distributions may give a different output. + + At the end of the + ./configure script you will find a + summary of the most important settings, ⪚ + where the &krusader; binary will be + installed (after the 'make install' command). This part + will also display a warning if the environment + variables &kdeqtdir-lnk; are empty. + + + + Since &krusader;-1.70.0 + ./configure has two specific + &krusader; options: + + + + + ./configure + + : build &krusader; without support + &konqueror;'s servicemenus, default=with. + This means that &konqueror;'s right-click + menu entries will not be available. + + + + + ./configure + + : build &krusader; without JavaScript + support, default=with. This means that the + &javascript-console-lnk; will not be + available. + + + + + ./configure + + : build &krusader; without ACL support default=with. + Sometimes this option is needed if you get a ACL compile error when running make. + + In the past the support was always + compiled in when the headers where found, now you have + the choice. + Use + + ./configure + + to see more options or read the + INSTALL file in the + &krusader; sources. + If you used another --prefix= than + $KDEDIR or /usr/local, it is + recommended to do an extra check: +$ kde-config +/home/frank/.kde/bin/:/usr/bin/:/usr/local/bin/ +$ + If the + <prefix_dir/bin> directory is + not shown, you need to use e.g. + export KDEDIRS=/usr/local:/usr. To + make these settings permanent you can ⪚ + append this export command to your + /etc/profile file. After that you + need to restart &kde;. + + If + ./configure fails, take a look at + &missing-libs-lnk;. + + + + + + Start the compilation process with the + make command. + $ make + This will take about 3 - 40 minutes depending on how fast your computer runs. If + everything goes well, it will ⪚ end with + the following messages: + +foo +make[2]: Leaving directory `/home/source/krusader_kde3/tar' +make[2]: Entering directory `/home/source/krusader_kde3' +make[2]: Leaving directory `/home/source/krusader_kde3' +make[1]: Leaving directory `/home/source/krusader_kde3' +bash$ + + + + + If + ./configure was successful and + make failed for some reason, continue + to read this page. If you can not find a solution to your + problem, feel free to post a help request at our + &forum-lnk;. + + + + + If everything is correct, you can now install + &krusader;. + $ su -c 'make + You will be asked to enter your root + password. + + + + + + &krusaderui-rc-text; + + + + Now you can + + start &krusader;. + + + + + Optional step: Cleaning up to save disk space. + Note: All compiled files created with the + makecommand will be deleted. + $ make + + + + + + + + If you ever want to uninstall + &krusader;, use + $ su -c 'make + You will be asked to enter your root + password. + + + + + If you followed the installation procedure and still + encountered problems installing &krusader;, refer + to &faq-lnk;. If the problem persists, use the + &help-request-lnk; to ask for help. + + + + Installing on &MacOS;-X + + &MacOS;-X port + + +Since June 2006 &krusader; is added into the + &krusader; finkproject.org repository + Please check this url for the latest information about the &MacOS;-X port, + please read the &fink-url; documentation for more information, + all information below could be outdated, though they should still work :) + From now on the port is maintained by + Catalin Hritcu. + + Krusader is ported to &MacOS; thanks the &fink-url;-project and Jonas + Bähr and &bodo-tasche-url; . + Unfortunately the only *stable* kdelib-binaries which + &fink-url; has to offer is currenly 3.1.4 which + means you need to use &krusader;-1.40 . + Unfortunately the &MacOS; X &krusader; + port does not have the same power as in a native + &Linux;-&kde; environment. To run + &krusader; you need also X11, which doesn't interact + with the rest of the &MacOS; desktop. We hope that + &Qt;4/&kde;4 will solve most of these + problems. If you want a more recent Krusader version you need + to compile &kde;. With &fink-url; it is + rather easy but it takes some CPU cycles. + Installation Instructions for &krusader;-1.40 + + + Download and install &fink-url; with the + &kde;3.1 binaries provided by fink and read the + documentation. + + + Extract the + + krusader-1.40.fink.darwin-ppc.tar.bz2 package to + /sw/fink/dist/local/main/ Only root can + write here. You may have to create 'local' and + 'main'. + + + Run as root: + fink install krusader + + + Follow these instructions if you wish to compile more + source code or use a more recent version of + &krusader;: + + + Install &apple-x11-url; + + + Install the &apple-x11-sdk-url; + developer-tools with X11 headers (gcc is included) + + + Install the fink-base + + + Compile kdelibs 3.4.1 or higher (fink provides the + necessary + .info files) + + + Compile the &krusader;-tarball or follow + steps 2 and 3 of the previous section if a recent + &krusader;-package ⪚ + + krusader-1.70.0.fink.darwin-ppc.tar.bz2 is + available + + + +Follow these instructions if you wish to compile &krusader;-1.80.0 : + + + Install &apple-x11-url; + + + nstall fink and + enable fink unstable. + + + Compile and install the &kde; bundle in fink: fink install bundle-kde-ssl + (if you get “no package found” the previous step did not succeed). + + + Use krusader.info (provided in the &krusader;-sourcecode) and then copy to + /sw/fink/dists/local/main/finkinfo . + + + Compile and install &krusader; in fink: fink install krusader + + + + Start X11 (startx) and in xterm run &krusader; + + + + Thanks to Catalin Hritcu for these install instructions. + + + + + + Starting &krusader; + Type + + krusader + (lower case) at a command prompt. You can create + shortcut on your desktop or create an entry in the + (&kde;) menu. Read the previous page and the + &faq-lnk; if &krusader; doesn't + start. + When &krusader; is started from the + command line, various options can be specified to modify its + behavior. + + $ krusader + WARNING: Mt.Man: Born, looking around to get familiar. foo + + Do not worry about the messages you get in the + &konsole;. These messages are log messages that + can be used for debugging &krusader;. + + You can also use + &Alt; + F2 to open the Run Command dialog + box, type + + krusader + (lower case) and press &Enter; or click + on the + Run button. + If &krusader; is installed by an RPM or DEB + package then usually &krusader; can be started from + the &kmenu;. ⪚ on + &Mandrake;-&Linux; 10.0 click on the + &kicon; button and choose + + + Applications + File tools + &krusader; + + . + + Command-line options: + + + + + <path> + + + + start left panel at + <path> + + + + + + + + <path> + + + + start right panel at + <path> + + + + + + + + <path1>,<path2>,<path3> + + + + start left panel at + <path1>,<path2>,<path3>, + with tabs. + + + + + + + + <panel-profile> + + + + load a + panel-profile on + startup (this overrides the + default startup + profile). + + + + + Examples: + $ krusader --left=<path> --right=<path> + $ krusader --left=/mnt/cdrom --right=ftp://downloads@myserver.net + $ krusader --left=<path1>,<path2> --right=<path1>,<path2>,<path3> + $ krusader--profile <panel-profile> + $ krusader --profile ftp-managment + + The standard &Qt; and &kde; + command-line options are available, and can be listed by + entering + + krusader + + . + + Other command-line options: + + + + + + + List Qt-specific options + + + + + + + + + + List KDE-specific options + + + + + + + + + + List all options + + + + + + + + + + Show the authors names + + + + + + + + + + Show the version number + + + + + + + + + + Show license information + + + + + + + Configuring &krusader; + When you run &krusader; for the first time, + the &krusader; configuration module + Konfigurator will show up + and allow you to configure &krusader; as well as + detect installed packers and tools. You can always run + Konfigurator again from the + &settingsmenu-lnk;. + + + Making &krusader; the default file + manager + To make &krusader; the default file manager in + Gnome, click here for more information. + + To make &krusader; the default file manager in + &kde;, click here for more information. + + + + + +Installation on KDE4.x + + Krusader installation instructions on KDE4.0 + + From version &krusader;-2.0.0 and higher is &kde;-4 only. + + + At moment of writing &krusader;-2.0.0 is still under development, though it works :) + + +"krusader_kde4.tar.gz" is the supposed name of the krusader tarball (it will be probably a different one ;) + +You can download the latest available krusader-2.x from SVN. + +DCMAKE_INSTALL_PREFIX is the location of the KDE DQT_INCLUDES + + + $ tar -xzvf + $ cd + $ cmake + $ make + $ su -c + + + + + \ No newline at end of file diff --git a/doc/en/introduction.docbook b/doc/en/introduction.docbook new file mode 100644 index 0000000..9ff6078 --- /dev/null +++ b/doc/en/introduction.docbook @@ -0,0 +1,145 @@ + + +Introduction +Introduction + + Package description + &krusader; is a simple, easy, powerful, + twin-panel file manager (commander-style) for &kde; + and other *nix desktops, similar to &mc; or + &tcmd;. It provides all the file management features + you could possibly want. + Krusader also includes extensive archive handling, + mounted file system support, &FTP;, advanced search + module, viewer/editor, directory synchronization, file content + comparisons, powerful batch renaming and much, much more. + &krusader; supports archive formats: ace, arj, bzip2, deb, gzip, iso, lha, + rar, rpm, tar, zip and 7-zip and handles other + &kioslaves1-url; such as smb:// or fish://. + &krusader; is almost completely customizable and therefore + very user-friendly. + Try &krusader;. + +
+ &krusader; screenshot + + + + + + &krusader; screen shot + + +
+ More &kru-screenshots-url; can be viewed on + our website. +
+ + + Welcome to &krusader;! + Our aim is to give you a simple, intuitive tool that + easily handles the most important tasks you perform on your + computer each and every day: manage and process your files the + way you want. + Whether you are a &Linux; expert or a novice, + &krusader; makes routine file management tasks quick + and accurate, allowing you to focus on the big picture, not + command line syntax. This is especially helpful if you are new + to xxNIX operating systems. To do just that, + &krusader; uses a good-looking &GUI; and + supports drag and drop as well as mime types, making it easy to + use. + &krusader; has many useful features. It is fast, and + handles &archives-lnk; transparently. In addition, + &krusader; streamlines many complex file management + tasks, reducing fatigue, errors, and distraction. Basically, + &krusader; provides all the helpful features you have + come to expect from other quality file management tools like + &mc; and &tcmd;. &krusader; is + designed to integrate seamlessly with the &kde; + Desktop, the desktop of choice for many programmers, network + engineers, and other power users of &Linux;. With + &krusader; even novice users can quickly access the + power, convenience, and feature rich capabilities of the + &kde; Desktop. &krusader; is a free + open-source project, and it is released under the + &gpl-lnk;, although the developers still retain the + copyright for the project and its name, and manage the + project's continuing evolution. + The &krusader; Project mission is to create + an "all-in-one" file manager, which will do all the ordinary + things you would expect of it, and more. Since the principle + behind &krusader; is based on the + &ofm-url;, dual-pane filemanagers (&mc;, + &nc;, &etc;), it is certain that + &krusader; is able to handle all the standard Copy, + Move, Delete, &etc; file operations. + From the start, virtual file systems became the main + focus. &vfs-lnk; are an abstracted layer over all + kinds of archived information (ZIP files, &FTP; + servers, TAR archives, NFS filesystems, SAMBA shares, ISO + cd/dvd images, RPM catalogs, &etc;), which allow the + user to access all the information in these divergent types of + file systems transparently - just like entering an ordinary + sub-directory. Files can then be copied or moved around (except + ISO,rpm,tar.gz) between these data sources/containers + effortlessly. &krusader; currently supports VFSs for + all popular and some specialized types of archives (ace, arj, + bzip2, gzip, iso, lha, rar, tar, zip and 7-zip), configuration + packages (rpm, deb), and traditional remote file system types + (&FTP;, NFS, Samba, FISH, SFTP). + &krusader; also includes a built-in + Mount-Manager &mountman-lnk;, which enables you to + mount or unmount file systems of all types with a click of a + mouse. The user is able to obtain usage and other property + information easily, in a consistent and understandable format + in seconds. Ease and consistency is the goal. + A &bookmark-manager-lnk; for local + files/remote &URL;s and an + &advanced-search-module-lnk; is also included to + speed the locating of needed files. &krusader; also + allows the user to configure Toolbars in order to provide a + wide variety of additional functionality, such as File + Comparison (several user selectable methods available), + Multiple File Rename, and standard Terminal windows. + Advanced users benefit greatly from being able to carry + out clerical tasks effortlessly, without distraction from the + real task at hand. Convenient shortcut keys enable the user to + navigate directory trees with ease, create multiple tabbed + directory views simultaneously, and access fully functional + history lists. Due to efficient programming and low system + overhead, &krusader; is perhaps the most responsive + all around system management tool used to access the full + potential of a computer using &kde;, or any other + standards compliant X Windows window manager. Although designed + specifically for, and tightly integrated with, + &kde;; &krusader; works equally well with + Gnome, Enlightenment, WindowMaker, IceWM, BlackBox, Wiamea, + XFCE, etc.as soon as the KDE libraries are installed. + New extensibility is provided by the flexible + &useractions-lnk;, a &krusader; + innovation that allows unlimited additional custom + functionality to be added to suit the specific needs of users. We + are planning to develop more modules in the near future, + thereby enhancing &krusader;. Information on what is + proposed, approved, or remains to be completed can be found in + the &todoforum-url;. + No other program we know of, offers so many useful, + easily accessible features in such an intuitive and simple + format. Best of all, we listen, and implement good suggestions + that are consonant with the &krusader; Project's + goal: making &krusader; the very best File Manager + available. + We hope you'll enjoy it - we do! + +
diff --git a/doc/en/java.docbook b/doc/en/java.docbook new file mode 100644 index 0000000..dcaa287 --- /dev/null +++ b/doc/en/java.docbook @@ -0,0 +1,88 @@ + + JavaScript Console + + JavaScript Console + + + &Alt;&Ctrl; + j opens the JavaScript console. + (only available if libkjsembed is present at compile- and + runtime) + The JavaScript console is an interface to the embedded + JS-Interpreter which can be used for amusement or + testing. + + + + JavaScript interface + + JavaScript interface + + + Warning: The JS-Support is + quite stable, and you can not lose any data by using it. However, + your scripts may not work with future versions of + &krusader;, as the JS-Support is changing. + + Please + upload your favorite JavaScript + Extensions so that they become available for the + &krusader; community. Thanks! + + JavaScript applications usually have 2 files + foo.jsand + foo.ui. They will be installed in + ~/.kde/share/apps/krusader/js/, a + user action with a "%_Script" action will start the + Javascripting. Currently we have 2 JS demos + root-mount-extension.tar.bz2 and + js-demo-calc.tar.bz2 that will be more + explanatory. + When a script is executed, the script doesn't know its + origin (or maybe there is a way to do so that we do not know of) + and all relative paths are relative to the current working-dir. + But this dir is (normally) not the one where the script is + located but the current dir of the active Panel of Krusader. + This needs to stay like this. However, for referencing + additional files like .ui (Userinterface, exported by + &Qt;'s Designer) one needs the path of the script. + The alternative where absolute paths are used is more than + unhandy. For this reason the Variable "scriptDir" was + introduced. If a Script wants to load a &GUI; from a + .ui-file this can be done this way: + var ui = Factory.loadui( scriptDir + 'filename.ui' + ); I recommend using Dialog as a base when designing + &GUI;s to be used with JS. Execute the dialog with: + ui.exec(); The elements of the + &GUI; may be accessed in the following way: + ui.child('widgetName') + Currently only the objects 'Krusader' and + 'PanelManager' are exposed C++ objects without a logic + behind them. They can be inspected using the JS-Console and the + functions 'properties()', 'children()' and 'slots()'. The + children can be accessed with the function + 'child("nameOfChild")' with returns an object itself. Currently, the Variable scriptDir is more useful. Following the root-mount + extension it is already possible to create advanced + &GUI;s for command line tools + You can play around with 'Krusader.setCaption("Hey Ho, + Let's go!");', 'Krusader.children();', + 'Krusader.child("help").slots();', + 'alert(Krusader.properties())' or + 'Krusader.child("help").show();'.... In addition, a new + placeholder for the &useractions-lnk;, %_Script()%, + will execute an external file. + NOTE: The object 'Krusader' will change. We have not made + decisions about the JS-interface yet (at the time of the + 1.70.0-release). Any ideas are welcome. Plase use our + &kruforum-url; for feedback. + The JavaScript-support is based on + &kjsembed-url;. Some examples which show the power + of this library can be found + + here. Support for all of KDE's ground-laying technologies + such as DCOP or KParts is provided. You can even load whole + GUIs from .ui-files, created with &Qt;'s Designer. + An example extension making use of this can be found + + here. + diff --git a/doc/en/keyboard.docbook b/doc/en/keyboard.docbook new file mode 100644 index 0000000..5e16c3d --- /dev/null +++ b/doc/en/keyboard.docbook @@ -0,0 +1,1864 @@ + + + Keyboard Commands + + Commands + Keyboard + + + Keyboard Usage + In this chapter you will learn how to use the keyboard + effectively, because most operations can be done more quickly + by keyboard than with the mouse. It will take some time to learn + the &keybindigs-lnk;, but mastering them saves you a + lot of time. Please note that &krusader; can use + &keybindigs-profiles-lnk; to swap easily to other + Key-binding setups, e.g. of other commanders, or you can create + your own key-bindings. + After + + starting &krusader;, the keyboard action can + begin. Use &Ctrl;l to jump to the + &location-toolbar-lnk; where you can type the + desired directory. After &Ctrl;Down arrow + you are in the + &termemu-lnk; and you can type any command you + desire. Use &Ctrl;Up arrow + to jump back to the active panel. If + you want to jump to a file or directory that starts with "f", + then simply press "f" on the keyboard to use the + &quick-search-lnk; . Use the Enter key to execute + the file or to open a directory that has the focus. Be sure to + remember the Function Keys - F3 to View, F4 to Edit, + F5 to Copy, &Alt;u to Unpack, etc. + You can also perform several operations with the + &foldertabs-lnk;, including several + selection operations. And at + the end you can close &krusader; with F10. + + + Key-Bindings + + Key-Bindings + + + Commands + Keyboard + + Most of the key-bindings (shortcuts) are configurable in + the + + Settings + Configure Shortcuts + + menu, if you like to use other key-bindings then the + default ones. You can even configure + more actions to a Key-Binding (for the actions that don't have a key-binding set by default). + Please note that some key-bindings are not &krusader; key-bindings ⪚ + &kde; key-bindings). The key-bindings that + &krusader; uses by default are listed below. + + + + Function (FN) Keys + + These are the Key-Bindings of the + &fnkeybar-lnk;. These Key-Bindings are configurable + since version 1.51. + + + + + + + F1 + + + + Help + + + + + + F2 + + + + + Terminal. + + + + + + + F3 + + + + + View files. + + + + + + + F4 + + + + + Edit files. + + + + + + + F5 + + + + + Copy files. + + + + + + + F6 + + + + + Move files + + + + + + + F7 + + + + + Create a new + directory. + + + + + + + F8 + + + + + Delete (or move to Trash) + files. + + + + + + + F9 + + + + + Rename files. + + + + + + + F10 + + + + Quit &krusader; + + + + + + + + SHIFT keys + + + + + + + + &Shift; + F1 + + + + + What's this? + + + + + + + &Shift; + F3 + + + + + Enter an &URL; + to view. + + + + + + + &Shift; + F4 + + + + + Edit new file. + + + + + + + &Shift; + F5 + + + + + Backup current file (Default Useraction). + + + + + + + &Shift; + F9 + + + + + Multi-rename + (&krename;). + + + + + + + &Shift; + F10 + + + + + View all files. + + + + + + + &Shift; + F12 + + + + + Custom view files. + + + + + + + + &Shift; + Left Arrow + + + + + Change to left folder + tab. + + + + + + + &Shift; + Right Arrow + + + + + Change to right folder + tab. + + + + + + + + + ALT keys + + + + + + + + &Alt; + c + + + + &comparedir-lnk; + + + + + + &Alt; + d + + + + &diskusage-lnk;. + + + + + + &Alt; + e + + + + + Test Archive. + + + + + + + &Alt; + k + + + + Start &rootmode-lnk; + &krusader;. + + + + + + &Alt; + l + + + + &panel-profiles-lnk;. + + + + + + &Alt; + o + + + + + Sync panels aka "Equals Button (=)". + + + + + + + &Alt; + p + + + + + Pack files. + + + + + + + &Alt; + u + + + + + Unpack + files. + + + + + + + &Alt; + y + + + + Synchronize Directory changes. + + + + + + &Alt; + + + + + + + Select All. + + + + + + + &Alt; + - + + + + + Unselect All. + + + + + + + &Alt; + * + + + + + Invert Selection. + + + + + + + &Alt; + / + + + + + MountMan. + + + + + + + &Alt; + ` + + + + &usermenu-lnk; + + + + + + &Alt; + KP_Enter + + + + + Properties. + + + + + + + &Alt; + Left Arrow + + + + + Left bookmarks. + + + + + + + &Alt; + Right Arrow + + + + + Right bookmarks. + + + + + + + &Alt; + Down Arrow + + + + &popup-panel-lnk;. + + + + + + &Alt; + F1..F12 + + + + Standard (&kde;) + key-bindings. + + + + + + + + + ALT+SHIFT keys + + + + + + + + + &Alt;&Shift; + b + + + + Brief View + + + + + + + &Alt;&Shift; + d + + + + Detailed View + + + + + + + + + + CTRL keys + + + + + + + + &Ctrl; + b + + + + &combinefiles-lnk;. + + + + + + &Ctrl; + d + + + + + Open Bookmarksin the + active panel. + + + + + + &Ctrl; + e + + + + Edit file as root (Default Useraction). + + + + + + &Ctrl; + f + + + + Toggle between normal and full screen + &termemu-lnk;. + + + + + + &Ctrl; + h + + + + + Open History + list.in the active panel. + + + + + + &Ctrl; + j + + + + A &safari;-like + Jump-Back. + + + + + + &Ctrl; + l + + + + Go to the &location-toolbar-lnk; + (origin) as in &firefox; and + &konqueror;. + + + + + + &Ctrl; + m + + + + + Open media + list.. + + + + + + &Ctrl; + n + + + + + New Network + Connection.dialog. + + + + + + + &Ctrl; + o + + + + Select directory dialog to open this directory + in the panel. + + + + + + &Ctrl; + p + + + + + Split file. + + + + + + + &Ctrl; + u + + + + + Swap panels (don't swap all folder tabs). + + + + + + + &Ctrl; + r + + + + + Reload (Refresh) + panel. + + + + + + + + Ctrl + s + + + + + + Search. + + + + + + + &Ctrl; + q + + + + Quit &krusader;. + + + + + + &Ctrl; + w + + + + + Close Current tab. + + + + + + + &Ctrl; + y + + + + &syncdirs-lnk;. + + + + + + &Ctrl; + z + + + + + Popular URL's. + + + + + + + &Ctrl; + + + + + + + Select group. + + + + + + + &Ctrl; + - + + + + + Unselect group. + + + + + + + &Ctrl; + = + + + + + Compare + directories.(Compare Mode) + + + + + + &Ctrl; + . + + + + + Show/Hide hidden (dot) + files. + + + + + + + &Ctrl; + / + + + + + Open command line history + list. + + + + + + + &Ctrl; + Down arrow + + + + + Go from the active panel to + the command line/terminal emulator. + + + + + + + &Ctrl; + Up arrow + + + + + Go from the command + line/terminal emulator to the active panel. + + + + + + + &Ctrl; + Up arrow + + + + Go from the active panel to the + &location-toolbar-lnk;. + + + + + + &Ctrl; + Home + + + + Jump to the Home directory. + + + + + + &Ctrl; + Leftor + + Right arrow + + + + Focus a file or directory on the left panel, + press + &Ctrl; + Left arrow and the right + panel changes: + + + on a file: the right panel gets the same + path as the left + panel. + + + on a directory: refreshes the right panel + with the contents of the directory. + + For the right panel: press + &Ctrl; + Right arrow and the left + panel will change. + + + + + + + &Ctrl;&Backspace; + + + + Jump to the Root directory. + + + + + + &Ctrl; + PageUp + + + + Up one directory. + + + + + + + + CTRL+SHIFT keys + + + + + + + + + &Ctrl;&Shift; + d + + + + + Bookmark current + item. + + + + + + + + &Ctrl;&Shift; + f + + + + + Disconnect + remote connection. + + + + + + + + &Ctrl;&Shift; + j + + + + + Set jump back + point. + + + + + + + + &Ctrl;&Shift; + l + + + + &locate-lnk;. + + + + + + + &Ctrl;&Shift; + u + + + + Swap Sides (also swap all folder tabs). + + + + + + + &Ctrl;&Shift; + Left arrow + + + + + Open left media + list. + + + + + + + &Ctrl;&Shift; + Right arrow + + + + + Open right media + list.. + + + + + + + &Ctrl;&Shift; + Up arrow + + + + Open + terminal emulator, + independently, whether the command line is shown or + not. + + + + + + + &Ctrl;&Shift; + Down arrow + + + + Close + terminal emulator, + independently, whether the command line is shown or + not. + + + + + + + + CTRL+ALT keys + + + + + + + + + &Ctrl;&Alt; + j + + + + &javascript-console-lnk; + + + + + + + &Ctrl;&Alt; + m + + + + Mount (Default Useraction). + + + + + + + &Ctrl;&Alt; + n + + + + + New tab. + + + + + + + + &Ctrl;&Alt; + r + + + + Toggle the &list-panel-lnk; between + horizontal and vertical mode. + + + + + + + &Ctrl;&Alt; + s + + + + Create a new symlink. + + + + + + + &Ctrl;&Alt; + t + + + + Show/hide the + terminal + emulator. + + + + + + + &Ctrl;&Alt; + Left Arrow + + + + + Left History + list. + + + + + + + + &Ctrl;&Alt; + Right Arrow + + + + + Right History + list. + + + + + + + + &Ctrl;&Alt; + = + + + + Equal Panel Size (Default Useraction). + + + + + + + &Ctrl;&Alt;&Shift; + n + + + + + Duplicate a tab. + + + + + + + + &Ctrl;&Alt;&Enter; + + + + Open current folder in a + new tab. + + + + + + + + General CTRL keys + + + + + + + + &Ctrl; + a + + + + Select all. + + + + + + &Ctrl; + PageDown + + + + Move to the lower part in the current + directory. + + + + + + &Ctrl; + F1..F12 + + + + Standard (&kde;) + key-bindings. + + + + + + + &Ctrl;&Shift; + F1..F12 + + + + Standard (&kde;) + key-bindings. + + + + + + + + Other keys + + + + + + + + foo + + + + &quick-search-lnk; + + + + + + + + + Switch between the + panels + + + + + + &Enter; + + + + On a + file: open/execute that file + + On an archive + file: browse the archive as if it was a + directory. + + + + + &Esc; + + + + Will make the menu + bar lose the focus if it has it. + + + + + + + Delete + + + + + Delete (or move to + Trash). + + + + + + + &Shift; + Delete + + + + + Delete permanently. + + + + + + + SPACE + + + + + On a + file: toggle the selection of the file down one + position without affecting the selection of other + files/directories. + + On a + directory: calculate the size, without + affecting the selection of other + files/directories. + + + + + &Backspace; + + + One directory up. + + + + + + INSERT + + + + Does the same as the SPACE key + and goes down one + position to toggle the next file. + + + + + + MENU + + + + Right-click menu. + + + + + + Home + + + + Cursor jumps to the top of the list. + + + + + + End + + + + Cursor jumps to the last file in the + list. + + + + + + + + + Command Line + + &cmdline-lnk; keybindings. + + + + + + + Up arrow and + Down arrow + + + scroll through previously typed + commands. + + + + + + &Ctrl; + / + + + + open the command line history list. + + + + + + &Ctrl; + Up arrow + + + + jump from the command line to the active + panel. + + + + + + &Ctrl; + Down arrow + + + + jump from the active panel to the command + line. + + + + + + + &Ctrl;&Enter; + + + + insert current file / directory name without + path to current command line position. + + + + + + + &Ctrl;&Shift;&Enter; + + + + insert current file / directory with full path + name to current command line position. + + + + + + + + + + Terminal emulator + + &termemu-lnk; keybindings. + + + + + + + &Ctrl; + f + + + + Toggle between normal and full screen + &termemu-lnk;. + + + + + + &Ctrl; + v + + + + Insert from clipboard. + + + + + + &Ctrl; + Up arrow + + + + Jump from the Terminal Emulator to the active + panel if the Command line is hidden. + + + + + + &Ctrl; + Down arrow + + + + Jump from the active panel to the Terminal Emulator + if the Command line is hidden. + + + + + + &Ctrl;&Shift; + Up/Down arrow + + + + Always focus/unfocus the Terminal Emulator independently + whether the Command Line is shown or not. + + + + + + &Shift; + Insert + + + + Insert from clipboard. + + + + + + + + + + + + Default Useractions + + Default &useractions-lnk; keybindings provided + by &krusader;. + + + + + + + &Ctrl; + e + + + + Edit a file as root. + + + + + + + &Ctrl;&Alt; + c + + + + Copy current item to clipboard. + + + + + + + &Ctrl;&Alt; + m + + + + Mount a new file system. + + + + + + + &Ctrl;&Alt; + = + + + + Equal panel-size. + + + + + + + Win + a + + + + + Enqueue in Amarok. + + + + + + + Win + 1 + + + + + Sort by Name. + + + + + + + Win + 2 + + + + + Sort by extension. + + + + + + + Win + 3 + + + + + Sort the active panel by size. + + + + + + + Win + 4 + + + + + Sort by modified. + + + + + + + + Other Key-bindings + + + Selecting files + + + + + KrViewer + + + + &diskusage-lnk; + + + &locate-lnk; + + + &kcontrolcenter; -> + Accessibility -> Keyboard Shortcuts + + + &useractions-lnk; configurable + key-bindings + + + + diff --git a/doc/en/konfigurator.docbook b/doc/en/konfigurator.docbook new file mode 100644 index 0000000..e3658e5 --- /dev/null +++ b/doc/en/konfigurator.docbook @@ -0,0 +1,1907 @@ + + + Konfigurator: &krusader;'s Configuration + Center + + Configure + Krusader + + Konfigurator is &krusader;s configuration + center. When runnig &krusader;, use + + Settings + Configure &krusader; + , and it will start Konfigurator. + There you can modify the way &krusader; works + and customize it to your own needs. At any time, pressing the + Apply button applies the changes, pressing + Close closes Konfigurator, and pressing + Defaults re-applies &krusader;'s + "factory" settings. Konfigurator is divided into pages, each + containing items related to that page. For some changes to the + &GUI;, you have to close and restart + &krusader;. + + + Since &krusader;-1.80.0 the &keybindigs-lnk; and &main-toolbar-lnk;-&actions-toolbar-lnk; + have reiceived their own configuration windows and so they are not a part anymore of Konfigurator, + you can configure them now via the &settingsmenu-lnk;. + + + + Startup + +
+ Startup configuration + + + + + + Startup configuration + + +
+ The startup page determines the way that + &krusader; looks (and works) when it is launched. It + is divided into two main parts: + + + + General + + + + + + Startup Profile: Starts the + selected + Panel profile at + startup. + <Last + session> is a special Panel + Profile, it is saved automatically when closing + &krusader;. + + + + Show splashscreen: Displays a + splash screen when starting + &krusader;. + + + + Single Instance Mode: Allows + only one &krusader; instance to run. + + + + + + + User Interface + + + Determines which parts of the user interface are + visible after start-up. + + + + Save settings on exit: If + checked, restores the user interface components to + their condition when last shut-down. + + + + Show toolbar: If checked, + &main-toolbar-lnk; is visible after + startup. + + + + Show statusbar: If checked, the + &statusbar-lnk; is visible after + start-up. + + + + Show function keys: If checked, + the &fnkeybar-lnk; is visible after + start-up. + + + + Show command line: If checked, + the &cmdline-lnk; is visible after + start-up. + + + + Show terminal emulator: If + checked, the &termemu-lnk; is visible + after start-up. + + + + Save last position, size and panel + settings: When launched, + &krusader; resizes itself to the size it + was when last shut-down. &krusader; also + appears in the same location on the screen, having + panels sorted and aligned as they were. If this + option is unchecked, you can use the menu + + + Settings + Save Position + + option to manually set + &krusader; size and position at + start-up. + + + + Start to tray: if checked, + &krusader; starts to tray (if minimize to + tray is set), without showing the main window. + + + + + +
+ + Look and Feel + Here you can determine the look and feel of things - + which means finetuning the application to your needs. The page + is divided into four tabs: + Operation, + Panel, + Panel Toolbar and + Selection Mode: + + + + Operation + + + <guilabel>Look & Feel</guilabel> + + + + Warn on exit: If checked, + &krusader; displays an "Are you sure?" warning + when you try to shut it down; otherwise, it exits without + protest. + + + + Minimize to tray: If checked, when + you minimize &krusader;, its icon will appear + in the system tray instead of the taskbar. + + + + Autoselect Directories: When + you select a group of + files (either by using Select Group or by using + Select All), &krusader; checks this option. If + checked, the directories matching the select criteria are + also selected. Otherwise, only files are selected. + + + + Rename selects extension: When + you rename a file, the + whole text is selected. If you want total commanderlike + renaming of just the name, without extension, deselect + this item. + + + + Use fullpath tab names: If checked, + display the full path in the &foldertabs-lnk;; + otherwise only the last part of the path is + displayed. + + + + Fullscreen terminal (mc-style): + Terminal appears instead of the &krusader; + window (full screen). + + + + + + <guilabel>Quicksearch</guilabel> + + + + New style Quicksearch: The new + Quicksearchfeature is + used. + + + + Case Sensitive Quicksearch: When you + use the + Quicksearchfeature: If + checked (the &UNIX; default), all files + beginning with capital letters appear before files + beginning with lower case letters; otherwise, all files + beginning with a specified letter (capital or otherwise) + will be displayed together. + + + + + Panel + + + + Panel font: Allows you to change the + font used inside the file lists. + + + + Filelist icon size: Allows you to + change the size of the icons in the file lists. The + available sizes are 16x16, 22x22, 32x32 and 48x48 + pixels. + + + + Use icons in filenames: If checked, + show the icons in file names and folders. + + + + Human readable file size: If + checked, the file size appears in kB, Mb + &etc;, and not in bytes (default). + + + Since &krusader;-1.70.0 you need to + configure the columns with the right click menu in the + panel, not in Konfigurator. The left and right panel use + their own columns independently. The following columns + are available: + + + + Name: Shows the filename without the part after the last dot, + this latter part is displayed in the Ext column. When the Ext column is made hidden, + the complete filename is shown in the Name column like e.g. &konqueror; does. + + + + + Ext: Shows the last part of the + filename (the part after the last dot) in the ext + column, and not as a complete filename in the name column + like e.g. &konqueror; does. + + + + + Type: Shows the mime type + field. + + + + Size: Shows the size + field. + + + + Modified: Shows the modified + date and time field. + + + + Perms: Shows the full permissions + ⪚ "rwxr-xr-x" or as octal numbers + '0755' instead with enable/disable + Numeric Permissions in Look + & Feel + Operation Tab. + + + + rwx: Shows only the rights of + the current user ⪚ "-rw". + + + + Owner: Shows the owner + field. + + + + Group: Shows the group + field. + + + + + + Show Hidden files: If checked, + &krusader; displays the "dot-files" which are + otherwise hidden. + + + + Case Sensitive Sorting: If checked + (the &UNIX; default), all files beginning with + capital letters appear before files beginning with + non-capital letters; otherwise, all files beginning with + a specified letter (capital or otherwise) appear + together. + + + + Always sort dirs by name: Sorts + directories by name, regardless of the sort + column. + + + + Numeric permissions: Permission + column (Look & Feel + PanelTab) shows octal numbers '0755' + instead of 'rwxr-xr-x'. + + + + Uncheck the columns not in use. This allows more + space for columns in use. + + + + Panel Toolbar + + Panel Toolbar visible: If checked, + &krusader; displays the Panel Toolbar. + You can make the buttons on the + Panel Toolbar visible or hidden: + + + + Clear Location Toolbar button: Clears + the &location-toolbar-lnk; + + + + Open button + + + + Equal (=) button + + + + Up (..) button + + + + Home (~) button + + + + Root (/) button + + + + Toggle-button for sync-browsing: If + checked, shows the &sync-browsing-lnk; + button. + + + + + Selection Mode + Here you can configure the selection modes. + + + <guilabel>General</guilabel> + + + + &krusader; Mode: The way + &krusader; has worked from day one. Both mouse + keys allow selecting files. To select more than one file, + hold the &Ctrl; key and click the + &LMB;. Right-click menu appears with a short + click on the &RMB;. + + + + Konqueror Mode: pressing the + &LMB; selects files -- + + you can click and select multiple files. Right-click menu + appears with a short click on the + &RMB;. + + + + Total commander Mode: Pressing the + &RMB; selects multiple files + + and the right-click menu appears with + pressing and holding the + &RMB; The &LMB; does not select, + but sets the current file without affecting the current + selection. + + + + Custom Selection Mode: Create your + own selection style! + + + + + <guilabel>Details</guilabel> + + + + Double-click selects (classic): A + single click on a file will select and focus, a double + click opens the file or steps into the directory. + + + + Obey KDE global selection policy: + Pressing the &LMB; selects files -- Use + &kde;'s global setting: &kde; + Control Center -> Peripherals + -> Mouse. + + + Custom Selection Mode items: + + + + Based on KDE's selection mode + + + + + Left mouse button selects + + + + + Left mouse button preserves + selection + + + + + Shift/Ctrl-Left mouse button + selects + + + + + Right mouse button selects + + + + + Right mouse button preserves + selection + + + + + Shift/Ctrl-Right mouse button + selects + + + + + Space bar moves down + + + + + Space bar calculates diskspace + + + + + Insert moves down + + + + + Right-clicking shows the context menu + immediately + + + + + + + + + Colors + This page configures the colors of the + &list-panel-lnk; and the + &synchronizer-lnk;. The + KDE default colors is the default color + configuration. + + + + + + General + + + + + + Use the default KDE colors: this + is the default, it uses &kde; color + settings of + kcontrol. + + + + Use Alternate Background color: + If checked, the + Background color and the + Alternate background color + alternates line by line. When you do not use the + &kde; default colors, you can configure + the alternate colors in the + Colors box. + + + + Show current item even if not + focused: If checked, shows the last cursor + position in the non active list panel. This option is + only available when you do not use the + &kde; default colors. + + + + Dim the colors of the inactive + panel: If checked, the colors of the + inactive panel are dimmed. These settings can be + configured in the + Inactive tab of the + Colors box. This option is only + available when you do not use the &kde; + default colors. + + + + + + + Colors + + + Configure the colors the way you like, you can see + the result in the + Preview section. The following items + of the active and inactive panel can be + configured: + + + + Foreground + + + + + Directory foreground + + + + + Executable foreground + + + + + Symbolic link foreground + + + + + Invalid symlink foreground + + + + + Background + + + + + Alternate background + + + + + Selected foreground + + + + + Selected background + + + + + Alternate selected background + + + + + Current foreground + + + + + Selected current foreground + + + + + Current background + + + + The following items of the + &synchronizer-lnk; can be configured: + + + + Equals foreground + + + + + Equals background + + + + + Differing foreground + + + + + Differing background + + + + + Copy to left foreground + + + + + Copy to left background + + + + + Copy to right foreground + + + + + Copy to left background + + + + + Delete foreground + + + + + Delete background + + + + + + + + Preview + + + Here you see a preview of the configured + colors. + + + + + Color schemes + + + With the + Import Color Scheme and + Export Color Scheme buttons you can + load and save a Color Scheme profile. This allows + &krusader; to use &tcmd;, + &mc;, foo-commander or your own custom color + profile. The Color Schemes are stored in + $KDEDIR/share/apps/krusader, the + foo.color is a binary file that holds + the color scheme. + + &mc; and &tcmd; Color + scheme files are provided. Please + upload your favorite + Color schemes so that they become available for + the &krusader; community. Thanks! + + + + + + + General + Here you configure the basic operations. + + + The following options determine basic aspects of + operation: + + + + Delete files/Move to trash: when + &krusader; deletes files it can either 'really' + delete them or move them to the trash folder, thereby + making them available via &kde;'s trash. + + + + Use mimetype magic: mime type magic is + a mechanism which allows &krusader; to inspect + the files in the panels and determine their type even if + the file has no identifying extension. For example, if you + take an image file - 'image1.jpg' - and rename it to + 'image1', &krusader; will still know it's an + image file and work with it accordingly. However, this mode + of operation is slower (while refreshing the panel, or + changing directories), so try &krusader; with + and without mime type magic and decide what is best for + you. + + + + Editor: choose what editor will be + used when editing a file (via F4). + + + + Default viewer mode: either generic, + text or hex mode. + + + + Viewer opens each file in a separate + window: you can use the browsing tabs for + navigation. + + + + Atomic extensions: predefined atomic extensions like tar.gz + are shown as one part in the Ext Column of the &list-panel-lnk;. + + + + Terminal: choose which terminal + emulator will be used when &krusader; opens a + console window (via F2, or Commands->Terminal + menu option). + + + + Terminal Emulator sends Chdir on a panel + change: if unchecked, there will be no + cd command sent to the Terminal Emulator + if the panel folder changes. + + + + Temp Directory: this option selects + the base directory for &krusader;'s temporary + files. The actual files will be created in separate + directories under the 'Temp directory', so that each user + running &krusader; will have their own temporary + subdirectories under the chosen directory. + + You must choose a temporary directory to which all + users running &krusader; have full + permissions! + + + + + + Advanced + This page handles more advanced issues, so you should + double-check your actions here: modifying settings here + makes &krusader; a more powerful AND + dangerous tool. + + + The page is divided into three parts: + + + + General + + + + + + Preserve attributes for local copy/move + (slower): If checked, + &krusader; will try to preserve all + attributes (time, owner, group) of the local files + according to the source file depending on your + permissions. + + + + Automount filesystems: this + makes &krusader; try to mount a file system + before entering it. For example, if you click on + /mnt/cdrom (and + + /mnt/cdrom appears in + /etc/fstab as a + mount point), &krusader; will check if it + is mounted. If not, it will try and mount it for you + and then enter, so that you would see the contents of + your cdrom. Note, however, that &krusader; + will NOT unmount when exiting + + /mnt/cdrom. + + + + Do not use KDE media protocol for the + Media button (if it is buggy or missing): + If checked, &krusader; will not use + &kde; media protocol for the + Media button. + Choose this when the media protocol is buggy (in some + older &kde; versions) or if you have no + kdebase package installed on your system. + + + + MountMan will not (un)mount the following + mount points: If you have file systems that + you do not want to accidentally unmount (or mount) + then enter a list of mount points separated by commas + (⪚ + /, /boot, /tmp) and + &mountman-lnk; will not try to (un)mount + them. + + + + + + + Confirmations + + + By checking the options in this section, + &krusader; will ask for confirmation before + doing a specific action; otherwise, the following actions + will be done without warning: + + + deleting non empty directorie(s) + + + deleting file(s) + + + copying file(s) + + + moving file(s) + + + + + + + Fine-Tuning + + + + + + Icon Cache Size: + &krusader; uses an icon cache, so it will not + have to reload icons that have been used before. Of + course, as the cache grows bigger, it can store more + icons and further speed operations, but the memory + footprint of &krusader; will become + bigger. + + + + Arguments of updatedb: sets + additional arguments for + updatedb, please read the manpages + for more information. + + + + + + + + Archives + This page handles the way &krusader; works + with archives. In the + General section you will see a list of + archive formats. Some are checked and some are grayed-out. The + ones that are available (not grayed-out) are supported by + &krusader;. If you check them, &krusader; + will handle the archives transparently and let you open them as + folders; otherwise, &krusader; will attempt to + invoke an application which opens archives of that type. If a + certain archive is grayed-out, it means that + &krusader; could not find the appropriate executables + in the configured path. The next archives are supported: ace, + arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip and + 7-zip. + + + If you have installed a certain archive application (let's + say + arj) and want &krusader; to know + about it, just click the + Auto Configure button. + &krusader; will search for all supported executables + and print a report listing the archive formats that can be + handled. If the operation was successful the new archive should + be available and checked. + + Please install new packagers to your + PATH (&ie;: + /usr/bin or + /usr/local/bin &etc;) + + The full path of the packagers is stored in the + &konfigdependencie-lnk; (⪚ to handle + ZIP archives, &krusader; needs the + unzip and + zip executables). It is possible that you need + to manually configure the mimes to the protocols in the + &konfigprotocol-lnk;. + + Fine-Tuning + + + + Allow moving into archives: this + option allows you to move files into an archive (as + opposed to just copying into the archive). The down side + is that if a power failure occurs during the process, the + files that were moved might already be deleted, but not + yet packed into the archive. + + If such a thing happens, the file(s) are NOT + LOST. They were actually moved into a subfolder in + &krusader;'s + temp directory. + You can search the directory and recover your + files. + + + + + Test archives when finished packing: + this option automatically runs a test on a newly packed + archive. It is safer, but takes longer. + + + + + + Dependencies page + This page configures the full path of the external + applications. It is even possible to configure the full path of + &krusader;! + + General tab + + Here you can configure the full path of the following + external applications: + + + + + application + configurable full path + + + + + df + + + + + + /bin/df + + + + + + + + eject + + + + + + /usr/bin/eject + + + + + + + + kdesu + + + + + + /usr/bin/kdesu + + + + + + + + kget + + + + + + /usr/bin/kget + + + + + + + + kmail + + + + + + /usr/bin/kmail + + + + + + + diff utility + + + + + /usr/bin/kompare + + + + + + + krename + + + + + /usr/bin/krename + + + + + + + + krusader + + + + + + /usr/bin/krusader + + + + + + + + locate + + + + + + /usr/bin/locate + + + + + + + + mount + + + + + + /bin/mount + + + + + + + + umount + + + + + + /bin/umount + + + + + + + + updatedb + + + + + + /usr/bin/updatedb + + + + + + + + + By default &kompare; (part of the kdebase + package) is used as external diff utility but you can also + use your favorite diff utility ⪚ + &xxdiff-url; or &kdiff3-url;, just fill + in the full path and enjoy. + + + Packers tab + + Here you can configure the full path of the following + external packers. &krusader; also offers an + auto configure tool for + packagers. + + + + + packer + configurable full path + + + + + 7z + + + + + + usr/bin/7z + + + + + + + + arj + + + + + + usr/bin/arj + + + + + + + + bzip2 + + + + + + usr/bin/bzip2 + + + + + + + + cpio + + + + + + /bin/cpio + + + + + + + + dpkg + + + + + + /bin/dpkg + + + + + + + + gzip + + + + + + /usr/bin/gzip + + + + + + + + lha + + + + + + /usr/bin/lha + + + + + + + + rar + + + + + + /usr/bin/rar + + + + + + + + tar + + + + + + /bin/tar + + + + + + + + unace + + + + + + /usr/bin/unace + + + + + + + + unarj + + + + + + /usr/bin/unarj + + + + + + + + unrar + + + + + + /usr/bin/unrar + + + + + + + + unzip + + + + + + /usr/bin/unzip + + + + + + + + zip + + + + + + /usr/bin/zip + + + + + + + + + &krusader; may not be compatible with ACE despite our + best efforts. Unace uses closed source and contains + additional lines that make Unace get into infinite loop if + the stdin is redirected to somewhere else. It works in the + same manner as 'su', where you cannot enter the password only + from the stdin. &krusader; >= 1-51 + emulates the command line environment to enable co-operation + with Unace, but we have noticed that Unace always changes its + output format from release to release, making co-operation + almost impossible. + + + Checksum Utilities tab + + Here you can configure the full path of the following + external + Checksum Utilities: + + + + + Checksum Utilities + configurable full path + supported checksums + + + + + md5sum + + + + + + /usr/bin/md5sum + + + + + md5 + + + + + + sha1sum + + + + + + /usr/bin/sha1sum + + + + + sha1 + + + + + + md5deep + + + + + + /usr/bin/md5deep + + + + + md5 + + + + + + sha1deep + + + + + + /usr/bin/sha1deep + + + + + sha1 + + + + + + sha224sum + + + + + + /usr/bin/sha224sum + + + + + sha224 + + + + + + sha256sum + + + + + + /usr/bin/sha256sum + + + + + sha256 + + + + + + sha256deep + + + + + + /usr/bin/sha256deep + + + + + sha256 + + + + + + sha384sum + + + + + + /usr/bin/sha384sum + + + + + sha384 + + + + + + sha512sum + + + + + + /usr/bin/sha512sum + + + + + sha512 + + + + + + tigerdeep + + + + + + /usr/bin/tigerdeep + + + + + tiger + + + + + + whirlpooldeep + + + + + + /usr/bin/whirlpooldeep + + + + + whirlpool + + + + + + cfv + + + + + + /usr/bin/cfv + + + + + md5, sha1, sfv, crc + + + + + + + + UserActions + Here you can configure the terminal for UserActions and + the font for the output-collection. The default terminal is + konsole --noclose -e. To set up, configure + and manage your UserActions use ActionMan + (&useractions-lnk; url). + + + + + Protocols + This page links the mimes to protocols. ⪚ + protocol "tar" is linked to mime "application/x-tar". + + + In the + Defined Linksyou will see ⪚ + + + Iso + + + application/x-iso + + + + + krarc + + + application/x-ace + + + application/x-arj + + + application/x-bzip2 + + + application/x-cpio + + + application/x-deb + + + application/x-debian-package + + + application/x-gzip + + + application/x-jar + + + application/x-lha + + + application/x-rar + + + application/x-rpm + + + application/x-zip + + + + + tar + + + application/x-tar + + + application/x-tarz + + + application/x-tbz + + + application/x-tgz + + + + + +
diff --git a/doc/en/krusader-tools.docbook b/doc/en/krusader-tools.docbook new file mode 100644 index 0000000..70103b0 --- /dev/null +++ b/doc/en/krusader-tools.docbook @@ -0,0 +1,35 @@ + + +&krusader; Tools + + &bookmarks; + &diskusage; + &java; + &search; + &viewer-editor; + &locate; + &mount; + &remote-connections; + &synchronizer; + &krusader-useractions; + + diff --git a/doc/en/locate.docbook b/doc/en/locate.docbook new file mode 100644 index 0000000..f920707 --- /dev/null +++ b/doc/en/locate.docbook @@ -0,0 +1,114 @@ + + Locate &GUI; Frontend + + Locate + + &krusader; has a &GUI; front end for + the + locate command (findutils). Locate is used for + fast file searching not from a directory but a database. The + package contains two files, + locate and + updatedb. Updatedb goes through the local + file system and stores the file entries in the database. + cron often calls + updatedb every night (set with Kcron). Choose + + + Commands + Locate + + or + &Ctrl; + L to start this feature. + Konfigurator can set + additional arguments for + updatedb. + Checkbox Options + + + + Show only the existing files: if the + database contains entries which no longer exist any more + (deleted, moved since the last + updatedb), + locate does not list them. It checks the + existence of each file before the listing in the results + window (slow). + + + + Case Sensitive: unchecking it allows + lower and upper case search. + + + Action buttons + + + + Locate: executes + locate + foo foo and places its + output into the results window. + + + + Stop: stops the locating + process. + + + + UpdateDB: starts + updatedb for updating the locate database + after entering the root password. + + + + Close: closes the locate + window. + + + Results window + + + Double-click on an item: steps to its directory, makes + the item visible and closes the locate dialog. + + + Right click: edits/views/finds the menu. + + + + F3: views the current item. + + + + F4: edits the current item. + + + + &Ctrl; + f: finds files in the results + window. + + + + &Ctrl; + n: shows the next search + result. + + + + &Ctrl; + p: shows the previous search + result. + + + + + + The results window supports dragging items to other windows + and copy to clipboard (&Ctrl;c). + + + diff --git a/doc/en/more.docbook b/doc/en/more.docbook new file mode 100644 index 0000000..a5d097c --- /dev/null +++ b/doc/en/more.docbook @@ -0,0 +1,65 @@ + + +Advanced functions + +&vfs; + +&compare; + +&occupied-space; + +&splitter; + +&checksum; + + Send Files by e-mail + Select a file and use + + + Right-Click menu + Send by Email + + . Selecting this option will open a new + &kmail; window with the file already attached. Just + fill in the subject and recipient(s) and send it. Of course, + &kmail; must be properly configured. + + +&profiles; + + ACL permissions + + ACL permissions are fully + supported when using properties, preserve attributes and the + synchronizer. To view/modify the ACL permissions, select a file + and use the &context-menu-lnk;: + + + Properties + Permissions + Advanced permissions + + . At Copy/Move if + preserve attributes are selected, the ACL + permissions are also copied. The synchronizer keeps the ACL + permissions as well. + diff --git a/doc/en/mount.docbook b/doc/en/mount.docbook new file mode 100644 index 0000000..72b505d --- /dev/null +++ b/doc/en/mount.docbook @@ -0,0 +1,80 @@ + + MountMan: work with your mounted file systems + + Mount + + MountMan is a tool which helps you manage your mounted + file systems. Once invoked, it displays a list of every mounted + file system. For each file system, MountMan displays its name + (which is the actual device name - &ie; + /dev/fd0 for a + floppy), its type (vfat, ext3, ReiserFS ...) + and its mount point on your system (the directory on which the + file system is mounted). + +
+ MountMan + + + + + + MountMan + + +
+ MountMan also displays usage information using total size, + free size, and percentage of available space free. If those + numbers say + N/A, that usually means that the file system + is not mounted. Left clicking on a file system displays a pie chart + on the left of the window, graphically displaying the usage + information for the file system. Clicking on a non-mounted + file system will display + not mounted instead of the graph. + + + + Double-clicking on a file system will close + MountMan and open that file system inside + &krusader;'s active panel. + + + + Right-clicking on a file system will open a + small menu which displays what actions can be performed on + that file system. At the moment, you can only mount, unmount + and eject (if clicking on a removable file system, e.g., a + cdrom). + + + + We plan to expand MountMan in the next evolution of + &krusader;. It will be able to format floppies, edit + /etc/fstab, create new + file systems and more.... By the way, we have started working on + it, see "Quickmode for MountMan" + + + Quickmode for MountMan + + To activate Quickmode for MountMan, click and hold the + MountMan button on the &main-toolbar-lnk; + General idea: display a list of all possible mount points. + Each time the menu is displayed, it determines if a mount point is + mounted or not and associates the correct action (mount or + umount). This offers a quick interface to MountMan. It is + working, and currently uses KMountMan::mount and unmount. It uses + the new &kde; services for fstab-reading and this will + enable us to remove a lot of code from the "old" MountMan. +
diff --git a/doc/en/mouse.docbook b/doc/en/mouse.docbook new file mode 100644 index 0000000..9cfb6fb --- /dev/null +++ b/doc/en/mouse.docbook @@ -0,0 +1,45 @@ + + + Mouse Commands + + Commands + Mouse + + + Mouse Usage + In this chapter you will be guided in using + &krusader; effectively with a mouse and to configure + mouse gestures through KHotKeys. By simply clicking the mouse + you can select different sections of &krusader;. + Another chapter describes the selection modes, and how you can + configure them: + Selection Mode + + + + Mouse Gestures + We provide online a + + Mouse Gestures howto that explains how to use KHotKeys + mouse gestures with &krusader;. + + diff --git a/doc/en/occupied-space.docbook b/doc/en/occupied-space.docbook new file mode 100644 index 0000000..6d80921 --- /dev/null +++ b/doc/en/occupied-space.docbook @@ -0,0 +1,45 @@ + + Calculate Occupied Space + + Occupied Space + + + There are two ways to calculate the occupied space of + files/directories. + + + Pressing the + SPACE on a directory under the cursor + instantly calculates the occupied size. Pressing + SPACE a second time will toggle the selection + of the directory without affecting the selection status of + other files/directories. + + + To calculate how much disk space is occupied by the + selected files and directories in the active panel select + + + File + Calculate Occupied Space + + . After a small delay, a dialog box will be + displayed with total occupied space and the number of files + and directories you selected. The space occupied by every + selected directory will be shown as if the user just pressed + SPACE on those directories. If the active + panel is browsing an archive, the numbers will apply to the + unpacked size of the selected files and directories, not + their compressed size. After the calculation the selection + state will be toggled and the cursor will move one step + downwards. + + Calculating the occupied space on remote + file systems is supported. + + Performing this operation on a very large file system + (thousands of files) may be time-consuming. You can cancel the + calculation process at any time by clicking the + Cancel button. + + diff --git a/doc/en/profiles.docbook b/doc/en/profiles.docbook new file mode 100644 index 0000000..253502b --- /dev/null +++ b/doc/en/profiles.docbook @@ -0,0 +1,57 @@ + + Profiles + + Profiles + + With profiles you can save and restore your favorite + settings. Several features support profiles, you can have + ⪚ different panel profiles (work, home, remote + connections, &etc;), search profiles, synchroniser + profiles, &etc; + + Panel Profiles + A panel profile contains the following: all the tab + paths (left or right), the current tab (left of right) and the + active panel (left or right). All this information is stored in + the &krusaderrc-lnk; file. You can have several + panel profiles, ⪚ file management, FTP + management, home, work, &etc; The panel profile can + be + saved and restored in + the + Commands menu. The + default startup + profile will be used when starting &krusader;, but you can + override it with a + command-line + option. + + + Color Profiles + Colormaps can be saved and restored with + Color Profiles. + &krusader; Color maps are available at + &kde-files-url;. + + + Key-binding Profiles + Keymaps can be saved and restored with + Key-binding + Profiles. &krusader; Keymaps are available at + &kde-files-url;. + + + Search Profiles + If you regularly perform the same search operation, + you can save the search settings (⪚ include + files, exclude files, &etc;) in a + Search Profile. + + + Synchronizer Profiles + If you regularly perform the same synchronize + operation, you can save the synchronize settings in a + Synchronizer + Profile. + + diff --git a/doc/en/release-overview.docbook b/doc/en/release-overview.docbook new file mode 100644 index 0000000..2ffd4de --- /dev/null +++ b/doc/en/release-overview.docbook @@ -0,0 +1,647 @@ + + + Release overview + + Release overview + + This appendix gives an overview of the + &krusader; releases. + + Release overview + + + + + &krusader; version + + + release date + + + &kde; version + + + + + + + 2.00.0-beta1 "Phoenix" + + + 2008-??-?? under construction + + + &kde; 4 + + + + + 1.90.0 "Power Stone" + + + 2008-03-?? under construction + + + &kde; 3.2 - 3.5 + + + + + + 1.80.0 "Final 3rd Stone" + + + 2007-07-21 + + + &kde; 3.4 - 3.5 + + + + + + 1.80.0-beta2 "Last Unstable Stone" + + + + 2007-03-31 + + + &kde; 3.4 - 3.5 + + + + + + + 1.80.0-beta1 "The Last Krusade" + + + + 2007-01-07 + + + &kde; 3.4 - 3.5 + + + + + + + 1.70.1 "Round Robin" + + + + 2006-07-17 + + + &kde; 3.3 - 3.5 + + + + + + + 1.70.0 "Round Robin" + + + + 2006-02-12 + + + &kde; 3.3 - 3.5 + + + + + + + 1.70.0-beta2 "Afterburner" + + + + 2005-11-05 + + + &kde; 3.3 - 3.5 + + + + + + + 1.70.0-beta1 "Hellfire" + + + + 2005-10-02 + + + &kde; 3.3 - 3.5 + + + + + + + 1.60.1 + + + + 2005-10-30 + + + &kde; 3.3 - 3.4 + + + + + + + 1.60.0 + + + + 2005-04-10 + + + &kde; 3.3 - 3.4 + + + + + + + 1.60.0-beta2 + + + + 2005-03-21 + + + &kde; 3.3 - 3.4 + + + + + + + 1.60.0-beta1 + + + + 2005-03-03 + + + &kde; 3.3 - 3.4 + + + + + + + 1.51 + + + + 2004-12-14 + + + &kde; 3.2 - 3.3 + + + + + + 1.50 + + + 2004-10-31 + + + &kde; 3.2 - 3.3 + + + + + + 1.50-beta1 + + + 2004-10-17 + + + &kde; 3.2 - 3.3 + + + + + + 1.40 + + + 2004-07-20 + + + &kde; 3.2 + + + + + + 1.40-beta2 + + + 2004-06-22 + + + &kde; 3.2 + + + + + + 1.40-beta1 + + + 2004-04-11 + + + &kde; 3.2 + + + + + + 1.30 + + + 2003-11-14 + + + &kde; 3.0 - 3.2 + + + + + + 1.29-beta1 + + + 2003-10-02 + + + &kde; 3.0 - 3.2 + + + + + + 1.25-beta1 + + + 2003-08-15 + + + &kde; 3.0 - 3.2 + + + + + + 1.21-beta1 + + + 2003-07-18 + + + &kde; 3.0 - 3.2 + + + + + + 1.20 + + + 2003-05-31 + + + &kde; 3.0 - 3.2 + + + + + + 1.12-beta2 + + + 2003-05-09 + + + &kde; 3.0 - 3.2 + + + + + 1.12-beta1 + + + 2002-12-23 + + + &kde; 3.0 - 3.2 + + + + + + 1.11 + + + 2002-10-17 + + + &kde; 3.0 - 3.2 + + + + + + 1.10 + + + 2002-08-15 + + + &kde; 2 + + + + + + 1.02 (first KDE3 version) + + + 2002-04-16 + + + &kde; 3 + + + + + + 1.01 + + + 2002-04-01 + + + &kde; 2 + + + + + + 1.00 + + + 2002-01-01 + + + &kde; 2 + + + + + + 0.99 + + + 2001-12-01 + + + &kde; 2 + + + + + + 0.98 + + + 2001-10-27 + + + &kde; 2 + + + + + + 0.97 + + + 2001-10-08 + + + &kde; 2 + + + + + + 0.95 + + + 2001-07-22 + + + &kde; 2 + + + + + + 0.93 + + + 2001-05-31 + + + &kde; 2 + + + + + + 0.92 + + + 2001-05-17 + + + &kde; 2 + + + + + + 0.91 + + + 2001-05-10 + + + &kde; 2 + + + + + + 0.90 + + + 2001-04-30 + + + &kde; 2 + + + + + + 0.79 + + + 2001-02-25 + + + &kde; 2 + + + + + + 0.75 + + + 2000-01-12 + + + &kde; 2 + + + + + + 0.70 (milestone 3) + + + + 2000-11-07 + + + &kde; 2 + + + + + + 0.69 + + + + 2000-10-28 + + + &kde; 2 + + + + + + 0.65 + + + + 2000-08-19 + + + &kde; 2 + + + + + + 0.60 + + + 2000-07-19 + + + &kde; 2 + + + + + + M2 (milestone 2) + + + + 2000-07-11 + + + &kde; 2 + + + + + M1 (milestone 1) + + + 2000-05-?? + + + &kde; 2 (Kleopatra 1.91) + + + + + + Project began + + + 2000-04-30 + + + Kleopatra 1.91 + + + + +
+ Note: older 0.x beta releases are not included in this + table. +
diff --git a/doc/en/remote-connections.docbook b/doc/en/remote-connections.docbook new file mode 100644 index 0000000..5feb168 --- /dev/null +++ b/doc/en/remote-connections.docbook @@ -0,0 +1,267 @@ + + Remote Connections + + Remote Connections + + Remote connections are easily made by typing the + &URL; in the + Location Toolbar; these are + actually &kioslaves1-url;. Please note that the + &krusader; panel does not support all + &kioslaves2-url; ⪚ + http:// will not work in the panel, but will + work in the + viewer. Some examples: + + + + + ftp://public.ftpserver.org/directory/ + + + + + + + fish://username@hostname/ + + + + + + + sftp://username:password@sftp.foo.org/ + + + + + + + ftp://username@my.server.org:21/directory/ + + + + + + + smb://username:password@server/share + + + + + + + ftp://username@proxyusername:password@proxipassword@hostname/directory + + + + + + + nfs://<host>:<port><url-path> + + + + + + + webdav://www.server.com/path/ + + + + + You can bookmark these &URL;'s, however, please + read the + Bookman section regarding + securely save passwords. For connecting to + multiple locations, bookmark these &URL;'s and open + them one by one, or open them all together by using + &panel-profiles-lnk;. To switch from one to another + location, just open a &foldertabs-lnk; for + each. + There are three ways to start a remote connection: + + + Type the &URL; in the + Location Toolbar + + + Select + + + Commands + New Net Connection + + which will pop-up a dialog that will ask for the + remote site details. This dialog is handy if you are not used + to type remote &URL;'s in the Location Toolbar. + Leaving the password and user name fields empty will log you + in as anonymous. NOTE: we are planning to rewrite this dialog + window. + + + You can bookmark a directory on a remote host and + return to this directory from the bookmark button on the top + corner of your panel just like in a web browser. + + + After you log on to a remote server you can browse it just + like your local hard drive with the following exceptions: + + + You cannot execute files on remote servers. + + + Permissions cannot always be calculated on remote + servers (depends on server and access method) so you might + get a "?" on the permissions columns for some files. + + + Disk usage information is not available for most remote + filesystems. + + + To change the charset of the remote host use + + + Commands + Select Remote Charset + + . + You can + close the current Active Remote + Connection by two separate methods: + + + + Manually: Add the disconnect button to the + &main-toolbar-lnk; and click on it. + + + Automatically: Change the &URL; in the + &location-toolbar-lnk; . + + + + &krusader; is a file manager that supports + remote connections via &kioslaves1-url;, but if you + are looking for even more advanced remote connections features, + ⪚ an advanced &FTP;-client we + recommend you to use ⪚ + &kasablanca-url; or + &kftpgrabber-url;. + + + + LAN connections via fish:/ protocol (zeroconf) + + Remote LAN Connections (zeroconf) + + +This section is contributed by + Andrew Svet (z-vet), + feedback about this chapter is appriciated. Thanks! + + + This works on a &debian; system, so it will work on &debian; and derivatives (&kubuntu; &etc;), though + it should work on other Linuxes as well. + We assume that you have SSH installed, configured and working on + every machine on LAN you want to connect to/from. + There are plenty of very good tutorials about SSH on the net, ⪚ + at linuxhomenetworking.com + or just google for it. We use the default SSH port (22) for this chapter. + Remember to change it if you use different one. All modifications, editing &etc; must be done as root. + + + + +Let's start with installing all the packages we need: + +# apt-get install + + +Everything is installed, now let's do some configuration. First, we need our services to be announced on LAN. +That's why we installed avahi-daemon: it represents your machine on local network and allows other applications +to publish services they provide. Avahi-daemon comes with example ssh.service configuration +file found in /usr/share/doc/avahi-daemon/examples . In order to get the service to be +announced on LAN we need to copy this file to /etc/avahi/services directory: + +# cp + + +Now we need fish:/ protocol to be announced too, so we use an ssh.service file as a template for fish.service: + +# cp + + +This file is just a copy of ssh.service, Edit the fish.service file and replace +"Remote Terminal on %h" with "Fish to %h" and "_ssh._tcp" with "_fish._tcp". + +Here's how it looks after edit: + +<?xml version="1.0" standalone='no'?><!--*-nxml-*--> +<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> + +<!-- $Id: remote-connections.docbook,v 1.6 2007/05/02 18:07:28 codeknight Exp $ --> + +<!-- + This file is part of avahi. + + avahi is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + avahi is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR + +<!-- See avahi.service(5) for more information about this configuration file --> + +<service-group> + + <name replace-wildcards="yes">FISH to %h</name> + + <service> + <type>_fish._tcp</type> + <port>22</port> + </service> + +</service-group> + +Save the modified file. + +Now we need to create a new file _fish._tcp, open a text editor and add the next lines: + +Name=FISH Protocol (ssh) +Type=_fish._tcp +UserEntry=u +PathEntry=path +PasswordEntry=p + +And save the file /usr/share/apps/zeroconf/_fish._tcp + +Do the same on each machine on your LAN, then restart avahi-daemon: + +# /etc/init.d/ avahi-daemon + + +Than open &krusader; and type in location-toolbar-lnk: zeroconf:/ to open the +zeroconf connection. +Enter the Fish Protocol directory. Inside you'll find the links to each machine that +announced fish:/ on your LAN, the location-toolbar-lnk: will point to +zeroconf:/_fish._tcp Double clicking on any of these machines, +them will bring up the password prompt, asking you for yor ssh key passphrase (if password was set). +Enter your passphrase. Congratulations: you connected to remote machine using &krusader;! + + + + + + + diff --git a/doc/en/search.docbook b/doc/en/search.docbook new file mode 100644 index 0000000..8a9d087 --- /dev/null +++ b/doc/en/search.docbook @@ -0,0 +1,328 @@ + + KruSearcher: find what you are looking for + + Search + + Welcome to &krusader;'s powerful search module - + nicknamed KruSearcher. It is the most able tool (that we know of) + for &Linux;, since it allows so many different ways to + quickly find the file you are looking for. The search function is + also available on remote file systems. It is divided into two + levels, the general and the advanced. Let's take a look at the + general page. + +
+ General Search + + + + + + General Search + + +
+ The page is divided into four parts: top (search for) part, + bottom part - titled 'containing text', left part - titled + 'search in' and right part which is called 'don't search in'. + Obviously, each part handles different aspects of the search. + Let's look at them closely. + + Top Part: + + + Search for: here you enter the main + search criteria. You can enter a file name, a wildcard ( + *.o.*, + *.c &etc;) or + both - separated by a space. If you type + 'text' the results is the same as + '*text*'. You can exclude files from the + search with '|' (⪚ + '*.cpp *.h | + *.moc.cpp') . You can use quotation marks for names + that contain spaces. Filter "Program Files" searches + out those files/directories the name of which is Program + Files. + + + + Case sensitive: unchecking it will allow + lower and upper case search (&ie;: + *.c interprets as + *.c AND + *.C). + + + + Of type: this box lets you search for a + file not only by its name, but also by its mime type. For + example, you can search for all the audio files whose name + begins with B. Usually this option defaults to 'all files', + but you can choose to search for archives, directories, + images, text files, videos and audio files. + + + + Left and Right Part: + + + Search in and + Don't search in: Using those two parts, + you can specify a search exactly the way you want it. For + example, you might want to search for a file in the whole + file system (beginning with + /), but do not want to search inside + /mnt. All you need to do is write + / in the + search in box, and write + /mnt in the + dont search in box. If you want to enter + more than one directory in one of the boxes, just type the + first name and press &Enter;. The directory name + will be copied to the bigger box and youwill be able to enter + another name. + + The input line has an auto-completion feature, + corresponding to &kde; global settings. If you + wish, you can click on the + folder icon, and browse to the directory + you wish to add. + + + + + Bottom Part: + + + Text: entering text here makes + &krusader; search for it inside the files ( + grep). This way you can search for all + header files ( + *.h) which include the + word + 'testing 123'. + + + + Match whole word only + + + + + Case sensitive: refers to your text + being searched for in upper and lower case or the exact + phrase you entered. + + + + Search in subdirectories: perform a + recursive search and dive into every directory on the + way. + + + + Search in archives: + &krusader; will search for your files inside every + supported archive. This, however, takes longer to perform. + + If you check this checkbox, youwill notice you cannot + grep inside files anymore. This is done, + since looking inside archived files forces + &krusader; to extract them, which results in an + extremely time-consuming search. + + + + + Follow links: if checked, + &krusader; will follow soft-links during the + search. + + + + Profiles: if you have to regularly + perform the same search operation, you can save the search + settings ⪚ include files, exclude files, + etc.... Press the 'profile' button, and you can + add/load/save/remove search profiles. + + + The above screen shot shows a search for all the files which + end with + c, cpp or + h and include the string + 'testing 123'. &krusader; will + search in + /root, /opt, /bin and + /usr, but not in + /usr/lib and + /usr/share. + Clicking the + Search button starts the search and + displays the results page. During the search, you may press the + Stop button to stop the search. The + Close button is not operational during a + search, so you must first stop the search and then + Close the window. When a result is found, + double-clicking on it will take &krusader;'s active + panel point to the found files - but will not close the search + window, so you will be able to click on a different result. + Sometimes, you need to narrow your search even more. + Krusearcher allows a much finer search, and for that, let's look + at the + Advanced Page... + +
+ Advanced Search + + + + + + Advanced Search + + +
+ This screen shot shows a search for files whose size is + between 10KB and 150KB, which were modified between October 10th + and November 1st, which belong to any user in the 'users' group, + and are readable and writable by anyone in the 'users' group, but + only readable to the rest of the world. + The advanced page is divided into three parts: size, date + and ownership. + + Size + + Allows you to choose the size range of the file you are + looking for. By checking the check boxes, you can search for a + file which is bigger than XXX bytes (or KB, MB), smaller than XXX + bytes or, by checking both search for a file which size is bigger + than XXX but smaller than YYY. + + Date + + This part offers three different ways of defining a date + criteria: + + + + Modified between: allows you to enter + two dates. &krusader; will search for files with a + modification date between the first date and the second one, + inclusive. If you only enter a date in the left box, you will + be searching for files older than that date. If you only + enter a date in the right box, you will be searching for files + newer than that date. + + You can click on the date icon (near the input boxes) + to open a standard date window - which allows you to easily + browse through the calendar and search for the desired + date. Clicking on a date will close the window and the date + will appear in the input box. + + + + + Not modified after: choosing this option + makes &krusader; search for files that were NOT + modified after a given date, which is the same as searching + for files older than that date. + + + + Modified in the last/not modified in the + last: in these input boxes, you do not enter a date + but a number. This number represents days/weeks/months (as + chosen in the near drop box). Entering the number 5 in the + upper input box, makes &krusader; search for files + that were modified in the last 5 days. Entering the number 2 + in the lower input box makes &krusader; search for + files that did NOT change in the last 2 days. The combination + of both results in a search for files that were changed in + the last 5 days, but NOT in the last 2 days. + + + + Ownership + + + + + Belongs to user/group: by checking each + of the corresponding check boxes, you can search for files + which belong to a certain user and/or group. The drop box + lists all the user names and group names in the system, just + choose one and go ahead. + + + + Permissions: divided into owner, group + and all - it allows you to choose certain permissions for the + file. You can choose to specify permissions for the owner, + group, all or any combination. The question mark (?) is a + wildcard - which means that any permission is valid. + + + + To clarify, the screen shot above (the permissions part) + describes a search for files that belong to any user in group + 'users', are readable, writable but not executable to any user + in the group, are readable but not writable or executable to + the rest of the world and have unknown permissions to its + owner. + + + Results + + Clicking on the + Search button to start the search and open + the Results window. Here you can see the progress and the the + results of the search action. If you want you can stop the + current search action with the + Stopbutton. In the result list select the + file and use + F3/ + F4 to view/edit or use the right-click menu. When + you click on a found item, the directory of the active panel will + change if the selected item is not in the current panel + directory. The results window supports dragging items to other windows + and copy to clipboard (&Ctrl;c). + When you close the Krusearcher window, the selected + item is selected in the active panel. + + Feed to listbox + + When you click the + Feed to listbox button after the results + are displayed, then &krusader; ask for a Query Name, + this name will be used in the Results-Tab in the List Panel that + holds the search results. You can do whatever you want on the + files in the new tab. The location toolbar will display + ⪚ + virt:/Search results 1. + + The files in the Results-Tab are actually the original + files. if you delete a file - it is removed! + +
diff --git a/doc/en/splitter.docbook b/doc/en/splitter.docbook new file mode 100644 index 0000000..d554230 --- /dev/null +++ b/doc/en/splitter.docbook @@ -0,0 +1,61 @@ + + File Splitter + + File Splitter + + This function splits one (large) file up into multiple + smaller files so that they can be placed on smaller media + (⪚ zip-drives, ...) or sent by e-mail. The multiple + files can be combined again to recreate the original file. + &krusader; and &tcmd; split/combine + functions are compatible. To split a file choose + + + File + Split + + or + &Ctrl; + P A Split dialog will open to confirm + the operation. + If the name of the original file is + foo, then the name of the smaller files will + be + foo.000 foo.001 foo.002 &etc; + There is no theoretical limit in the number of smaller files, but + it is recommended to limit the number to a maximum of 1023 files. + &krusader; creates a + foo.crc file. This file contains the name, + size and the crc checksum of the original file. It is possible to + combine the file without the + foo.crc file but in this case + &krusader; cannot check if the the original file was + recreated correctly. + An example of a + foo.crc file: + filename=foo size=432998467868 crc32=21EB719A + To combine the multiple files choose, select a partial file + + foo.xxx and choose + + + File + Combine files + + or + &Ctrl; + B. The target directory is the + unactive panel and can be changed. The file names must be + numbered in ascending order: + foo.001, foo.002, foo.003 &etc; or + have letters in ascending order: (" + + split + + letter method") + fileaa, fileab, fileac &etc; If + the file + foo.crc is found in the same directory as the + partial files, &krusader; will use this file to check + the combined file for errors. + diff --git a/doc/en/synchronizer.docbook b/doc/en/synchronizer.docbook new file mode 100644 index 0000000..c0f58f2 --- /dev/null +++ b/doc/en/synchronizer.docbook @@ -0,0 +1,730 @@ + + Synchronizer + + Synchronizer + + + + Introduction + This function compares two directories with all subdirectories and shows the differences between them. + After selecting some options and the + Compare function you can synchronize the + files and directories. One panel could be an &FTP; + server. Do not forget the + Compare by content option if the file size + stays equal. Choose + + + Commands + Synchronize Directories + + or + &Ctrl; + Y to start this feature. The + colors are + configurable. + + For local files: The synchronizer changes the date + information to the original dates. + + +
+ Synchronizer + + + + + + Synchronizer + + +
+ + + Procedure: + + Set the + Left directory and the + Right directory that you want to compare. + + + Configure the optional + File Filter, + General Filters and + Advanced filters. The + General Filters includes a + don't search in option which lets you + exclude directories from comparision. + + + Set the + Checkbox + options: + Recurse subdirectories, + Follow symlinks, + Compare by content, + Ignore Date, + Asymmetric, + Ignore Case and + Hidden hidden files. + + + + Click on the + Compare button to compare the + directories. + + + By using + Show options, + you can include/exclude particular file types. The files that + are not on the list will be untouched by + synchronization. + + + If needed, you can change the + Task operations determined by the + Comparator with the + right click + menu. + + + When you agree with the + Compare results, click on the + Synchronize button to show the + synchronize dialog. + + + After selecting the options of the + Synchronizer, click on + the + Start button to start the + synchronization process. + + A detailed explanation of all the functions and + buttons is described in the following text. + +
+ + + Comparator + + + + Panel elements + + + + + Left Directory: The left side base + directory. + + + + Right Directory: The right side + base directory. + + + + File Filter: Filters the filenames + at synchronizing. ⪚ + *.png selects only + files the names of which end with + .png Directories are + listed if the directory name ends with + .png or if the + directory contains files which end with + .png Multiple + include/exclude example: + '*.cpp *.h | + *.moc.cpp'includes + *.cpp *.h and + exclude + *.moc.cpp + + + + General filters: Search for, + containing text + + + + Advanced filters: Size, date, + ownership + + + + + + + + Filename filtering criteria + + + + You can make use of wild cards. Multiple patterns + are separated by space (means logical OR) and patterns + are excluded from the search using the pipe symbol. If + the pattern is ended with a slash (*pattern*/), it + means that pattern relates to recursive search of + directories. + + + pattern - means to search those files/directories + whose name is a pattern, recursive search goes through + all subdirectories independently of the value of the + pattern. + + + pattern/ - means to search all files/directories, + but recursive search goes through/excludes the + directories whose name is a pattern. + + + You can use quotation marks for names + that contain spaces. Filter "Program Files" searches + out those files/directories the name of which is Program + Files. + + + Examples: + + + + *.o + + + + + *.h *.c?? + + + + + *.cpp *.h | + *.moc.cpp + + + + + * | CVS/ .svn/ + + + + Note: the search term 'text' is equivalent to + '*text*'. + + + + + + Checkbox options + + + + + Recurse subdirectories: The + Synchronizer walks through subdirectories when + comparing. + + + + Follow symlinks: The Synchronizer + follows the symbolic links to directories (not the + files!). + + + + Compare by content: The files + the sizes of which are equal will be compared by content as + well. + + + + Ignore Date: Ignores the date + information (useful for &FTP;, smb, archive, + ... ) the date information is relevant *only* in the + local file system. + + + + Asymmetric: The + Left Directory is the target + directory, the + Right Directory is the source + directory. This functions synchronizes the content of + the left directory to the right directory. + + + The files that exist only on the left side + will be deleted. + + + The files that exist only on the right side + will be copied to left. + + + The files considered to be equal will be + untouched. + + + Those files considered to be different will + be copied to left. Use this feature with + care! + + This function is useful if the date + information is unusable, or to synchronize the left + directory to the content of a file server (like a + download). Alternatively, it is useful to make a backup + from the right directory to the left directory. NOTE: + Do NOT use this option to synchronize a desktop and a + notebook (⪚ files that exist only on the + left side will be deleted!). + + + + Automatic Scrolling: This is for + slow &FTP; servers, ... When the + Synchronizer has finished comparing a file, it puts the + file into the end of the list at once and scrolls the + window, if necessary. It is important, if you want to + know what the Synchronizer is doing. If the + &FTP; server is slow, the comparison of a + directory may take a lot of time. By turning this + option on, you can see that the comparator is "alive", + but slow. For fast file systems, it can reduce the + speed of comparing slightly. + + + + Ignore Case: Case insensitive filename compare, + this is useful when synchronizing &Windows; filesystems. + + + + Ignore hidden files: Ignores files that start with a dot. + + + + + + When everything mentioned above is done, click on the + Compare button to compare the directories, + the results are displayed in the File List. + + + File List + + The + File List has the following columns: + "Left name | Left size | Left time | Task | Right time | + Right size | Right name". + Here you can check the compare results and modify the synchronisation actions if desired. + The text color defines the default copy direction determined by the comparator. + + + Green: Copy from left to right. + + + Blue: Copy from right to left or delete on the right side in asymmetric mode. + + + Red: Files which are different by the given criteria (no copy direction). + + + Black: Files which are identical (no copy direction). + + + A double click on a file calls the &krusader;s Compare by content function. + The Tasks (<=>) column defines the default copy direction, which can be modified by the user if needed. + The results window supports dragging items to other windows ( drag [left], SHIFT+drag [right] ) + and copy left/right selected items to clipboard (&Ctrl;c). + + + + + File List: Tasks (<=>) column + + This column displays the task that is planned for the + Synchronizer, this task can be modified with the + right click menu. + + + + ->: Copy from the + left side to the right side. For directories: + mkdir in the right side. + + + + =: The files are the same, do not + do anything. + + + + !=: The file is excluded, or the + Synchronizer does not know what to do. + + + + <-: copy from the + right side to the left side. For directories: + mkdir in the left side + + + + DEL: delete files from the right + side. + + + + + + Show options + + Here you can include/exclude particular file types. + Those files, that are not in the list, will be untouched at + synchronization. + + + + ->: Enable/Disable + the copy task from left to right. + + + + =: Enable/Disable listing the + equal files. + + + + !=: Enable/Disable listing the + excluded / "don't know what to do" files. + + + + <-: Enable/Disable + the copy task from right to left. + + + + Trash: Enable/Disable the file + deleting from the left side task. + + + + Duplicates: Enable/Disable those + files that exist on both sides. + + + + Singles: Enable/Disable those + files that exist only on one side. + + + + + + Action buttons + + + + + Compare: Compares the + directories, the results are displayed on the + File List. + + + + Stop: Stops comparing. + + + + Synchronize: Shows the + synchronize dialog. + + + + Close: Closes the Synchronizer + window. + + + + + + The Status line may contain + + + + The number of scanned directories while + comparing. + + + The filename when comparing by content (for big + files). + + + The number of files on the list. + + + + + + Right click menu on the + File List + + The right click menu is split up in three + sections: + 1. change the + Task operations determined by the + Comparator. Select one or multiple files. The change will + be applied on the selection and not only on the right + clicked item. If the selected item is a directory, the + change will be applied on its files/subdirectories as + well. + + + + Synchronize Directories: Starts + synchronization. + + + + Exclude: Excludes a file/dir + from synchronization ( task change to != ). + + + + Restore original operation: Task + change to the original result of comparison. + + + + Reverse direction: Task change ( + -> to <-, and + <- to -> ). + + + + Copy from right to left: Task + change to <-. + + + + Copy from left to right: Task + change to ->. + + + + Delete ( left single ): Task + change to DEL. + + + 2. change the selections + + + + Select items: Opens a dialog + which allows you to select items. This is the + Select Group dialog from the + &editmenu-lnk;. + + + + Unselect items: Opens a dialog + which allows you to deselect items. This is the + Unselect Group dialog from + the &editmenu-lnk;. + + + + Invert selection: Invert the + selection status of all items. + + + 3. others (note that the following operations work on the + right-clicked file and not on the selection). + + + + View left file: Starts viewer on + the left file. + + + + View right file: Starts viewer + on the right file. + + + + Compare Files: Starts the diff + utility (⪚ &kompare;) on the + files. + + + + + + Other buttons + + + + + Profiles: If you have to + synchronize the same directories often, you can save the + settings ⪚ include files, exclude files, + ... Press the + Profile button, and you will be + able to add / load / save / remove synchronizer + profiles. + + + + Swap sides: Swaps the + File List. + + + + + + Synchronize with &kget; + + If you want to synchronize a local directory with an + unstable ftp server, &kget; is a much better + solution than simple file copying. After comparing you may + right click on the result list and select + Synchronize with kget to execute + the synchronization, after that the listed files will be + downloaded with kget instead of krusader. Of course + kget needs to be installed on + your computer; otherwise, it will not be available. + + + + + + + Sychronisation + + After pressing the + Synchronize button the synchronization + dialog appears. + + + Check boxes + + Here you confirm the copy and delete operations of + the Synchronizer + + + + Right to left: copy X1 files ( Y1 + bytes ) enable / disable the copy from right to + left. + + + + Left to right: copy X2 files ( Y2 + bytes ) enable / disable the copy from left to + right. + + + + Left: delete X3 files ( Y3 bytes ) + enable / disable the left side deleting. + + + + Confirm overwrites: By switching + this option on, Krusader will show the + rename, skip, overwrite, skip all, overwrite + all dialog box, before overwriting the + file. + + + + + + Status labels + + + + + Ready: A1/A2 files, B1/B2. This + line is changed at synchronizing, showing that + synchronizer finished with A1 files from A2 ( B1 bytes + from B2 ). + + + + Progress bar: Shows the progress + on the synchronization (based on bytes). + + + + + + Action buttons + + + + + Start: Starts + synchronization. + + + + Pause / Resume: Pauses/resumes + the synchronization process. + + + + Close: Closes the + synchronization dialog (and stops + synchronization). + + + + + + Parallel synchronization + + + + One can give the number of the 'quasy' + threads. + + + Can drastically increase the speed when + synchronized with slow FTP servers. + + + Does not affect the speed of local + synchronization. + + + Remote "compare by content" and "directory + compare" is done in parallel. + + + Remote synchronization is also done in parallel, + except the mkdir tasks (mkdir must be before + copy). + + + + + + + +
diff --git a/doc/en/user-interface.docbook b/doc/en/user-interface.docbook new file mode 100644 index 0000000..c2eccab --- /dev/null +++ b/doc/en/user-interface.docbook @@ -0,0 +1,863 @@ + + User Interface + + User Interface + + + OFM User Interface + The OFM file manager concept contains + many features that make them + powerful enough to belong among the best file managers today. + The interface is simple: left panel, right panel and a command + line below. Because of interaction between these three items + the file managing will become more efficient. + If you would like to know + + how &krusader; works you can try it yourself, + just install it on your computer. To accept an + &ofm-url; like &krusader;, the user needs + to get used to + new ideas that are actually already 20 + years old. If you prefer to waste time and lose a lot of + productivity, you can always continue to use one panel file + managers that are based on &Windows; + Explorer. + + + &krusader; Main Window + +
+ &krusader; Main Window + + + + + + &krusader; Main Window + + +
+ The User Interface is based on &ofm-url; + paradigm, a 20- year old principle that has proven its bones. + It is known as simple, easy and powerful. In the following + sections we will cover the basic functions of each part with the + exception of: + + + The + Menu Bar which has a + chapter of its own. + + + The + Bookmarks which has a chapter + of its own. + + + The + Status Bar shows the + properties of the current file (that is being) in focus. + You can use "drag and drop" to drop a &URL; + "into" the Status Bar. + + +
+ + Toolbars + &krusader; comes with several Toolbars. + + Main Toolbar + + Toolbar + Main Toolbar + + +
+ Main Toolbar + + + + + + Main Toolbar + + +
+ The &krusader; Main Toolbar, is a standard + &kde; toolbar that can be dragged around the + application or configured via a + Right-Click menu. You can decide whether or + not you want to display it each time you start + &krusader; in the &konfigstartpg-lnk;, + and you can toggle its use in the current session in the + &viewmenu-lnk;. The Main Toolbar contents can be + configured from the + Configure Toolbars in the + &settingsmenu-lnk; or the + Toolbar tab in the + &konfiglookandfeel-lnk;. Since various commands + and options in &krusader; are context-dependent, + some commands are not always available. The icon of an + inappropriate or inactive action will be deactivated + (grayed-out) disabling its use. &bookmarks-lnk; + can be placed into the Main Toolbar and the Actions Toolbar + with the mouse using "drag and drop". +
+ + Actions Toolbar + + Toolbar + Actions Toolbar + + &useractions-lnk; and + &bookmarks-lnk; can be "plugged" into the + Actions Toolbar. To show it, use + + + View + Show Actions Toolbar + + . To add user actions, use + + + Settings + Configure Toolbars + + and select Actions Toolbar. You can, for example, + drag the Actions Toolbar to the right side using the + mouse. + + + Location Toolbar + + Toolbar + Location Toolbar + + Below the + Main Toolbar there is a + Location Toolbar for each panel. It + shows the path the panel is currently pointing to. If the + selected path is too long, it will be automatically shortened + and an ellipsis "..." will replace the omitted part of the + path name. When entering archives the path will be displayed + in the following format: "archive + name:/directory/archive_filename/the directory inside the + archive". This format makes the paths uniform and easy to + read. The + Location Toolbar supports also + &kioslaves1-url; but not all of them, some can + only be used with the + viewer and some can not be + used. The user can enter a desired path by clicking on it. + + + + + /mnt/cdrom/ + + + + + + + settings:/ + will browse and open entries of the + KDE control center. + + + + + devices:/ + gives an overview of the devices + ⪚ + floppy or + CD-ROM drives. + + + + + trash:/ + opens &kde; is trash. + + + + + ipod:/ + uses the &kio-ipodslave-url; to + access, upload and organize the music stored on + &appleipod;. + + + And last but not least + &remote-connections-lnk; . + + You can copy-paste a &URL; in the + Location Toolbar or use a middle click. + With the Right-Click menu you can configure the auto-complete + function. An optional + Clear Location Toolbar button is also + available. + Quick Navigation: + &Ctrl;point with mouse in the + middle of &URL; of the + Location Toolbar. A pop-up window shows + the next &URL; location. Pressing + &Ctrl;+ &LMB; shows + the location where the mouse was pointing to. This feature + allows faster navigation in a big directory tree. + + + Panel Toolbar + + Toolbar + Panel Toolbar + + Each panel has a + configurable Panel + Toolbar. The complete Panel Toolbar or specific + buttons can be made visible or be hidden. + + + + OpenDir Button: opens the + directory browser. + + + + Equals Button (=): changes the + panel directory to the other panel directory. + + + + Up Button (..): changes the panel + directory to the parent directory. + + + + Home Button (~): changes the panel + directory to the home directory. + + + + Root Button (/): changes the panel + directory to the root directory. + + + + Sync-browsing Button: when active, + each directory change in the specific panel is performed + in the other panel as well. + + + +
+ + Panels + The &krusader; panels are where most of the + action takes place. Currently, there are two types of panels: + + + &list-panel-lnk;: shows the files and + directories. + + + &popup-panel-lnk;: has several display + modes: Preview, Tree, Quickselect, View and Disk Usage for + the file or directory that has the focus. The PopUp Panel + may be left open or closed, as desired. + + &krusader; is a "twin-panel" file + manager so there are two panels: the "Left" panel and the + "Right" panel, or a more important logical distinction, the + *Active* panel and the *Inactive* panel. The active panel is + the one that will accept your mouse and keyboard input. If you + choose a command from the + Menu-Bar or + Toolbar the command will act upon the + selected files/directories in the active panel. You can switch + between panels using the key or by clicking on + the + Information or Totals labels, or by + selecting any file in a panel with the mouse. As always, + default startup settings can be modified with the + &konfigstartpg-lnk;, and you control the current + session with the &viewmenu-lnk;. + +
+ List Panel + + + + + + List Panel + + +
+ + List Panel + + Panel + List Panel + + This is the default panel and the one you will probably + use most of the time. This panel shows the contents of one + directory which can be local (part of your mounted file + systems, either a native file or the files inside an archive) + or remote files (accessed via &FTP; or Samba). + There are two modes: Detailed View that shows the file names, + file size, creation date and time and their attributes. + And Brief View that shows only the file names, + the number of brief columns can be changed, by right clicking on the Name header. + File copy/paste/cut via clipboard between + &konqueror; and &krusader; + &Ctrl; + c, + &Ctrl; + v, + &Ctrl; + x is supported. + &Alt;&Ctrl; + r toggles the + List Panel between horizontal and + vertical mode. + The following items are available: + + + + + Information Label + : shows how much free space is physically + available on the file system, the file system capacity + and where the path is mounted. If the information is not + available (most often in the case of remote file system) + a message will be displayed with the reason for + unavailablity instead of the information. + The + Media button on the left of the + Information Label displays a list of + all available media, where you can select the desired + media (hdd partition, dvd, usb-stick, &etc;). + The context menu gives several options like + Mount, + Open in a new tab, &etc; + The + Media button is + + configurable. + + + + + Column Headers + : here you can change the sort order of the + files and directories as desired. The default sort order + is by + Name. The sort order can be + instantly changed by clicking on one of the + Column Headers. To reverse the sort + order, click a second time on the Column Header. An arrow + will appear on the right of the Column Header text, + showing the sort direction (Up arrow = A to Z sorting, + Down arrow = Z to A sorting). Default + &useractions-lnk; set a keybinding for the + Column Headers. The default + Column Headers are: + Name, Ext, Size, Modified, rwx. + Predefined Atomic extensions like + tar.gz are shown as one part in the + Ext Column. More + optional Column + Headers are available with the &RMB;. + The width + Column Headers can be changed with + the mouse by single clicking and moving the divider line + to the desired width (keep the mouse button pressed). + Both + List Panels remember the sort order + and column width. The + Column Headers can be changed and + saved individually to each panel. + + + + + File List + : displays the files and directories in the + browsed directory. The &quick-search-lnk; + allows you to search for files by typing their names, or + the first few characters of a file name. Pressing + &Enter; or double clicking on a file will + open/execute that file. You can select/unselect files + using the mouse with the + Insert key or the + &editmenu-lnk;. + + + + + Totals Label + : selecting or deselecting files will change + the + + Totals Label + at the bottom of the panel, which displays how + many files you have selected (and how much total disk space + they use) as well as the total file and disk usage of the + current directory (as opposed to the information label + that displays information for the whole file system). If + a directory contains a lot of subdirectories, it may not + be possible to drop the &URL; onto the panel (on + which only directories are visible), but the + &URL; can be dropped onto the "Status Bar" or + "Totals Label" instead. When a + custom filter is set, it + will show the setting, example: [*.cpp]. + + When using the "&kde; default + colors", then the + selected files are shown in blue and the current file is + surrounded by a fine-lined rectangle. By default an icon is + shown according to the file type. Use + &konfiglookandfeel-lnk; to change the default + configuration to meet your individual needs. + Some useful + List panel&keybindigs-lnk;: + + + + &Ctrl; + r will refresh the + panel. + + + Focus a file or directory on the left panel, press + &Ctrl; + Left arrow and the right panel + changes: + + + On a file: the right panel gets the same path + as the left panel. + + + On a directory: refreshes the right panel with + the contents of the directory. + + + + + For the right panel: press + &Ctrl; + Right arrow and the left panel + will change. + + + + + PopUp Panel + + Panel + PopUp Panel (3rd Panel) + + This is "&krusader; is 3rd Hand" or the 3rd + Panel, click on the arrow-up button on the left of the + Totals Label or + &Alt; + Down-Arrow to open the + PopUp Panel. This panel has several + display modes which can be activated by clicking on the + appropriate button. + + + + + Preview Panel + : gives a preview of the file that has the + focus (currently selected file). + + + + + Tree Panel + : is used to quickly browse the local + directory tree. This panel behaves like the list panel + but only one directory may be selected at a time and + double clicking or pressing &Enter; on a + directory will open that directory in the active panel. + The panels fully support drag and drop (copy, move, link) + mouse actions. + + + + + Quickselect Panel + : is used to quickly select files, + ⪚ + *.pngand click on the + + "Go" button. The "floppy" button + stores the current selection. The "select group dialog" + is also available. + + + + + Viewer Panel + : views a text file, views an image, + &etc; A thumbnail view is generated whenever + you open the + Viewer Panel and click on a name of a + folder that contains pictures. + + + + + Disk Usage Panel + : views the &diskusage-lnk; of a + directory. + + If needed you can resize the window + ⪚ to better display a picture or view a file is + contents. Click on the arrow down button to close the + 3rd Hand Panel. + + + Folder History + Both panels remember recently visited folders. Click on + the + "Folder history" button ("watch" + symbol) to open the folder history list. Here you can quickly + change to previously visited folders. The currently focused + folder is checked. On every new start of &krusader;, the + history list is empty. + +
+ + Command Line / Terminal Emulator + This part of the GUI + can have four modes: Command Line, Terminal Emulator, show both and show none. + You can choose your mode of operation either on start-up with the + &konfigstartpg-lnk;, or for the current session with the &viewmenu-lnk; . + + + + Command Line + + +
+ Command Line + + + + + + Command line + + +
+ The traditional command line mode offers a single line of + input to enter commands, it also features three buttons: + + + "command history" (down arrow) to quick open previous used commands + + + + + "Useraction expander" (green plus button) to add easy + Useraction placeholders + + + + + "run in terminal mode" (console icon) button with the next options: + + Start and Forget + + + Display Separated Standard and Error Output + + + Display Mixed Standard and Error Output + + + Start in New Terminal + + + Send to Embedded Terminal Emulator + + + + + + + + + + When you start typing your commands, + the command line auto-completion feature will make its offers + according to what you choose in the + &kcontrolcenter;. If you want to change the way + auto-complete behaves in the current &krusader; + session, + right click on the command line and change it. + To the left of the input line you can find the local path that + the active panel is currently pointing to. This path is where + your command will be executed. Typing + + cd + + <directory> + in the command line will also cause the active + panel to point to this directory. + + Click + here to view the + command line keybindings. +
+ + + Terminal Emulator + + +
+ Terminal Emulator + + + + + + Terminal emulator + + +
+ The terminal emulator mode is in fact a small console and + acts like one. You can change the active directory in the + terminal by using the + + cd + command. The terminal emulator will follow the + active panel directory. When you drag a file from the + "List Panel", you will get to choose + between: "Paste", + cd, + mv and + ln. If you drag multiple files, then + cd will not be available. A full-screen + terminal emulator can be used when + configured or + &Ctrl; + f toggles between normal and full + screen mode. If the command line is hidden, press + &Ctrl; + up to focus the terminal emulator. + &Ctrl; + down brings you back down. + &Ctrl; + Enter and + &Ctrl; + Shift + Enter paste the filename. You can + close the emulator by typing + + exit + . + + Click + here to view the + Terminal emulator keybindings.. +
+ +
+ + Function (FN) Keys Bar + +
+ Function (FN) Keys Bar + + + + + + Function (FN) Keys Bar + + +
+ This bar gets its name from the function (FN) keys it + represents. For each button on this bar there is a + corresponding function key that performs the same action. This + bar is derived from the design of the first twin-panel file + managers and the FN keys usually act the same way with two + changes: the + F2 key will open a terminal at the last local + path that the active panel pointed to, and the + F9 key is used to rename files. + Mkdir + F7 can create whole directory trees on the fly + ⪚ + foo/bar/test. You can choose to display + or not the + FN keys bar when starting up + &krusader; via the &konfigstartpg-lnk;, + and you can toggle its use in the current session with the + &viewmenu-lnk;. The actions and + &keybindigs-lnk; performed by the function keys are + configurable since version 1.51, they will remain active with + or without the + FN keys bar displayed. +
+ + Folder Tabs + +
+ Folder Tabs + + + + + + Folder Tabs + + +
+ With &folder-tabs; you can quickly change to + multiple folders; each panel has its own + &folder-tabs;. The &folder-tabs; + positions are saved when closing &krusader;. To + switch between &folder-tabs;, click them with the + mouse. Squeezed &folder-tabs; have tooltips to + display the full path. The following &folder-tabs; + operations are available: + + + To + open a new tab and keep the current + directory: &right-click; on a directory and + select + open in a new tab, or use the + &MMB;, or use + &Alt;&Ctrl; + n. + + + To + duplicate a tab: &right-click; + on the Folder Tab and select + duplicate tab, or use + + &Alt;&Ctrl;&Shift; + n. + + + To + close a tab (except the left tab): + &right-click; on the tab and select + close tab, or use the &MMB;, or + use the Folder tab + "red cross" button, or use + &Alt;&Ctrl; + c. + + + To create a + "home" tab: click on the + Folder Tab Bookmark button. + + + To + change tabs: + &Shift; + Left Arrow or + &Shift; + Right Arrow. + + + To open the current folder in a new tab: use + + &Ctrl;&Alt;&Enter;. + + +
+ + Buttons + Several buttons for fast operations are available: + Main Toolbar, + Actions Toolbar, + Panel Toolbar, + Location Toolbar, + Media, + Folder history, + Bookmarks, + Tab, + Commandline, + Function keys. + +
diff --git a/doc/en/useraction-xml.docbook b/doc/en/useraction-xml.docbook new file mode 100644 index 0000000..c2676a1 --- /dev/null +++ b/doc/en/useraction-xml.docbook @@ -0,0 +1,217 @@ + + + useraction.xml + This appendix gives several examples of + useraction.xml files. With this you can begin + to discover the power of the &useractions-lnk; and + start learning how to use them. Once you understand how to write + UserActions you will find that &krusader; is an even + more powerful, customizable tool. + Please consider uploading your UserActions at + &kde-files-url; as we are collecting them. If your + UserAction is selected by us it will be shipped with + &krusader; at the next release. We provide also an + &useractionsforum-url;. + + + Runs uptime + +<!DOCTYPE KrusaderUserActions> + <KrusaderUserActions> + <action name="uptime" > + <title>Up-time</title> + <tooltip>tells how long since the computer has been booted</tooltip> + <icon>clock</icon> + <category>information</category> + <description same_as="tooltip" /> + <command executionmode="collect_output" >uptime</command> + <defaultshortcut>Alt+Ctrl+U</defaultshortcut> + </action> +</KrusaderUserActions> + + + Runs ls -l + +<!DOCTYPE KrusaderUserActions> + <KrusaderUserActions> + <action name="ls -l" > + <title>ls -l in curremt dir</title> + <description same_as="tooltip" /> + <command executionmode="collect_output" >ls -l %aPath% %oPath%</command> + </action> +</KrusaderUserActions> + + + Echo Placeholder + +<!DOCTYPE KrusaderUserActions> + <KrusaderUserActions> + <action name="test_placeholder" > + <title>Echo Placeholder</title> + <tooltip>Echo's the placeholder values</tooltip> + <category>Testing</category> + <description same_as="tooltip" /> + <command executionmode="collect_output" onmultiplefiles="call_each" >echo -e "aPath %aPath()% \naCurrent: %aCurrent()%"</command> + </action> +</KrusaderUserActions> + + + This useraction copies current path and filename to clipboard: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="clipboard current" > + <title>Copy to Clipboard</title> + <tooltip>Copy to clipboard</tooltip> + <icon>klipper</icon> + <category>System</category> + <description>Copy current path and filename to clipboard</description> + <command>%_Clipboard("%aCurrent%")%</command> + <defaultshortcut>Win+C</defaultshortcut> + </action> +</KrusaderUserActions> + + + Selects .diff and *.h in the active panel: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="test_select" > + <title>Add selection *.diff and *.h</title> + <category>Selection</category> + <command>%aSelect("*.diff", "add")% %aSelect("*.h", "add")%</command> + </action> +</KrusaderUserActions> + + + Active panel changes to mnt/floppy (bookmark): + +<!DOCTYPE KrusaderUserActions> +<action name="mnt/floppy bookmark" > + <title>Jump to /mnt/floppy</title> + <category>Bookmarks</category> + <command>%aGoto("/mnt/floppy", "yes")%</command> + </action> +</KrusaderUserActions> + + + Select in the non-active panel, all filenames that are highlighted in the active panel: + +<!DOCTYPE KrusaderUserActions> + <action name="asdfasdf" > + <title>Select in Other Panel</title> + <category>Selection</category> + <description>Select all filenames that are selected in the active panel, also in the non-active panel</description> + <command>%oSelect("%aList("selected", " ", "Yes")%")%</command> + </action> +</KrusaderUserActions + + + Make a backup of the current file/folder to foo.bak into the current directory: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="backup current" > + <title>Backup in Current Directory</title> + <tooltip>Backup in current directory</tooltip> + <icon>filesaveas</icon> + <category>System</category> + <description same_as="tooltip" /> + <command>%_Copy("%aCurrent%", "%_Ask("new name", "%aCurrent%.bak")")%</command> + <defaultshortcut>Shift+F5</defaultshortcut> + </action> +</KrusaderUserActions> + + + Opens KruSearcher: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="search" > + <title>Search Test</title> + <command>%_NewSearch("Search 2")%</command> + </action> +</KrusaderUserActions> + + + Sets the selected picture as wallpaper: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="set wallpaper" > + <title>Set as Wallpaper</title> + <tooltip>Set as wallpaper</tooltip> + <icon>image</icon> + <category>Service Menu</category> + <description>Set as wallpaper (scaled)</description> + <command>dcop kdesktop KBackgroundIface setWallpaper "%aCurrent%" 6</command> + <defaultshortcut>Win+W</defaultshortcut> + </action> +</KrusaderUserActions> + + + This useraction edits a file with root permissions using kdesu: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="edit as root" > + <title>Edit as Root</title> + <tooltip>Edit as root</tooltip> + <icon>kwrite</icon> + <category>System</category> + <description>Edit a file with root permissions using kdesu</description> + <command>kdesu kedit %aCurrent%</command> + <defaultshortcut>Win+F4</defaultshortcut> + </action> +</KrusaderUserActions> + + + This useraction Add item(s) to Amarok playlist: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="amarok enqueue" > + <title>Enqueue in Amarok</title> + <tooltip>Append selected item(s) to Amarok playlist</tooltip> + <icon>amarok</icon> + <category>Multimedia</category> + <description same_as="tooltip" /> + <command>amarok --append %aList("Selected")%</command> + <defaultshortcut>Win+A</defaultshortcut> + </action> +</KrusaderUserActions> + + + Opens Synchronizer: + +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="synchronizer" > + <title>Synchronizer</title> + <command>%_Sync("Sync 2")%</command> + </action> +</KrusaderUserActions> + + + + + diff --git a/doc/en/useractions.docbook b/doc/en/useractions.docbook new file mode 100644 index 0000000..2c3b5fd --- /dev/null +++ b/doc/en/useractions.docbook @@ -0,0 +1,644 @@ + + + UserActions + + UserActions + + + With ActionMan you can set up, configure and manage + UserActions. Some general settings are configured with + Konfigurator. With + UserActions you can perform actions on files in the panel or to + access &krusader; internal functions with parameters + directly using placeholders. The actions integrate seamlessly + into &kde;'s action system, which means that the + standard Edit Toolbar and Edit Shortcut dialogs will show + UserActions, too. The UserActions are stored in + + ~/.kde/share/apps/krusader/useraction.xml (the file + structure is documentated in doxygen headers of UserActionXML). + Several + examples are included in the + documentation. UserActions can be edited / added / imported / + exported by using ActionMan. The default UserActions are stored + in + + ~/.kde/share/apps/krusader/useraction-examples.xml. + UserActions can appear nearly everywhere where "normal" KActions + can be placed. The actions integrate seamlessly into + &kde; action system, which means that the standard + Edit Toolbar and Edit Shortcut dialogs will show UserActions, + too. They can even be placed in the menu bar, but for that the + krusaderui.rc file must be edited. A few + examples: + + + + Useractions Menu + + + + &usermenu-lnk; + + + &actions-toolbar-lnk; + + + right click menus + + + &etc; + + &krusader;'s UserActions tool is very + powerful and customizable if you are familiar with writing + UserActions in general. + + Several UserActions are provided by default. Please + upload your favorite + UserActions so that they become available for the + &krusader; community. Thanks! We provide also an + &useractionsforum-url;. + +
+ ActionMan + + + + + + ActionMan + + +
+ Basically, UserActions are a method to call external + programs with variable parameters. For example, you could have a + UserAction with the following + xmms + to + enqueue all selected items of the active panel to the current + instance of xmms. Additionally, there is limited access to + &krusader; internal functions requiring parameters. + For example, + %aPanelSize("80")% will set the width of the + active panel to 80% of the &krusader; mainwindow. + Since the parameter of placeholders can contain other + placeholders, few scripts are possible. However, scripting can be + done with the &javascript-console-lnk;. + + Managing UserActions + + Open Konfigurator and choose "UserActions -> + ActionMan", in which you can add, edit, remove, import and export + UserActions. + + + + Add Action: If you add an new + action, you get an empty input mask where you can enter all + the properties you desire. The action will be added as soon + as you press + Ok. Afterwards, the name is shown + in the list on the left. + + + To edit a UserAction: Select the UserAction on the + left. Then choose it if you want to edit its properties. The + changes will only take effect when you press + OK. + + + + To remove a UserAction: Select the + UserAction on the left and click the remove button. + + + + To import a UserAction: If you + import some actions, they will be automatically added to your + list. If there are name conflicts (the names have to be + unique because these are the ID for &kde;'s action + system), you are asked to resolve them. For this, the list on + the left will only show the actions where conflicts exist. + You can now give them new names or remove them. + + + + Export Action: If you export a + UserAction you have to give a filename in which to store it. + If it does not exist, it will be created. If the file already + contains UserActions, the action you are exporting will be + added to that file. + + All actions you have defined are now shown in the + user menu and in &kde; dialogs for changing shortcuts + and managing the toolbar. In addition, all actions available for + the current item will also show up in the right click + menu. + + + Basic Properties + + + + "Distinct Name", "Title" and "Command + line"are always required, all the other properties + are optional. + + + + "Distinct Name": A unique name of + the UserAction, used to identify it for &kde;'s + action system. + + + + "Icon button": The icon for your + UserAction. + + + + "Category": Adds a category for a + better overview. NOTE: This property is not used yet. It is + planned to be used, but has not implemented yet. + + + + "Title": The title displayed in + the menus or dialogs. + + + + "Tooltip": A tooltip for your + UserAction, ⪚ displayed in the toolbar on + mouseover. + + + + "Description": A description of + what the UserAction does. This is also displayed as + "What's This" if you + &Shift; + F1 click on your + UserAction. + + + + "Use Tooltip checkbox": Uses the + tooltip as description. + + + + "Command line": The command which + will be executed. You can add placeholder using a GUI with + the + add button. + + + + "Startpath": The working directory + for the command which will be executed. + + + + "Execution mode": + + + + "Normal": Normal execution + mode. + + + + "Run in terminal": Runs the + command in the terminal. + + + + "Collect output": Collects the + output of the executed program in a &GUI; + window. + + + + "Separate standard error": + When "Collect output" is used the stdout and stderr are + separately collected. + + + + + + "Command accepts": + + + + "Local files (no URLs)": Tells + the placeholder it should return local addresses. + + + + "URLs (local and remote)": + Tells the placeholder it should return + &URL;s. + + + + + + + "Shortcut button": Configures a + shortcut for the UserAction. + + + + Command-line syntax: + + Basically, everything you type in the command line will get + executed (if you type "ls -l", "ls -l" gets executed). You have + the possiblity to get a character string from + &krusader; which represents the current state of the + panel. This is done using placeholders. A placeholder begins with + a percent-sign ('%') and is followed by a panel indicator ('a' + for the active, 'o' for the other, 'l' for the left and 'r' for + the right panel. If the placeholder doesn't need a panel to + operate on, you have to indicate this by an underscore ('_')). + Then comes the name of the placeholder (see the list below), + which may get some parameters enclosed in quotes. Finally, again + the percent sign. + This sounds very complicated, so let's make an example: + '%aList("Selected")%' is replaced by a list of all selected items + in the active panel. So a command like 'xmms --enqueue + %aList("All", " ", "", "*.mp3")%' will execute xmms with a list + of all .mp3s in the current panel, separated by a single + blank. + Currently, these placeholders are implemented: + + + + Path - replaced by the panels + path + + + &useraction-optional-parameter; + Automatic escape spaces. &useraction-default; + yes + + + + + + Count - replaced by the number of + <first parameter> + + + &useraction-parameter; Which items; + either "All", "Selected", "Files" or "Dirs" + + + + + + Filter - replaced by the panel's filter + mask + + + + Current - replaced by the current + item + + + &useraction-optional-parameter; Omit the + current path. &useraction-default; no + + + &useraction-optional-parameter; + Automatic escape spaces. &useraction-default; + yes + + + + + + List - replaced by a list of all + <first parameter> + + + &useraction-parameter; Which items; + either "All", "Selected", "Files" or "Dirs" + + + &useraction-optional-parameter; + Separator between the items. + &useraction-default; + " " + + + &useraction-optional-parameter; Omit the + current path. &useraction-default; no + + + &useraction-optional-parameter; + Filtermask (for all but "Selected"). + &useraction-default; * + + + &useraction-optional-parameter; + Automatic escape spaces. &useraction-default; + yes + + + + + + Select - manipulates the selection in a + panel + + + &useraction-parameter; Filtermask + + + &useraction-optional-parameter; + manipulate in which way; either "Set", "Add" or "Remove". + &useraction-default; "Set" + + + + + + Goto - changes the panels' path to + <first parameter> + + + &useraction-parameter; A relative or + absolute path, or an URL + + + &useraction-optional-parameter; Open the + location in a new tab. &useraction-default; + no + + + + + + Ask - asks the user for some text and + is replaced by the answer + + + &useraction-parameter; The + Question + + + &useraction-optional-parameter; A + default answer + + + &useraction-optional-parameter; A + caption for the question box + + + + + + Clipboard - manipulates the + clipboard + + + &useraction-parameter; The text that + should go to the clipboard (you may want to use + "%aCurrent%" here) + + + &useraction-optional-parameter; Append + the text to the current content of the clipboard with + this separator + + + + + + Copy - copies a file, useful for quick, + local backups + + + &useraction-parameter; What should be + copied + + + &useraction-parameter; Where it should + be copied + + + + + + Sync - opens the Synchronizer with a + given profile + + + &useraction-parameter; A profile for the + Synchronizer + + + + + + NewSearch - opens the search windows + with a given profile + + + &useraction-parameter; A profile for the + search module + + + + + + Profile - loads a given panel + profile + + + &useraction-parameter; A panel + profile + + + + + + Each - splits the commandline into a + list. These commands are executed one after another. + + + &useraction-parameter; A list item (all, + all files, all dirs, all selected). + + + + + + Move - move from source to + destination. + + + &useraction-parameter; A source + + + &useraction-parameter; A + destination + + + + + + PanelSize - change the ratio between + the two panels. + + + &useraction-optional-parameter; A + integer value, e.g., 80 makes the active panel use 80% of + &krusader;'s width (height in vertical mode), + omitting the parameter means 50%. + + + + + + Ask - cancel the execution. + + + &useraction-optional-parameter; A string + for the cancel question. + + + + + + Script - executes an external + + Javascript file. + NOTE: This is still experimental and the interface may + change, feedback is always welcome. + + + &useraction-parameter; path to the + external foo.js file, absolute path or relative to + + <kde-app-data>/krusader/js/. + <kde-app-data> is + $(kde-config + --localprefix)/share/apps/ or + $(kde-config --prefix)/share/apps/, + for those who don't know where to copy the + scripts/extensions. If all the needed files (normally + .js and maybe + .ui) are in one of these dirs it's + sufficient to give the file name only as 1. + parameter. + + + &useraction-optional-parameter; a list + of variables which should be set, like "return=cmd; + a=lalala; b='%_Ask(..)'" so that the placeholder is + replaced be the content of the variable cmd and the other + two have already these values when the script + starts. + + + + + + ListFile - is replaced by path/file name + of a temporary file containing a list of items + + + &useraction-parameter; + path/filename + + + + + + ColSort - set the sorting on a column + of a specific panel. + + + &useraction-parameter; Column: Either + "Name", "Ext", "Type", "Size", "Modified", "Perms", + "rwx", "Owner" and "Group" + + + &useraction-parameter; Sort sequence: + Either "Toggle", "Asc", "Desc" + + + + + + View - set the view mode. + + + &useraction-parameter; View mode: Either + "generic", "text", "hex" + + + &useraction-parameter; Window Mode: + Either "tab", "window" + + + + A GUI-based helper for placeholder adding is + provided. Spaces In Path, Current and List are by default, + automatically escaped. There is one more important thing to know: + All placeholders that interact with &krusader; + internal functions are called at expand time (meaning directly + when the placeholders are replaced). External programs are + called at execution time (meaning after all placeholders are + replaced). + + + Advanced Properties + + + Here you can configure where your command should be visible + (for the right click menu) In addition, it is possible to change + the command executed and confirm it separately. You can also set + a user under which the command should be executed. + + + Configures if the action is valid for a Protocol, Path, + Mime type or File name. + + + Tweaking the command line before being executed. + + + Set a different user for the execution (this has no + effect in &krusader; internal functions) + + +
diff --git a/doc/en/using-krusader.docbook b/doc/en/using-krusader.docbook new file mode 100644 index 0000000..f19d719 --- /dev/null +++ b/doc/en/using-krusader.docbook @@ -0,0 +1,426 @@ + + + Basic Functions + + Controls + + General + This is a rather short but important section that will + go into the details of controlling &krusader;. + This section does not try to cover all the various key + combinations for two reasons: + + + there are just too many of them + + + most of &krusader; actions are + configurable in the + &konfiglookandfeel-lnk; + + We will only mention the most important + keyboard shortcuts with the default configuration, but keep + in mind that most of the &keybindigs-lnk; are + configurable. If you find that you use a certain command a + lot and want to know the shortcut for this command, or you + want to change this command shortcut, then check out the + &keybindigs-lnk; tab at the + &konfiglookandfeel-lnk;. + + + Moving Around + By Moving Around we mean the transfer of the keyboard + and mouse focus between the different parts of the + &krusader; + main window. The focus can + be in one of five places: the Left or Right Panel, the Menu + Bar, the Command Line or the Terminal Emulator. The panel + that has the focus is called the Active Panel. An Active + Panel will remain active until the other panel receives the + focus (&ie;: if the Left Panel was active and you + clicked on the Command Line - then the Left Panel remains the + Active Panel). You must deliberately change which panel is + active. + The most common way to transfer the focus to a specific + panel is to use the mouse to click on that panel. But you + should be aware of the following: + + + Clicking on the Toolbar, the FN keys bar or the + Status Bar does *not* change the focus. + + + + Pushing the + "History" or the + "Run in Terminal" buttons in the + Command Line will not transfer the focus, so you have to + click inside the Input Line. + + + When you choose a menu, the Menu Bar will become + focused. It remains focused until you choose a command - + the focus returns to the previous owner. + + + There are, of course, ways to use the keyboard to + change the focus: + + + The Key will switch panels, if one + of the panels has the focus or rotate between all the + commands in a menu, if the Menu Bar is active. + + + The + &Ctrl; + Down Arrow will take you from + the Active Panel to the Command Line or Terminal + Emulator, and the + &Ctrl; + Up Arrow will take you back + from the Command Line to the Active Panel. + + + The &Esc; Key will make the Menu Bar + return the focus, if it has it, to the previous Active + Panel. + + + If you happen to be inside the Terminal Emulator, + you can use the Key, or the mouse, to + navigate to an Active Panel. + + + Pressing + &Alt; + "Underlined Letter" from the + Menu Bar will open that menu (unless this key combination + is a "Reserved Key", used by one of + &krusader;'s actions). + + + + + Selecting + + &krusader; offers 4 + &mouse-selection-modes-lnk;, only + &krusader;'s Mouse Selection Mode is explained + here. + + Selecting is a skill you need to master in order to get + the most out of &krusader;. Since you can not select + files in the Quick View Panel, and the Tree Panel only lets + you select one directory at a time, this paragraph mainly + explains how to select files in the List Panel + filelist. + Moving the cursor is easy. Left-clicking on a file or + directory (referred to herein as "elements" meaning files AND + directories) will select it. Here are some useful pointers + that will make &krusader; even easier to use (assuming you are + using &krusader;'s Mouse Selection Mode): + + + The + SPACE and + Insert key will toggle the selection of + the file under the cursor without affecting the selection + of other files/directories, the cursor will go one + position down. + + + Pressing the + SPACE on a Directory under the cursor + will + calculate occupied + space without affecting the selection of other + files/directories. + + + + Left Clicking on a file will select, or + unselect, all previously selected files. + + + + &Ctrl; + Left Clicking will toggle the + selection of the file under the cursor without affecting + the selection of other files/directories. + + + + &Shift; + Left Clicking will select all + the elements between the previous cursor location and the + new one. + + + + &Shift; + Home selects everything above + the cursor (and deselects everything below the cursor, if + selected). + + + + &Shift; + End selects everything below + the cursor (and unselects everything above the cursor, if + selected). + + + The ".." entry is not selectable. + + + The &editmenu-lnk; can offer more ways + to select your files. + + + + + Executing Commands + There is not a lot to say here, all you need to do is + select some files (if you do not, &krusader; will + operate on the file(s) or directory(s) that have the focus), + choose a + Command from the Menu Bar + or use a Keyboard Shortcut (or the Right Click Menu) and the + selected Command executes. See also + Executing + Files. + + + Quicksearch + + This feature will do a quick search for the file name + in the Active List Panel. + Type + foo(one character) to do a quick search in + the Active List Panel for a file beginning with "foo". A + small quick search dialog box will open below the Active List + Panel. Type the first few characters of the desired file name + (more than one character allowed), the cursor will jump to + that filename (if it exists), ⪚ type "ab" to + search for a file which begins with "ab". The + Up/Down Arrowwill jump to the next or + previous match. &Esc; will close the quick search + line. The cursor will stay on the last file + found. + + If you press + &Alt; + foo, the key binding shortcut + will be executed. If there is no configured key binding, + the remaining letter + foowill be used for the quick + search. + + Use &konfiglookandfeel-lnk; to change from + the default configuration. + + + Context Menu + &krusader; has many Context menus that allow + you to do fast operations with the mouse, usually a + right-click will open the Context menu (depending on your + &mouse-selection-modes-lnk; settings). This list + gives an overview of the most important context menus. Use + them to discover the available commands. + + + &main-toolbar-lnk; (orientation, text + position, icon size) + + + &list-panel-lnk; on a file or + directory + + + &cmdline-lnk; (undo, paste, text + completion...) + + + &termemu-lnk; (send signal, font, + history...) + + + &foldertabs-lnk; (new, duplicate, + close) + + + + KruSearcher Search + results file list (F3 View, F4 Edit) + + + &mountman-lnk; (unmount, + format...) + + + &syncdirs-lnk; File List + + + &useractions-lnk; + + + &konqueror; Right-Click actions are + shown in &krusader; + + + Show/hide + Column Headers + + + &bookmarks-lnk; enable/disable permanent + bookmarks + + + ... + + + + + + Basic File Management + + Executing Files + You can only execute files in the Active List Panel. To + execute a file just + (double-)click on it or press Enter when it + is under the list cursor. &krusader; will open it + in the default application for this file type (picture, + text file...) or the file will be executed (script, + binary...). If you want to use + another application to open the file, + Right-Click on the file and go to the "open + with" sub-menu which will offer more options. + &krusader; is compatible with &kde; + default file manager for all file types except archives that + are opened inside the &krusader; panel and not in + an external application. See + the archives page in + Konfiguratorfor details. + + + Copying and Moving + To copy or move files/directories just select them and + press + F5to + copyor + F6to + movethem. If the + Preserve attributes (only on local + targets) option is checked, + &krusader; will try to preserve all attributes + (time, owner, group) of the local files according to the + source depending on your permissions: + + + User preserving if you are root + + + Group preserving if you are root or member of the + group + + + Preserving the timestamp + + Using this option may slow down the copy/move + process. A dialog will appear and allow you to choose the + operation destination. The default destination is the + other-panel browsed directory. If you enter a partial + &URL;, &krusader; will use the current + panel directory as the &URL; base. + + + Deleting + Deleting files/directories is done by selecting them + and pressing + F8 or + Delete. By + defaultit will be moved + to &kde;'s Trash, + &Shift; + Delete will delete the file + permanently. A dialog will ask for your confirmation and will + warn you when deleting non-empty directories. Of course only + operations that you are permitted to do by the Operating + System will be performed - you will be notified otherwise. If + you do not wish to see the confirmation dialogs, you can + disable them in the + Konfigurator advanced + tab. + + + Shred Files + When you delete files in your local system, they are + not completely erased and the information stored in them can + be recovered using special software and hardware tools. If + you want to erase a file without recoverable traces, select + the file and use + + + Right-Click menu + Shred + + . + + + Renaming Files, Creating Directories and Link + Handling + + Rename the file under the cursor with the + F9 key or with two single mouse clicks. If + only the file name needs to be renamed and not the extension, + you can configure this in the + &konfiglookandfeel-lnk;. + Create a new directory with the + F7 key. + Right-clicking on a regular file will give + you the + option "New Symlink". A dialog will prompt + you to enter a symlink name. That name will point to the + file/directory you Right-Clicked on. If the file you + Right-Clicked on is a symlink, you will also be presented + with the "redirect link" option that will allow you to change + the link target. + + + Viewing and Editing files + + KrViewer has a chapter of its + own. + + + + +&archives; + + diff --git a/doc/en/vfs.docbook b/doc/en/vfs.docbook new file mode 100644 index 0000000..8acb910 --- /dev/null +++ b/doc/en/vfs.docbook @@ -0,0 +1,83 @@ + + Virtual file systems (VFS) + + VFS + + A basic + OFM feature is VFS, this an + abstracted layer over all kinds of archived information (ZIP + files, FTP servers, TAR archives, NFS filesystems, SAMBA shares, + ISO cd/dvd images, RPM catalogs, etc.), which allows the user to + access all the information in these divergent types of + filesystems transparently - just like entering an ordinary + sub-directory. &krusader; supports several virtual + file systems: + + + + Remote connections + VFS: provides the capability of working with a remote + connection session (FTP, NFS, Samba, FISH, SFTP) like with + local filesystems. It is perfect for complex remote operations + and almost as powerful as most standalone GUI remote + clients. + + + + Archive VFS: allows to browse + archives in VFS as it was a directory (ace, arj, bzip2, deb, + gzip, iso, lha, rar, rpm, tar, zip and 7-zip). + + + + Search VFS: + Feed to listbox places the search + results in VFS. + + + + Synchronizer VFS: places + the synchronizer results in VFS. + + Actions you perform on the files in VFS are + performed on the 'real' files. You do not just delete files from + the VFS - you delete them from your hard drive. Limitations: you + ca not create directories inside a VFS. + It is possible to keep the directory structure when doing a + from copy from a virtual folder to a non virtual folder, by + selecting the "Keep virtual directory structure" check box of the + copy dialog. Imagine the following virtual folder: + $ file:/home/myhome/mydir1/myfile1 + $ file:/home/myhome/mydir1/myfile2 + $ file:/home/myhome/mydir2/myfile3 + Then do the following steps: + + + go to the virtual folder and select the files + + + select a destination folder (non virtual!) + + + press + F5-> copy dialog + appears + + + Check + Keep virtual directory structure + + + Select + /home/myhome/ for base + &URL; + + + Start copy by pressing OK + + The result will be: + $ destinationdir/mydir1/myfile1 + $ destinationdir/mydir1/myfile2 + $ destinationdir/mydir2/myfile3 + + diff --git a/doc/en/viewer-editor.docbook b/doc/en/viewer-editor.docbook new file mode 100644 index 0000000..b9a845a --- /dev/null +++ b/doc/en/viewer-editor.docbook @@ -0,0 +1,1127 @@ + + KrViewer: &krusader;'s internal + viewer-editor + + Viewer + Editor + + Pressing &Enter; on a selected file + opens the file with the associated + application. The editor-viewer is tabbed, configure it + on the &konfiggereral-lnk; + + Viewer + To view a file as fast as possible according to its type, + just put it under the cursor and press + F3. &krusader;'s internal viewer is + actually a part of &konqueror;, which can basically + view every file type viewable by &konqueror; + (⪚ display pictures, play music, show the content + of an archive). This is called the 'Generic viewer', for which + you need to configure the mime types. + The viewer works as follows: + + + It tries to view the file with the + 'Generic viewer'. + + + When the file type (mime type) cannot be determined or + when a file (⪚ a binary) doesn't have an + associated action, it disables the 'generic viewer'. The + file is treated as a text file, which is the + 'Text viewer'. + + + The user can change in the + KrViewer + menu between: 'Generic viewer' (if available), 'Text + viewer' and + 'Hex viewer'. + + You can configure the default viewer mode on the + &konfiggereral-lnk; . + + &Shift; + F3views a &URL; on + demand, ⪚: + + + + + man:/ + views the manpages. + + + + + man:/ + krusader + views a manpage. + + + + + info:/ + views the infopages. + + + + + http:// + krusader.sourceforce.net/ + views a webpage. + + + + + ftp:// + ftp.kde.org/pub/kde/ + views a ftp-server. + + + + + sftp:// + sftp.foo/ + views a secure ftp-server. + + + + + file:/ + home/frank + views the homedirectory of Frank. + + + + + /home/frank/archive.tar.gz + views a + tar.gz archive. + + + KrViewer can have the following menus: + File, + Edit, + View, + Settings and + Krviewer, depending + on which file type is viewed. They will be discussed in the + Editor section. The internal + viewer can follow links on HTML pages. With + &Ctrl; + E the viewer can start + &krusader;'s internal editor (which is basically the + same application). + + The embedded viewer is not written by us, it is + supplied via &kde; (libs) and + &kioslaves1-url; We cannot and do not want to + change it, usings these libraries reduces the amount of + written code. So we do not have to reinvent the wheel + ;-) + + + + Editor + + Editor + + &krusader;'s internal editor has almost + everything that you can expect of an editor. Editing is similar + to viewing but with the + F4 key. The default editor is + &krusader;'s internal editor. You can change the + default editor in the &konfiggereral-lnk;, if you + prefer to use an external editor. + + When you use &krusader;'s internal editor + for the first time, it is recommended to look at each section + of the + Settingsmenu, and + configure it the way you want it. + + + + Menu overview + Most of the menus are quite self-explanatory. ;-) + + + + <guimenu>File</guimenu>menu + + + + + &Ctrl; + S + + File + Save + + + + Save file. + + + + + + File + Save As + + + + Save file with another name. + + + + + + + F5 + + File + Reload + + + + Reload file. + + + + + + File + Export + + + + Export the file to + HTML format. + + + + + + + &Ctrl; + P + + File + Print + + + + Print the file. + + + + + + + <guimenu>Edit</guimenu> menu + + + + + &Ctrl; + Z + + Edit + Undo + + + + Undo last action. + + + + + + + + &Ctrl;&Shift; + Z + + Edit + Redo + + + + Redo last action. + + + + + + + &Ctrl; + X + + Edit + Cut + + + + Cut selected text to clipboard. + + + + + + + &Ctrl; + C + + Edit + Copy + + + + Copy selected text to clipboard. + + + + + + + &Ctrl; + V + + Edit + Paste + + + + Paste clipboard content to the document. + + + + + + + &Ctrl; + A + + Edit + Select All + + + + Select whole document. + + + + + + + + &Ctrl;&Shift; + A + + Edit + Deselect + + + + Deselect current selection. + + + + + + + + &Ctrl;&Shift; + B + + Edit + Block Selection Mode + + + + Toggle Block Selection, which will + activate/deactivate the block selection + possibility. + + + + + + + Insert + + Edit + Overwrite Mode + + + + Toggle Insert/Overwrite Mode. + + + + + + + &Ctrl; + F + + Edit + Find + + + + Find text. + + + + + + + + F3 + + + Edit + Find Next + + + + Find next text. + + + + + + + &Shift; + F3 + + Edit + Find Previous + + + + Find previous text. + + + + + + + &Ctrl; + R + + Edit + Replace + + + + Replace text. + + + + + + + &Ctrl; + G + + Edit + Go to line + + + + Go to given line number. + + + + + + + <guimenu>View</guimenu>menu + + + + + F7 + + View + Switch to Command Line. + + + + Display Command Line. + + + + + + + View + Schema. + + + + Set Schema ⪚ &krusader; + Normal, &krusader; Printing, &kate; + Normal, &kwrite; Normal. + + + + + + + + F10 + + View + Dynamic Word Wrap + + + + Go to the next line at the maximum number of + characters per line (default 80). + + + + + + View + Dynamic Word Wrap Indicators + + + + Off, Follow Line Numbers, Always On. + + + + + + View + Shows Static Word Wrap + marker + + + + + + + + + + + + F6 + + View + Show Icon Border + + + + Shows Icon Border. + + + + + + + + F11 + + View + Show Line Numbers + + + + Shows the line numbers. + + + + + + View + Show Scrollbar Marks. + + + + + + + + + + + F9 + + View + Hide Folding Markers + + + + + + + + + + + View + Code Folding. + + + + + + + + + + + View + Set Encoding + + + + ⪚ ISO8859-1, utf8, utf16, tscii, ... + . + + + + + + + <guimenu>Bookmarks</guimenu>menu + + + + + + &Ctrl; + B + + Bookmark + Set Bookmark + + + + + + + + + + Bookmark + Clear All Bookmarks + + + + + + + + + + + + <guimenu>Tools</guimenu>menu + + + + Tools + Read Only Mode + + + + + + + + + + Tools + Filetype Mode + + + + + + + + + + Tools + Highlight mode + + + + Highlight mode for scripts, programming languages, + markup file, &etc;: ⪚ + HTML, Bash, C++, XML, Makefile, + Diff, .... + + + + + + Tools + End of Line + + + + Change the end of Line termination: + &UNIX;, &Windows;/DOS, + + Macintosh. + + + + + + + &Ctrl; + I + + Tools + Indent + + + + + + + + + + + + + &Ctrl;&Shift; + I + + Tools + Unindent + + + + + + + + + + + Tools + Clean Indentation + + + + + + + + + + + + &Ctrl; + D + + Tools + Comment + + + + Add appropriate comment tags, if available. + + + + + + + + &Ctrl;&Shift; + D + + Tools + Uncomment + + + + Removes the comment tags on the left. + + + + + + + &Ctrl; + U + + Tools + Uppercase + + + + + + + + + + + + &Ctrl;&Shift; + U + + Tools + Lowercase + + + + + + + + + + + + &Alt;&Ctrl; + U + + Tools + Capitalize + + + + + + + + + + + &Ctrl; + J + + Tools + Join Lines + + + + + + + + + + Tools + Word Wrap Document + + + + + + + + + + + + <guimenu>Settings -> Configure + Editor</guimenu>menu + + + + Settings + Configure Editor + Colors + + + + Color configuration for the: Background, Selected + text, Current line and Bracket highlighting. + + + + + + Settings + Configure Editor + Fonts + + + + Fonts configuration for display and printer: Font, + font Style and Size, with a preview window. + + + + + + Settings + Configure Editor + Indentation + + + + Indentation configuration: Automatically indent, + use Spaces to indent, Keys indent, + &Backspace; key unindents, keep indent + profile, keep extra spaces. + + + + + + Settings + Configure Editor + Selection + + + + Selection configuration: Persistent selections, + Overwrite selected text. + + + + + + Settings + Configure Editor + Editing + + + + Editing configuration: Word Wrap config., + Whitespace config, Auto brackets, Smart home, Wrap + cursor, Maximum undo steps. + + + + + + Settings + Configure Editor + Shortcuts + + + + Shortcuts configuration. + + + + + + Settings + Configure Editor + Highlighting + + + + Highlighting configuration: Default styles and + Highlight mode. + + + + + + Settings + Configure Editor + View defaults + + + + View defaults: Dynamic word wrap, show Line + numbers, show Icon border, show Folder markers if + available, sort Bookmarks menu method. + + + + + + Settings + Configure Editor + Plugins + + + + Plugins configuration: ⪚ kTexteditor + incremental search plugin, kTexteditor insert file + plugin, kTexteditor kdatatoolplugin... + + + + + + + <guimenu>KrViewer</guimenu>menu + + + + + + &Ctrl;&Shift; + G + + KrViewer + Generic viewer + + + + &krusader;'s internal viewer is actually + part of Konqueror, which can basically view every file + type viewable by &konqueror; (⪚ + display pictures, play music, show the content of an + archive). + + + + + + + &Ctrl; + T + + KrViewer + Text viewer + + + + View the file in text mode. + + + + + + + + &Ctrl;&Shift; + H + + KrViewer + Hex viewer + + + + View the file in hex mode. + + + + + + + + &Ctrl;&Shift; + E + + KrViewer + Text editor + + + + Edit the file in text mode. + + + + + + + &Alt; + Right + + KrViewer + Next Tab + + + + Next browsing Tab. + + + + + + + &Alt; + Left + + KrViewer + Previous Tab + + + + Previous browsing Tab. + + + + + + + + &Ctrl;&Shift; + D + + KrViewer + Detach Tab + + + + Detach browsing Tab and open in a new + window. + + + + + + &Esc; + KrViewer + Close current Tab. + + + + Close current browsing Tab. + + + + + + &Ctrl; + Q + KrViewer + Close + + + + Closes &krusader;'s viewer/editor + window. + + + + + diff --git a/doc/fdl-license b/doc/fdl-license new file mode 100644 index 0000000..2f56ad4 --- /dev/null +++ b/doc/fdl-license @@ -0,0 +1,356 @@ + GNU Free Documentation License + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http:///www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/doc/krusader.1 b/doc/krusader.1 new file mode 100644 index 0000000..4f9945b --- /dev/null +++ b/doc/krusader.1 @@ -0,0 +1,185 @@ +.TH krusader 1 "08 May 2006" Linux "Krusader Manpage" +.SH "NAME" +krusader \- advanced twin-panel file manager and ftp client for KDE +.SH "USAGE" +.B krusader [Qt-options] [KDE-options] [options] +.SH "DESCRIPTION" +Krusader is an advanced twin panel (commander style) +file manager for KDE and other desktops in the *nix world, +similar to Midnight or Total Commander. +It provides all the file management features you could possibly want. +Plus: extensive archive handling, +mounted filesystem support, FTP, advanced search module, +viewer/editor, directory synchronisation, file content comparisons, +powerful batch renaming and much much more. +It supports the following archive formats: ace, arj, bzip2, deb, +gzip, iso, lha, rar, rpm, tar, zip and 7-zip +and can handle other KIOSlaves such as smb:// or fish:// +It is (almost) completely customizable, very user friendly, +fast and looks great on your desktop! :-) +You should give it a try. + +.SH "OPTIONS" +.TP +.B --left <\fIpath\fR> +start left panel at +.TP +.B --right <\fIpath\fR> +start right panel at +.TP +.B --profile <\fIpanel-profile\fR> +Load on startup +.TP +.B --help +show the general options +.TP +.B --help-all +show the all the options +.TP +.B --author +show the authors +.TP +.B -v, --version +show the version +.TP +.B --license +show the license +.SH "[Qt-options]" +"$ krusader --help-qt" shows the all the Qt-options +.SH "[KDE-options]" +"$ krusader --help-kde" shows the all the KDE-options +.SH "EXAMPLE" +.B $ krusader --left=/mnt/cdrom --right=ftp://downloads@myserver.net +.TP +.B $ krusader --left=/home,/usr,smb://workgroup.net --right=fish://myserver.net +.TP +.B $ krusader --profile=ftp_managment +.SH "FILES" +Configuration files: + +.I ~/.kde/share/config/krusaderrc + +.I ~/.kde/share/apps/krusader/krbookmarks.xml + +.I $KDEDIR/share/apps/krusader/krusaderui.rc or + +.I ~/.kde/share/apps/krusader/krusaderui.rc + +.SH "PLATFORMS" +All POSIX: Linux, Solaris, All BSD Platforms: FreeBSD, MacOS-X + +.I KDE 2.x + +krusader v1.01 stable but there are no planned changes. + +.I KDE 3.x + +The latest version of Krusader can be found at the Krusader website. + +Note: + +Krusader v1.01 needs KDElibs 2 + +Krusader v1.02 - 1.40 needs KDElibs 3 + +Krusader 1.40 prefers >= KDE 3.2 + +Krusader v1.50 - v1.51: KDE 3.2 - KDE 3.3 + +Krusader v1.60.0- v1.70.0: KDE 3.3 - KDE 3.4 + +Krusader 1.70.x-1.80.x: KDE 3.4 - KDE 3.5 + +Krusader 2.xx.x: KDE 4 the future Krusader + +.SH "FEATURES" + +OFM filemanager features. + +Strong keyboard orientation. + +Powerful internal viewer and editor. + +Advanced search module that can search in archives. + +Supports: ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip and 7-zip. + +Directory comparison and filtering. + +Ftp/Samba client with a connection manager with SFTP/SCP support. + +Synchronizer, UserActions, Embedded console. Javascript console. + +Compare files by content. Easy editing of file permissions. + +Diskusage, Calculate occupied space. Checksum creation-verification. + +Fully mimetype-aware (with or without magic!). + +Mountmanager, Locate, Krename support. + +Root mode, Tabbed panels, PopUp Panel. Mouse selection modes. + +Profiles for: Panels, Key-bindings, Colors. + +For more features read http://krusader.sourceforge.net/handbook/features.html + +.SH "LICENSE" +Krusader is distributed under the terms of the GNU General Public + +License version 2 as published by the Free Software Foundation. + +See the built-in help for details on the License and the lack of warranty. + +The copyright for the project and its name are still held by Shie Erlich and Rafi Yanai. +.SH "i18n" +Krusader is translated into many languages. + +http://krusader.sourceforge.net/i18n.php + +Read the Krusader translation howto if you want translate Krusader in your native language. +.SH "FAQ" +The latest version of the KRUSADER FAQ can be found at the Krusader website. +.SH "SEE ALSO" +The Krusader Handbook, at the krusader help menu. + +The Krusader homepage on the World Wide Web: + +http://krusader.sourceforge.net +.fi +.SH "AUTHORS" + +Krusader is developed by a dedicated team of individuals, known as the Krusader Krew. + +Shie Erlich, author [erlich {*} users {.} sourceforge {.} net] + +Rafi Yanai, author [yanai {*} users {.} sourceforge {.} net] + +Dirk Eschler, Webmaster and i18n coordinator [deschler {*} users {.} sourceforge {.} net] + +Csaba Karai, Developer [ckarai {*} users {.} sourceforge {.} net] + +Heiner Eichmann, Developer [h {.} eichmann {*} gmx.de] + +Jonas Baehr, Developer [jonas.baehr {*} web.de] + +Frank Schoolmeesters, Documentation & Marketing Coordinator [frank_schoolmeesters {*} yahoo {.} com] + +Richard Holt, Documentation & Proofing [richard {.} holt {*} gmail {.} com] + +Matej Urbancic, Marketing & Product Research [matej {*} amis {.} net] + +The project is written using KDevelop and QT Designer. + +.SH "BUGS" +See the TODO file in the distribution for information on what remains to be done. + +.B Notice: if you've got bugs to report, please use the krusader website, and + +.B not KDE's bugzilla (bugs.kde.org). + +For fixes, patches and comments use the krusader forum or mail to + +[krusader {*} users {.} sourceforge {.} net]. + +Krusader Krew diff --git a/doc/pics/Makefile.am b/doc/pics/Makefile.am new file mode 100644 index 0000000..c5bd706 --- /dev/null +++ b/doc/pics/Makefile.am @@ -0,0 +1,60 @@ +####### kdevelop will overwrite this part!!! (begin)########## + + +EXTRA_DIST = bookmanadd.png bookmanedit.png cmdline.png fnkeys.png kgstartup.png krusader1.png listpanel.png mainwindow.png mountman.png actionman.png search_advanced.png search_general.png terminalEmu.png toolbar.png tabbed_browsing.png krusader_title.png syncdir.png + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/bookmanadd.png $(DESTDIR)$(kde_htmldir)/en/krusader/bookmanadd.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/bookmanedit.png $(DESTDIR)$(kde_htmldir)/en/krusader/bookmanedit.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/cmdline.png $(DESTDIR)$(kde_htmldir)/en/krusader/cmdline.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/fnkeys.png $(DESTDIR)$(kde_htmldir)/en/krusader/fnkeys.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/kgstartup.png $(DESTDIR)$(kde_htmldir)/en/krusader/kgstartup.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/krusader1.png $(DESTDIR)$(kde_htmldir)/en/krusader/krusader1.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/listpanel.png $(DESTDIR)$(kde_htmldir)/en/krusader/listpanel.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/mainwindow.png $(DESTDIR)$(kde_htmldir)/en/krusader/mainwindow.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/mountman.png $(DESTDIR)$(kde_htmldir)/en/krusader/mountman.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/actionman.png $(DESTDIR)$(kde_htmldir)/en/krusader/actionman.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/search_advanced.png $(DESTDIR)$(kde_htmldir)/en/krusader/search_advanced.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/search_general.png $(DESTDIR)$(kde_htmldir)/en/krusader/search_general.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/terminalEmu.png $(DESTDIR)$(kde_htmldir)/en/krusader/terminalEmu.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/toolbar.png $(DESTDIR)$(kde_htmldir)/en/krusader/toolbar.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/tabbed_browsing.png $(DESTDIR)$(kde_htmldir)/en/krusader/tabbed_browsing.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/krusader_title.png $(DESTDIR)$(kde_htmldir)/en/krusader/krusader_title.png + $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/krusader/ + $(INSTALL_DATA) $(srcdir)/syncdir.png $(DESTDIR)$(kde_htmldir)/en/krusader/syncdir.png + +uninstall-local: + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/bookmanadd.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/bookmanedit.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/cmdline.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/fnkeys.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/kgstartup.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/krusader1.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/listpanel.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/mainwindow.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/mountman.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/actionman.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/search_advanced.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/search_general.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/terminalEmu.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/toolbar.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/tabbed_browsing.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/krusader_title.png + -rm -f $(DESTDIR)$(kde_htmldir)/en/krusader/syncdir.png +####### kdevelop will overwrite this part!!! (end)############ diff --git a/doc/pics/actionman.png b/doc/pics/actionman.png new file mode 100644 index 0000000..243a108 Binary files /dev/null and b/doc/pics/actionman.png differ diff --git a/doc/pics/bookmanadd.png b/doc/pics/bookmanadd.png new file mode 100644 index 0000000..fd5504e Binary files /dev/null and b/doc/pics/bookmanadd.png differ diff --git a/doc/pics/bookmanedit.png b/doc/pics/bookmanedit.png new file mode 100644 index 0000000..dacd39f Binary files /dev/null and b/doc/pics/bookmanedit.png differ diff --git a/doc/pics/cmdline.png b/doc/pics/cmdline.png new file mode 100644 index 0000000..23b0f18 Binary files /dev/null and b/doc/pics/cmdline.png differ diff --git a/doc/pics/fnkeys.png b/doc/pics/fnkeys.png new file mode 100644 index 0000000..3162cef Binary files /dev/null and b/doc/pics/fnkeys.png differ diff --git a/doc/pics/kgstartup.png b/doc/pics/kgstartup.png new file mode 100644 index 0000000..d48ec82 Binary files /dev/null and b/doc/pics/kgstartup.png differ diff --git a/doc/pics/krusader1.png b/doc/pics/krusader1.png new file mode 100644 index 0000000..b989dca Binary files /dev/null and b/doc/pics/krusader1.png differ diff --git a/doc/pics/krusader_title.png b/doc/pics/krusader_title.png new file mode 100644 index 0000000..4ed2458 Binary files /dev/null and b/doc/pics/krusader_title.png differ diff --git a/doc/pics/listpanel.png b/doc/pics/listpanel.png new file mode 100644 index 0000000..356465e Binary files /dev/null and b/doc/pics/listpanel.png differ diff --git a/doc/pics/mainwindow.png b/doc/pics/mainwindow.png new file mode 100644 index 0000000..b2c29d0 Binary files /dev/null and b/doc/pics/mainwindow.png differ diff --git a/doc/pics/mountman.png b/doc/pics/mountman.png new file mode 100644 index 0000000..0967f48 Binary files /dev/null and b/doc/pics/mountman.png differ diff --git a/doc/pics/search_advanced.png b/doc/pics/search_advanced.png new file mode 100644 index 0000000..07010f2 Binary files /dev/null and b/doc/pics/search_advanced.png differ diff --git a/doc/pics/search_general.png b/doc/pics/search_general.png new file mode 100644 index 0000000..d73529a Binary files /dev/null and b/doc/pics/search_general.png differ diff --git a/doc/pics/syncdir.png b/doc/pics/syncdir.png new file mode 100644 index 0000000..6384043 Binary files /dev/null and b/doc/pics/syncdir.png differ diff --git a/doc/pics/tabbed_browsing.png b/doc/pics/tabbed_browsing.png new file mode 100644 index 0000000..59bd6b7 Binary files /dev/null and b/doc/pics/tabbed_browsing.png differ diff --git a/doc/pics/terminalEmu.png b/doc/pics/terminalEmu.png new file mode 100644 index 0000000..9df8ba1 Binary files /dev/null and b/doc/pics/terminalEmu.png differ diff --git a/doc/pics/toolbar.png b/doc/pics/toolbar.png new file mode 100644 index 0000000..d796f76 Binary files /dev/null and b/doc/pics/toolbar.png differ diff --git a/doc/ru/Makefile.am b/doc/ru/Makefile.am new file mode 100644 index 0000000..70fdf35 --- /dev/null +++ b/doc/ru/Makefile.am @@ -0,0 +1,11 @@ +####### kdevelop will overwrite this part!!! (begin)########## + + +EXTRA_DIST = index.docbook help.docbook editors-note.docbook introduction.docbook features.docbook user-interface.docbook using-krusader.docbook commands.docbook keyboard.docbook mouse.docbook krusader-tools.docbook konfigurator.docbook faq.docbook credits.docbook installation.docbook configuration-files.docbook useraction-xml.docbook release-overview.docbook glossary.docbook + +####### kdevelop will overwrite this part!!! (end)############ + +KDE_LANG = ru +KDE_DOCS = krusader + + diff --git a/doc/ru/commands.docbook b/doc/ru/commands.docbook new file mode 100644 index 0000000..f28af95 --- /dev/null +++ b/doc/ru/commands.docbook @@ -0,0 +1,1892 @@ + + + + +Menu Commands +CommandsMenu + + + <guimenu +>File</guimenu +> Menu + + + + &Shift;F4 File New Text File + + + Creates a new text file in the current directory, unless another directory is specified. The new file is opened for editing after it is created. + + + + + F7 File New Directory + + + Creates a new directory in the current directory. + + + + + &Alt;&Ctrl;S File New Symlink + + + Creates a symbolic link to the currently selected file. + + + + + F3 File View File + + + Opens the currently selected file for viewing. + + + + + F4 File Edit File + + + Opens the currently selected file for editing. + + + + + F5 File Copy + + + Opens a dialog to copy the currently selected files or directories to a specified location. + + + + + F6 File Move + + + Opens a dialog to move the currently selected files or directories to a specified location. + + + + + &Alt;P File Pack + + + Creates a new archive of all the selected files and directories in the active panel. + + + + + &Alt;U File Unpack + + + Unpack all the selected files in the active panel. + + + + + &Alt;E File Test Archive + + + Test archive for corruption. + + + + + File Compare by content + + + Compares two current files by content - one from each panel via an external graphical diff utility. By default &kompare; (part of the kdebase package) is used, but you can also use ⪚ &xxdiff_url; or &kdiff3_url; , change it in the &konfigdependencie_lnk;. + + + + + &Shift;F9 File Multi Rename + + + This menu option starts &krename_url; a very powerful external batch renamer for &kde; 3.x. + + Krename Features + + Renaming a list of files based on a set of expressions + + + Copying/moving a list of files to another directory + + + Convert filenames to upper/lower case + + + Adding numbers to filenames + + + Finding and replacing parts of the filename + + + Rename MP3/OGG Vorbis files based on their ID3 tags + + + Setting access and modification dates + + + Changing permissions and file ownership + + + A plug-in API which allows you to extend Krename's features + + + Rename directories recursively + + + Support for KFilePlugins + + + Create undo file + + + And many more.... + + + + + + + File Create Checksum + + + Checksum creation on file(s) and/or folder(s). + + + + + File Verify Checksum + + + + Verify Checksum + + + + + + + &Ctrl;P File Split file + + + The &splitfile_lnk; function splits a file up into multiple smaller files so that it can be stored on several smaller media (like diskettes, zip-drives...) or sent by e-mail. + + + + + &Ctrl;B File Combine files + + + The &combinefiles_lnk; function combines multiple files into one file after the &splitfile_lnk; function was used. + + + + + + &Ctrl;Q File Quit + + + Closes &krusader; and cleans up the temporary directory, the same as pressing F10 key. + + + + + + <guimenu +>Edit</guimenu +> Menu + + + + &Ctrl;X Edit Cut to Clipboard + + + Cuts the selected file(s) to the clipboard to be moved to another location. + + + + + &Ctrl;C Edit Copy to Clipboard + + + Copies the selected file(s) to the clipboard to be moved to another location. + + + + + &Ctrl;V Edit Paste from Clipboard + + + Pastes previously cut or copied items from the clipboard to the current directory. + + + + + F9 Edit Rename + + + Renames the currently selected file. + + + + + F8 Edit Delete + + + Deletes the currently selected file(s). + + + + + &Ctrl;+ Edit Select Group + + + Opens a dialog which allows you to select files in the active panel. In the Search for dialog place the main search criteria. Enter a filename, a wildcard (*.o.*, *.c &etc;) or both - separated by a space. When using 'text' the results is the same as '*text*'. You can exclude files from the search with '|' (⪚ '*.cpp *.h | *.moc.cpp' ). With the profile handler you can manage your selections for future usage. A double-click on a Profile is the same as entering the selection and pressing the OK button. More options for Select Group dialog are explained in the Search dialog, who are basicly almost the same dialogs. + + + + + &Ctrl;- Edit Unselect Group + + + The opposite of Select Group, the files that match the pattern in the active panel will be unselected. + + + + + &Alt;+ Edit Select All + + + Selects all files in the active panel, if you want that all directories are also selected than activate the Automark directories option in the &konfiglookandfeel_lnk;. + + + + + &Alt;- Edit Unselect All + + + Unselects all the files in the active panel. + + + + + &Alt;* Edit Invert Selection + + + Invert the selection status of all the files in the active panel (&ie;: selected files will become unselected and unselected files will become selected). + + + + + Edit Compare Directories + + + Toggles &krusader; &comparedir_lnk; function. + + + + + Edit Compare setup + + + Configures the Compare Directories function. + + + Select Newer and Single (default) + + + + Select Single + + + + + Select Newer + + + + + Select Different and Single + + + + + Select Different + + + + + + + + &Alt;* Edit Properties + + + Opens the properties dialog for the currently selected file. + + + + + + <guimenu +>View</guimenu +> menu + The action in this sub menu usually affects the current &krusader; session. If you want to make permanent changes use &konfigstartpg_lnk;. + + + + &Ctrl;. View Show Hidden Files + + + Toggles the option to display or not the hidden files in the &krusader; panels. + + + + + &Shift;F10 View All Files + + + Turn off all filters and display all files. + + + + + &Shift;F12 View Custom + + + Allows you to install a custom filter on the &krusader; panel. Only files that match the filter pattern(s) and directories will be displayed. Don't forget to deactivate the custom filter after use, or some files may not be visible. + + + + + &Ctrl;R View Reload + + + Refreshes the contents of the active panel. + + + + + + <guimenu +>Go</guimenu +> Menu + + + + Go Back + + + Navigates to the previously viewed directory in the active panel. + + + + + &Ctrl;PageUp Go Up + + + Navigates to the parent directory of the active panel. + + + + + &Ctrl;Backspace Go Root + + + Navigates to the root directory of the system. + + + + + &Ctrl;Home Go Home + + + Navigates to the home directory of the current user. + + + + + &Ctrl;Z Go Popular URLs + + + Displays a listing of frequently viewed directories from which you may navigate to one by double-clicking on it. + + + + + &Ctrl;&Shift;J Go Set Jump Back Point + + + Sets the current directory as a "jump back" point. To navigate to this directory quickly, select the "Jump Back" command from the go menu. + + + + + &Ctrl;J Go Jump Back + + + Returns to a previous "jump back" point. + + + + + + <guimenu +>Useractions</guimenu +> menu + + + + Useractions Manage useractions + + + Opens the &useractions_lnk; manager. + + + + + Useractions Your foo Useractions + + + Opens the default Useractions and Useractions created by the user. + + + + + Win1 Useractions Sort By Name + + + When this action is turned on, the main sorting key in the &krusader; panel becomes the file name. + + + + + Win2 Useractions Sort By Extention + + + When this action is turned on, the main sorting key in the &krusader; panel becomes the file extention (the part of the filename after the last '.'). This is useful for grouping files of the same type closer together. + + + + + Win3 Useractions Sort By Size + + + When this action is turned on, the main sorting key in the &krusader; panel becomes the file size. This is useful for determining the largest files in a particular directory. + + + + + Win4 Useractions Sort By Modified + + + When this action is turned on, the main sorting key in the &krusader; panel becomes the last modified date for each file. This is useful for finding files you recently worked on. + + + + + + <guimenu +>Tools</guimenu +> menu + + + + &Ctrl;S Tools Search + + + Opens the &krusader; search module. + + + + + &Ctrl;&Shift;L Tools Locate + + + Opens the &locate_lnk; for fast file searching. + + + + + &Ctrl;Y Tools Synchronize Directories + + + The &syncdirs_lnk; function compares the left and right panels and show the differences between them. After the compare function, you can move files/directories so that they can be synchronized. + + + + + &Alt;/ Tools MountMan + + + Opens MountMan - your Mount-Manager. + + + + + &Alt;D Tools Disk Usage + + + Opens &diskusage_lnk;. + + + + + &Ctrl;N Tools New Net Connection + + + Opens the New Network Connection dialog to start a &FTP;, SMB, FISH or SFTP connection to a remote host. If you leave the username and password fields empty you'll login as anonymous. You can Bookmark these remote sessions. + + + + + &Shift;&Ctrl;F Tools Disconnect From Net + + + End the remote connection in the active panel and return to the startup path. + + + + + + Tools Start Terminal + + + Opens a terminal window in the default directory (usually your home directory). You can choose your favorite terminal application in the &konfiggereral_lnk;. + + + + + F2 Tools Start Terminal Here + + + Opens a terminal window in the currently browsed directory of the active panel. You can choose your favorite terminal application in the &konfiggereral_lnk;. + + + + + + &Alt;K Tools Start Root Mode Krusader + + + Starts &krusader; in &rootmode_lnk; at the same location. + + Be careful when using &krusader; with ROOT PRIVILEGES. + + + + + + + &Alt;&Ctrl;J Tools Javascript Console + + + Opens the Javascript Console for Javascript evaluation. TODO: describe me. + + Be careful when using &krusader; with ROOT PRIVILEGES. + + + + + + + + + + + + + + + + + + + + + + + + + + + <guimenu +>Settings</guimenu +> menu + + + + View Show Main Toolbar + + + Shows the &main_toolbar_lnk; if checked. + + + + + View Show Actions Toolbar + + + Shows the &actions_toolbar_lnk; if checked. + + + + + View Show Statusbar + + + Shows the Statusbar if checked. + + + + + View Show FN Keys bar + + + Shows the &fnkeybar_lnk; if checked. + + + + + View Show Command Line + + + Shows the Command Line if checked. + + + + + &Alt;&Ctrl;T View Show Terminal Emulator + + + Show the Terminal Emulator if checked. + + + + + Settings Configure Shortcuts + + + ConfigureShortcuts + Opens a dialog which allows you to configure the &krusader; key bindings. + With the Import shortcuts Export shortcuts buttons you can load and save a Key-binding profile. This allows &krusader; to have the &tcmd;, &mc;, foo-commander, or your custom Key-bindings. The only limitation is that global &kde; key-bindings and some &krusader; key-bindings can't be changed yet, as well as some features in foo-commander that we either don't have or don't need. The Key-bindings are stored in $KDEDIR/share/apps/krusader, foo.keymap.info contains a description, foo.keymap is a ini file that holds the Key-bindings. Until &krusader;-1.70.1 this was a binary file, &krusader; is backwards compatible for importing this legacy binary format. If a *.keymap.info text file exists, &krusader; will display it, showing additional information regarding the loaded Key-bindings file. Here you have a chance to exit without importing the proposed Key-bindings file. + A &tcmd; Key-bindings file is provided. Please upload your favorite Key-bindings schemes so that they become available for the &krusader; community. Thanks! + + + + + Settings Configure Toolbars + + + Opens a dialog which allows you to configure the &main_toolbar_lnk; or the &actions_toolbar_lnk;. You can add action buttons of your favourite &useractions_lnk; to the desired Toolbar. + + + + + Settings Configure &krusader; + + + Opens the &krusader; configuration center: Konfigurator. + + + + + + <guimenu +>Window</guimenu +> Menu + + + + &Alt;&Ctrl;N Window New Tab + + + Opens a new tab in the active panel. + + + + + &Alt;&Ctrl;&Shift;N Window Duplicate Current Tab + + + Opens a new tab that is a duplicate of the active tab in the active panel. + + + + + &Ctrl;W Window Close Current Tab + + + Closes the current tab in the active panel. This command is only available if there is more than one tab in the active panel. + + + + + &Shift;Right Window Next Tab + + + Navigates to the next tab of the active panel. This command is only available if there is more than one tab in the active panel. + + + + + &Shift;Left Window Previous Tab + + + Navigates to the previous tab of the active panel. This command is only available if there is more than one tab in the active panel. + + + + + &Alt;L Window Profiles + + + Opens a menu where Panel profiles can be saved and restored. + + + + + &Ctrl;U Window Swap Panels + + + The left panel wil become the right panel and vice versa, only the current tabs will be swapped. + + + + + &Ctrl;&Shift;U Window Swap Sides + + + The complete left panel will become the right panel and vice versa, and all tabs will be swapped. + + + + + &Alt;&Ctrl;r Window Vertical Mode + + + Toggels the &list_panel_lnk; between horizontal and vertical mode. + + + + + &Ctrl;F Window Toggle Fullwidget Terminal Emulator + + + Toggles fullscreen mode of the terminal editor. This option is only approriate when "Show Terminal Emulator" is activated. + + + + + Window Save Position + + + Saves the current size and position of the &krusader; main window. This action can be automated with "Save settings on exit" in &konfigstartpg_lnk; + + + + + + <guimenu +>Help</guimenu +> menu + + + + Help Krusader Handbook + + + Invokes the &kde; Help system starting at the &krusader; help pages (this document). + + + + + &Shift;F1 Help What's This? + + + The &whatsthis_url; help function changes the mouse cursor to a combination arrow and question mark. Clicking on items within &krusader; will open a help window (if one exists for that particular item) explaining the item's function. If you want to know more about a specific item than use this feature, a right-click on an item will also open the &whatsthis_url; help. + + + + + + Help Report Bug + + + Opens the bug report dialog for sending bug reports via mail. + + + If you've got bugs to report please do not use &kde;'s bugzilla http://bugs.kde.org/, &kde;'s Bug Tracking System. We use Sourceforge.net for reporting and managing our &faqbugreports_lnk;. + + + Wishes, patches, and comments are always welcome. + + + + + + Help About Krusader + + + This will display version, author, and license information. + + + + + Help About KDE + + + This displays the &kde; version and basic information. + + + + + + diff --git a/doc/ru/configuration-files.docbook b/doc/ru/configuration-files.docbook new file mode 100644 index 0000000..5e53d77 --- /dev/null +++ b/doc/ru/configuration-files.docbook @@ -0,0 +1,224 @@ + + + + + +Configuration files +This appendix gives an overview of the configuration files used by &krusader;. + + +krusaderui.rc +This file stores the users toolbar settings and the menu structure. Tip: please read also the krusaderui.rc &FAQ;. +Location: $KDEDIR/share/apps/krusader/krusaderui.rc or ~/.kde/share/apps/krusader/krusaderui.rc + + + +krusaderrc +This file stores the &krusader; configuration. +Location: ~/.kde/share/config/krusaderrc + +The following settings are ⪚ stored: + + Actions Toolbar + Archives + Colors + Dependencies + DiskUsage + DiskUsageViewer + General + HTML Settings + KFileDialog + KFileDialog Speedbar + KrDetailedViewLeft + KrDetailedViewRight + KrViewerWindow + KrViewerWindow Toolbar extraToolBar + Look&Feel + Notification Messages + Panel Profiles + Private + Protocols + Search + Startup + Synchronize + Locate + SynchronizerProfile - 1 + + + +krbookmarks.xml +This file stores the &krusader; bookmarks and uses the &xbel_url; standard. +Location: ~/.kde/share/apps/krusader/krbookmarks.xml + + +useractions.xml +This file stores the &useractions_lnk; configuration. The file-structure is documented in doxygen-headers of UserActionXML. +Location: ~/.kde/share/apps/krusader/useractions.xml + +useraction_examples.xml +The default User-Actions provided by us. The file-structure is documented in doxygen-headers of UserActionXML. +Location: $KDEDIR/share/apps/krusader/useraction_examples.xml + +foo.keymap +Is a ini file that holds a Key-binding profile. Until &krusader;-1.70.0 this was a binary file, &krusader; is backwards compatible for importing this legacy binary format. +Location: $KDEDIR/share/apps/krusader/foo.keymap + + +foo.color +Is a binary file that holds the Color Scheme. +Location: $KDEDIR/share/apps/krusader/foo.color + + + + diff --git a/doc/ru/credits.docbook b/doc/ru/credits.docbook new file mode 100644 index 0000000..649a53b --- /dev/null +++ b/doc/ru/credits.docbook @@ -0,0 +1,360 @@ + + + + +Credits and License +Credits +License +&krusader; + +Program copyright 2000-2003 Shie Erlich and Rafi Yanai, 2004-2006 &krusader; Krew krusader@users.sourceforge.net + +&krusader; is developed by a dedicated team of individuals, known as the &krusader; Krew. Shie Erlich, author erlich@users.sourceforge.net Rafi Yanai, author yanai@users.sourceforge.net Dirk Eschler, webmaster & i18n coordinator deschler@users.sourceforge.net Csaba Karai, developer ckarai@users.sourceforge.net Heiner Eichmann, developer h.eichmann@gmx.de Jonas Bähr, developer jonas.baehr@web.de Frank Schoolmeesters, Documentation & Marketing coordinator frank_schoolmeesters@yahoo.com Richard Holt, Documentation & Proofing richard.holt@gmail.com Matej Urbančič, Marketing & Product Research matej.urban@gmail.com The project is written using KDevelop and &Qt; Designer. + +We would especially like to thank Dirk Eschler the &krusader; web master. If you visit the &kruwebsite_url; you'll appreciate, as much as we do, the hard work and effort that Dirk has put into the site. + +Contributors: We would like to thank all the &krusader; users who submitted bugs, wishes and patches. Sorry we can't mention all of you. + +Donations: We would like to thank the following organisations and individuals for their recent financial contributions. In addition we would to thank those who have contributed anonymously. Your support is very appreciated. + distroWatch.com (donation) + + Sven Opitz (the first donation ever !) + + Christian Bock (webspace) + + + + +Special thanks to: + &sourceforge_net_url;, webhosting services + + &kde_files_url; & &kde_apps_url; creator Frank Karlitschek + + &openusability_url; + + Google.com + + Václav Jůza, QA, bug-hunting, patches and general help + + Jiří Paleček, QA, bug-hunting, patches and general help + + Andrew Neupokoev (nwmod) &krusader; Logo and Icons, art contest winner. + + Angel Ramos, &debian; package maintainer + + Terry "Fudoki" Wilkinson, handbook proofreader + + Gábor Lehel (illissius), Viewer module for the 3rd Hand Panel + + Szombathelyi György, ISO KIO slave + + David Harel, panel toolbar buttons + + Jan Willem van de Meent (Adios), &krusader; icons + + usefularts.org , &krusader; icons + + Hans Loffler, directory history list + + Jan Halasa, new bookmark module + + Mikolaj Machowski, Usability and QA + + Cristi Dumitrescu, QA, bug-hunting, patches and general help + + Aurelien Gateau, patch for KViewer + + Milan Brabec, the first patch ever ! + + + + +Thanks to the translators: Bosnian: Asim Husanovic Brazilian Portuguese: Doutor Zero Bulgarian: Milen Ivanov Catalan: Rafael Munoz Rodriguez, Quim Perez Noguer Chinese: Jinghua Luo Czech: Martin Sixta, Václav Jůza Danish: Anders Bruun Olsen, Christian Sonne, Peter H.S. Dutch: Frank Schoolmeesters French: René-Pierre Lehmann, David Guillerm German: Christoph Thielecke, Dirk Eschler Greek: Spiros Georgaras Hungarian: Kukk Zoltan, Arpad Biro, Karai Csaba Italian: Giuseppe Bordoni Japanese: UTUMI Hirosi, Hideki Kimura Lithuanian: Dovydas Sankauskas Polish: Marcin Szafran, Lukasz Janyst, Marcin Garski, Pawel Salawa, Tomek Grzejszczyk Portuguese: Bruno Queirós Russian: Dmitry V. Chernyak, Denis Koryavov, Nick Shaforostoff, Dmitry A. Bugay Serbian: Sasa Tomic Slovak: Zdenko Podobný Slovenian: Matej Urbančič Spanish: Rafael Munoz Rodriguez, Alejandro Araiza Alvarado, Alex Araiza Swedish: Erik Johansson, Anders Lindén, Peter Landgren Turkish: Bekir Sonat Ukrainian: Ivan Petrouchtchak And to all the other translators, we're sorry we can't list all the names. Please take a look in the headers of the foo.po files to see &i18n_credits_url;. + +If your native language is not listed above and you would like to translate &krusader; into your language, please read the &i18n_page_url;. + +For more credits, read the &changelog_url; file online or in the Krusader sources. + +Documentation Copyright 2000-2003 Shie Erlich and Rafi Yanai. Copyright 2004-2006 &krusader; Krew krusader@users.sourceforge.net. + + +This program is licensed under the terms of the GNU General Public License Version 2, June 1991. + + +This documentation is licensed under the terms of the GNU Free Documentation License. + + + diff --git a/doc/ru/editors-note.docbook b/doc/ru/editors-note.docbook new file mode 100644 index 0000000..d148809 --- /dev/null +++ b/doc/ru/editors-note.docbook @@ -0,0 +1,63 @@ + + + + Примечание для редакторов + + Как вы можете видеть это руководство написано различными авторами. Черновик с пояснениями нововведений составляется разработчиками в списке рассылки , редакторы добавляют эту информацию в это руководство.Мы прикладывам много усилий для технической грамотности руководства.Авторы пишут на английском , хотя это не их родной язык , поэтому вы можете сообщать о странных для понимания конструкциях.Не стесняйтесь , если на ваш взгляд что то не правильно. + + Большая польза в открытых проектах извлекается из возможности обратной связи с ользователями. Мы любим слушать , если вам есть что сказать.Помощь в документации всегда приветствуется ! Это сократит затраты. Если у вас есть идеи по улучшению содержания , если вы желаете написать о недокументированых возможностях &krusader; или имеете комментарии и советы для Руководства &krusader; пожалуйста свяжитесь с нами ! + + Руководство "ревизия" соответствует &krusader; номер версии . Например , "&krusader; Руководство ревизия 1.80.x" описывает "&krusader; 1.80.x" + + Пожалуйста прочитайте файл &docchangelog_url; в сети или в исходных кодах &krusader; .там вы найдете список последних изменений в Руководстве &krusader;. + + Для информации о проекте документации &krusader; свяжитесь с координатором документации Frank Schoolmeesters frank_schoolmeesters@yahoo.com. + + +Это руководство доступно в нескольких форматах. через меню Справка в &krusader; на &onlinehandbook_url; Как архив (HTML, TXT, RTF, PDF, XML-SOURCE), на &sfmirrors_url; Самая последняя версия Руководства доступна на cvs или по адресу &onlinehandbook_url;. +&dev_cvs_note; Все упоминаемые торговые марки и авторские права в этом руководстве являются собственостью их настоящих владельцев. + + diff --git a/doc/ru/faq.docbook b/doc/ru/faq.docbook new file mode 100644 index 0000000..e08ac06 --- /dev/null +++ b/doc/ru/faq.docbook @@ -0,0 +1,1514 @@ + + + +Часто задаваемые вопросы (&FAQ;) +FAQ + + + +Если у вас возникли проблемы с &krusader; пожалуйста проверьте &install_proc_lnk; , возможно ваша проблема вызвана неправильной установкой. + +&FAQ; разделен на три части: &FAQ;Установка (this page) &FAQ; Использование (issues when running/using &krusader;) &FAQ; Основной (bug reports, forum, mailing list, ...) If you have the feeling that a &FAQ; is missing or if something is not clear to you, please let us know. + + + +&FAQ; Установка + + + + + Нуждается ли &krusader; в &kde; ? + + + Нет , &krusader; не нуждается в оконном менеджере &kde; для запуска на вашем компьютере , потому что он пользуется службам⪚ &kde;и базовой библиотеки &kde;Необходимы только некоторые разделяемые библиотеки например &kde; &Qt; , &etc;Этот способ в &krusader; , запущеном в &gnome_url;, &afterstep_url;, &xfce_url; и других оконных менеджерах реализуется за счет связанных с ними библиотек .Это не проблема и решается правильным соблюдением зависимостей при установке. + + Нет необходимости переключаться в &kde; для использования &krusader;; вы можете использовать &gnome_url;, &afterstep_url;, &xfce_url; или в других оконных менеджерах.Но настройка шрифтов и поведения &krusader; производится в Kcontrol. + + Не волнуйтесь о судьбе зависимостей , если вы выберете &krusader;.Вы узнаете что &krusader; использует &kde; &kioslaves1_url; для получения доступа к удаленным файловым системам и поддерживает все файловые системы , которые доступны в &kdelibs_url; больше в &kioslaves2_url; или связаны с &kdebase_url;(включая fish, sftp и tar).Только... если диалог свойств показывает данные EXIF для .jpeg's, вы нуждаетесь в пакетах графики &kde; , если вы хотите видеть информацию ID3 - пакеты мультимедиа для &kde; и так далее и тому подобное.... + + Суммируя , если вы хотите работать в &krusader; - установите библиотеки &kde;.Если нужна полная функциональнось в &krusader; нужно установить дополнительные библиотеки и базовый пакет &kde;.Для полной функциональности необходимы все библиотеки и все пакеты &kde; , оконный менеджер остается опциональным. + + + + + + + Какие библиотеки необходимы для запуска &krusader; ? + + + Для запуска &krusader; (⪚ если вы установили &krusader; из бинарного RPM) вы наименее нуждаетесь в библиотеках чем если собираете его из исходного кода.Например , вы нуждаетесьтолько в компиляторе &gcc; затем компилируете &krusader; (смотрите следующий вопрос). + Здесь (возможно неполный) список необходимых разделяемых библиотек для &krusader;: + + библиотеки kde ( для определенной версии &kde; смотреть &install_proc_lnk;) + + libacl1 libart-2.0 libattr1 libaudio2 libc6 libfam0 libfontconfig1 + + libfreetype6 libgcc1 libgcc2 libice6 libidn11 libjpeg62 libkjsembed1 + + libkonq4 libpcre3 libpng12 libqt3-mt libsm6 libstdc++6 libunwind7 libx11-6 + + libxcursor1 libxext6 libxft2 libxi6 libxinerama1 libxrandr2 libxrender1 libxt6 zlib1g + + +Если вы нуждаетесь в более подробной информации пожалуйста посмотрите &deb_requirements_url; . + + + + + + + Я сделал все необходое , только configure ругается на отсутствие библиотек headers.Что я делаю не так ? + + + Пожалуйста установите их . ;-) + Here is a (possibly incomplete) list of the required packages to compile &krusader; from source: + + gcc-cpp gcc-c++ glibc libgcc1 (other compilers may work but haven't been tested) + autoconf automake XFree + libqt3 libqt-devel + kdelibs kdelibs-devel + libjpeg62 libjpeg-devel libpng3 libmng1 + fam libfam-devel + zlib1 arts libart_lgpl2 libstdc++5 libpcre0 + libkjsembed,если вы используете &javascript_console_lnk;,обычно находится в пакете именуемом KDEbindings(-devel) и libkonq-dev для &konqueror; внутри меню по правому щелчку мыши. + + Большинство дистрибутивов на основе RPM разделяют headers и сами библиотеки.Просто установите их , введя в поиске пакетов foo-devel-*.rpm(⪚ kdelibs-devel-foo.i586.rpm) или oo-dev-*.deb для основанных на &debian; дистрибутивов.Обычно они включены в стандартной поставке. Если вы не нашли необходимый пакет используйте &rpmfind_url; и попробуйте найти там недостающие пакеты.Или используйте apt&krusader;-cache search foo для поиска в пакета в дистрибутивах на основе &debian; + + + + + + + Как мне скомпилировать &krusader; на 64 -х битном процессоре ? + + + Насколько нам известно в этом нет нужды .&krusader; доступен для многих платформ много различных архитектур. + + + + + + + Я загрузил RPM с исходным кодом krusader-x.xx.dist.src.rpm Что делать дальше ? + + + + Проверьте права доступа для /usr/src/RPM/ и всех вложенных директорий - ваша учетная запись пользователя должна иметь права на чтение-запись-выполнение во всех директориях. + Для создания бинарного RPM выполните : $ rpm </путь_к_файлу/> krusader-x.xx.dist.src.rpm + + Если все зависимостиудовлетворены - RPM krusader-x.xx.dist.rpm будет создан в /usr/src/RPM/RPMS/i586(если у вас архитектура i586). + Проверьте собранный бинарный пакет перед установкой командой $ rpm </path/to/rpmfile> krusader-x.xx.dist.rpm .Если в ответ не будет никаких сообщений , значит все завершилось успешно. + Установка пакета делается как обычно , например $ su -c 'rpm </path/to/rpmfile> krusader-x.xx.dist.rpm' .Вас спросят о пароле для суперпользователя. + Теперь вы можете запустить &krusader;. + + + Для получения более подробной информации по RPM посетите &rpm_org_url; и почитайте &rpm_guide_url; от Eric Foster-Johnson. + + + + + + + + Я пытаюсь установить бинарный пакет (RPM или DEB ) , только ничего не получается .Что неправильно ? + + + Обычно мы только пишем (и используем) исходный код , мы не знаем об этом.Вы провели тестирование пакета перед установкой ?$ rpm </path/to/rpmfile> krusader-x.xx.dist.rpm.Если не было никаких сообщений после обработки команды , значит все в порядке.Пакеты , которые доступны на нашем сайте обычно предоставляются пользователями.Посетите сайт вашего дистрибутива и поищите там нужный пакет. + Если пакета нет , попробуйте поискать другие пакеты для &Linux; в фаловых архивах , таких как &freshmeat_url; или &kde_apps_url;.Если вы так и не смогли найти пакет для вашего дистрибутива , мы рекомендуем поискать на &rpmfind_url; или &rpmpbone_url;. + В основном , пакеты от старых версий вашего дистрибутива или других дистрибутивов могут заботать ( например будут работать под Mdk и RH, и им подобным) , хотя конечно же лучше всего будет если вы будете устанавливать пакеты , предназначенные для вашего дистрибутива.Если вы так и не смогли найти пакеты для вашей версии дистрибутива или вашей архитектуры используйте пакет с исходным кодом.Если вы будете собирать из пакета с исходным кодом , Крусадер будет гарантировано собран под ваши архитектуру и дистрибутив.В дополнение этот метод дает максимальные результаты в скорости дальнейшей работы , потому что пакет оптимизирован под особенности вашего компьютера.Пожалуйста прочитайте предыдущий вопрос , он обьясняет установку из пакета с исходным кодом.Лучшие решения описаны в следующем вопросе. + + + + + + + Я не могу найти пакеты RPM или DEB для &krusader; , что делать ? + + + Check if your distribution provides &krusader;, if it doesn't than contact your distribution creator and ask them to include &krusader;! + + Вы видели &URL;' на &install_proc_lnk; странице ? И ничего не нашли ? Значит вы можете скомпилировать &krusader; из исходного кода.Если вы не уверены в своих возможностях , попробуйте собрать &krusader;!Мы предоставили очень подробную методику установки. Это руководство позволит новичкам собрать &krusader; из исходного кода даже если вы не собирали ранее ничего , просто внимательно следуйте инструкциям.Оставьте сообщение на &help_request_lnk; если столкнетесь с проблемами. + + + + + + + Я установил &krusader;, только когда я запускаю его в меню видно только "Help".Почему ? + + In this case only the Help menu is visible and all other menu items like ⪚ File and Select are missing. This is because some distributions put the krusaderui.rc file in the wrong directory. To solve the problem, just copy the krusaderui.rc file from the package krusader_kde3/krusader/krusaderui.rc to $KDEDIR/share/apps/krusader/krusaderui.rc and ~/.kde/share/apps/krusader/krusaderui.rc and re-run &krusader;. If you have compiled &krusader; from sources this is often caused when the &kdeqtdir_lnk; environment variables are not correctly set. The result is that the krusaderui.rc file is installed in the wrong directory. Please also read the next question. + + + + + + + Некоторые новые меню &krusader; недоступны после обновления , что поломалось? + + + Файл krusaderui.rc хранится в $KDEDIR/share/apps/krusader/krusaderui.rc. Если вы выбрали новую "Панель" ,&kde; создаст копию файла ~/.kde/share/apps/krusader/krusaderui.rc в домашнем каталоге. Если Крусадер уже был установлен на вашем компьютере, и вы установили новую версию , файл ~/.kde/share/apps/krusader/krusaderui.rc должен быть перезаписан новой версией. + + Первая строка файла krusaderui.rc содержит номер версии. После установки новой версии &krusader; &kde; автоматически перепишет старый файл ~/.kde/share/apps/krusader/krusaderui.rc новой версией при первом старте нового &krusader; (&kde; определит новую версию по первой строке). + + Если вы устанавливает из CVS или бета версию и &krusader; уже был кстановлен вы должны удалить старый файл krusaderui.rc для вклучения новых меню $ rm + + Если файл ~/.kde/share/apps/krusader/krusaderui.rc старый , новые элементы меню не будут видны. Прочитайте предыдущий вопрос , в нем описано как обновить файл krusaderui.rc. Если файл krusaderui.rc утерян или находится не в том каталоге , видно только "Справка" , прочитайте предыдущий вопрос. + + + + + + + Когда я запускаю make , он жалуется на libfam.la + + + Скрипт ./configure не проверяет наличие файла libfam.la, и make нуждается в libfam.la для сборки &krusader;.Если вы знаете как это устранить , помогите нам.Установите пакет libfam0-devel-foo.rpm.Примечание: если вы установили &Mandrake;-&Linux; 9.2 с настройками по умолчанию , этот пакет не установлен.Если вам нужно больше информации о зависимостях посмотрите на &missing_libs_lnk;. + + + + + + + &debian; жалуется на &Qt; когда запускаю ./configure + + + Эта проблема возникает когда вы используете &gcc; 2.95, нужно установить &gcc; 3.2 (или выше). Вы также должны установить переменные окружения "CC, CPP and CXX" до запуска скрипта ./configure .script. $ export CC=/usr/bin/gcc-3.2 +$ export CXX=/usr/bin/g++-3.2 +$ export CPP=/usr/bin/cpp-3.2 + Для получения дополнительной информации посетите &debian_qt_a_url; и &debian_qt_b_url; чтобы узнать как собирать приложения &Qt;/&kde;3 в &debian;. + + + + + + + У меня ошибка компиляции libGLcore.so.1 после использования инсталлятора &nvidia; + + + Эта проблема связана с использованием установщика &nvidia;. &krusader; основан на &Qt; и связан с библиотеками X OpenGL . Проблема в том , что установщик &nvidia; ( до версии 7xxx) переписывает файлы заголовков OpenGL и не устанавливает правильные ссылки на библиотеки OpenGL. Лучшим решением будет использовать пакет с драйвером &nvidia; , который идет в дистрибутивной поставке.Если в некоторых случаях необходимо использовать старый драйвер единственное решение использовать нестандартное решение для старого драйвера(6111 в этом примере) , что-то вроде этого : $ ln -s libGLcore.so.1.0.6111 libGLcore.so.0 +$ ln -s libGLcore.so.1.0.6111 libGLcore.so +$ ln -s libGLcore.so.1.0.6111 libGLcore.so.1.0.0 +$ ln -s libGLcore.so.1.0.6111 libGLcore.so.0.0.0 +$ ln -s libGLcore.so.1.0.6111 libGL.so +$ ln -s libGLcore.so.1.0.6111 libGL.so.0 +$ ln -s libGLcore.so.1.0.6111 libGL.so.0.0.0 +$ ln -s libGLcore.so.1.0.6111 libGL.so.1 +$ ln -s libGLcore.so.1.0.6111 libGL.so.1.0.0 +$ ln -s /usr/lib/libGLU.la /usr/X11R6/lib/libGLU.la + + + + + + + + + Почему &krusader;-1.60.x не собирается с gcc4? + + + Потому что &krusader;-1.60.x не совместим с gcc4 , он нуждается в заплатках : add 'class ListPanelFunc;' in krusader/Panel/listpanel.h add 'class KMountManGUI;' in krusader/MountMan/kmountman.h add 'class KrDetailedViewItem;' in krusader/Panel/krdetailedview.h Больше можно узнать на нашем форуме . + + + + + + + + У меня возникли пролемы со сборкой и установкой &krusader;, где и как мне получить помощь ? + + + Пожалуйста прочитайте нашу подробную инструкцию по установке и &faq_lnk;. Если вы не нашли решение проблемы опишите все в просьбе о помощи на нашем форуме &kruusers_url; или в списке рассылки.Перед этим попробуйте следующее: + Воспользуйтесь функцией &kruforumsearch_url; на &forum_lnk;, ваша проблема возможно уже решена или уже обсуждается . + + + Если вы не нашли решения проблемы , создайте вопрос со следующими параметрами: используемая версия &krusader; дистрибутив &Linux; + версия полное описание проблемы Без этой информации будет очень трудно помочь вам. Если у вас появляются ошибки в работе (например сообщения об ошибках make ) , пожалуйста начните с первой ошибки , все последующие - это следствие первой ошибки и не причина вашей проблемы. + + + Пошлите ваш запрос о помощи ;) + + + + + Спасибо за ваше сотрудничество! + + + + + + + Как мне собрать пакет RPM для &krusader;? + + + Если у вас есть опыт сборки программ из исходного кода , можете попробовать также собрать и RPM.Информация о сборке на &rpm_org_url; и в &rpm_guide_url; от Eric Foster-Johnson.Далее короткое описание процедуры создания RPM. + Никогда не создавайте пакеты RPM под учетной записью root.Ошибки в построении пакета (например неправильный файл krusader.spec) могут серьезно повредить вашу систему, когда вы работаете как root. + + Соберите &krusader; из исходного кода для проверки корректной компиляции. + Проверьте права доступа для /usr/src/RPM/ и всех вложенных директорий - ваша учетная запись пользователя должна иметь права на чтение-запись-выполнение во всех директориях. + Скопируйте kusader-1.xx.tar.gz в /usr/scr/RPM/SOURCE + Скопируйте kusader.specв /usr/scr/RPM/SPECS Совет: самый последний kusader.spec можно найти в CVS. + Отредактируйте kusader.spec и добавьте свое имя , адрес эл. почты , имя пакета ,...Другие изменения необходимы , если rpmbuild не работает. + Создайте бинарный пакет и пакет с исходным кодом с помощью $ rpmbuild /usr/scr/RPM/SPECS/krusader.specЕсли будет удачно вы получите бинарный RPM в /usr/src/RPM/RPMS/i586(в зависимости от вашей архитектуры) и пакет с исходным кодом в /usr/src/RPM/SRPMS/ . например krusader-1.70-beta1.suse10.i586.rpm и krusader-1.70-beta1.suse10.src.rpm + Если возникнут ошибки , вы получите сообщения от rpmbuild , попытайтесь устранить их перезапустите rpmbuild снова. + В конце: проверьте пакет перед тем , как послать его нам. + + + + + + + + + + Why does &krusader;-cvs shows an old version number in the about box? + + + Because we only change the version number just before we do a new release. &krusader;-cvs will show an older version number, so ignore the version number and check the download date. We just haven't decided yet what will be the next version number :) + + + + + + + + + + +&FAQ; Использование + + + + + Почему &krusader; падает ? + + + Мы получили много писем-отчетов(декабрь 2005) относительно различных проблем в &krusader;,особенно во время некоторых операций с файлами(копирование/перемещение и др.)Эти проблемы связаны с &Qt; 3.3.5 и &krusader; тут не виноват.Это , возможно серьезная ошибка в &Qt; 3.3.5 и причина многочисленных сбоев в различных приложениях &kde; включая &konqueror;.В Google вы можете найти множеств подобных вопросов.В дальнейшем , насколько нам известно в &debian;-Sid и &SuSE; уже включена новая версия &Qt; с устраненной проблемой. Дополнительная информация на нашем сайте. + + + + + + + + Когда я пробую монтировать/отмонтировать мои cdrom/floppy, &krusader; говорит о supermount, что это такое ? + + + Supermount это демон , который самостоятельно монтирует/отмонтирует файловые системы.Только вставьте флоппи и дайте команду cd и он смонтирует его автоматически без вашего участия.Это великолепно ,только supermount обманывает систему , говоря ей что floppy/cdrom смонтирован все время !Это создает проблему для &krusader;, не дает коррректно отмонтировать флоппи или СД диск , потому что supermount не дает корректной информации реально ли флоппи находится в приводе?Конечно , это будет разрешено , только сейчас это рассматривается нами как очень важное.Воможно кто-то напишет заплатку для этого ;-). + + + + + + + Почему &krusader; зависает когда неверна точка монтирования ? + + + Когда &krusader; , например просматривает ресурсы NFS и сервер выключен , &krusader; зависнет.Это зависание фатально для &krusader; (и для всех открытых встроенных редакторов/просмотрщиков) и может быть исправлено только командой kill -9.Мы не имеем предложенных решений для решения проблемы.Эта проблема не связана с файловыми менеджерами или самой ОС &Linux;!Проблема этого вашего "зависания" в первом обращении к отключенному ресурсу - там нет возможности сделать проверку содержимого , осмотреть каталог и ls зависает.Это проблема многонитевой архитектуры и в самом приложении зависания нет.Мы не знаем где проблема , скорее всего это не &kde; он использует &Qt;-mt (многонитевая версия библиотеки) , и Krusader Krew не знает решения этой проблемы , в настоящее время мы просто смирились с этой проблемой. + + + + + + + Почему когда я пытаюсь уменьшить окно &krusader; нижняя часть не изменяет свои размеры.По-сущевству , не получается уменьшить окно.Почему ? + + + Смотрите на кнопки F1, F2 (&etc;) ? &krusader; пока не позволяет уменьшить их размер.Пока просто запретите их Вид Показывать FN панель и окно &krusader; можно будет уменьшить.Начиная с версии 1.51 мы введем это: когда размер будет уменьшен кнопки будут выглядеть примерно как 'F5..ровать'. Минимальная ширина для полного отображения текста каждой кнопки - 45 точек. + + + + + + + Когда я произвожу некоторые операции над файлами панели &krusader; не обновляются / Я использую &krusader; с установленным fam , но обновление панелей не видно. + + + Плохие новости , fam корректно работает далеко не всегда.Мы проверяли и точно определили - это не наша проблема .Мы побовали два одинаковые пакеты на двух различных системах Gentoo: один работает , а другой нет.Хорошие новости - если вы запретите fam, &krusader; автоматически вернется на собственный механизм обновления ( с немного меньшей эффективностью работы) без необходимости пересборки. Вы можете запретить fam в $ su -c 'fam -l' .Для более подробной информации посмотрите документацию . + + + + + + + + Samba кодировка ISO 8859-x / что делать если &krusader; не может прочитать содержимое директорий в других локалях ? + + + &krusader; не управляет Samba .Если вам нужна другая кодировка вы должны вручную её настроить .Создайте или модифицируйте файл ~/.smb/smb.conf + [global] + workgroup = MyWorkGroup (ex. WORKGROUP) + client code page = MyCodePage (ex. 852) + character set = MyCharSet (ex. ISO8859-2) в вашем любимом текстовом редакторе. + + + + + + + + &krusader; говорит что "krarc:... протокол не поддерживается" при открытии файла архива. + + + Решение: установите правильно krarc slave: + Скопируйте файлы kio_krarc.so, kio_krarc.la в $KDEDIR/lib/kde3 + Копируйте krarc.protocol в $KDEDIR/share/services + или директорию , в которой находятся KIO slaves вашего дистрибутива &Linux;. + + + + + + + + Я получаю сообщение об ошибке "протокол не поддерживается в крусадер: "krarc:/путь/некоторый архив" , когда пытаюсь открыть файл архива + + + Иконки, kio_slaves и документация должны быть правильно установлены в дереве каталогов &kde;. Файлы kio_krarc.* быть в той же директории , что и остальные KIO slaves.Попробуйте : locate kio_tar.* и копируйте/сделайте ссылки на файлы kio_krarc.* в соответствующей директории. Не забудьте после запустить команду # ldconfig в соответствующей директории.Дополнительная информация здесь . + + + + + + + + + Почему у меня возникают проблемы с соединением по &FTP;? + + + Эта проблема часто возникает если вы защищены прокси или файрволлом.Откройте Open Центр управления KDE СетьНастройки , "Разрешить пассивный режим (PASV)" должно быть включено или выключено в зависимости от текущих настроек. Теперь попробуйте снова сделать соединение с &FTP;Также проверьте чтобы не было других соединений с &FTP; и открытых сессий (браузеры и т.д.), они могут создать проблемы. Дополнительную информацию можно найти в &active_passive_ftp_url; . + + + + + + + + Я получаю ошибку "Протокол FTP не поддерживается в &krusader;" когда пытаюсь открыть директорию на удаленном &FTP;. + + + Причина этой ошибки в том что работа &FTP; через &HTTP; прокси не включена в &krusader;.Эта ошибка вызвана неправильной настройкой прокси в &kcontrolcenter;.Выставьте в настройках не использовать прокси для &HTTP; и &FTP; и все будет работать. + + + + + + + + Как мне закрыть удаленное соединение (например соединение с FTP)? + + + Это объясняется в разделе удаленные соединения . + + + + + + + Почему у меня возникают проблемы с протоколом media:// ? + + + В настоящее время написание протокола the media:// находится в нестабильном состоянии , мы должны подождать пока команда &kde; устранит ошибки , все остальные протоколы в &krusader;, работают нормально , проблемы только с media. Допольнительная информация относительно этого вопроса доступна на нашем форуме . + + + + + + + + Как мне запретить системные звуки , например звук , когда происходит удаление ? + + + Это настройки Системный звук в &kde; и они не имеют отношения к &krusader;.Если вы хотите глобально запретить их , откройте &kde; &kcontrolcenter; (kcontrol): Центр управления KDE Sound & МультимедиаСистемные уведомления , Источник событий: "Системные уведомления KDE" и снимите отметки с ненужных уведомлений. + + + + + + + + + Что такое RemoteMan - это менеджер удаленных соединений ? + + + RemoteMan теперь заменен Менеждером закладок с Krusader 1.25-beta1.Менеджер закладок управляет локальными файлами и удаленными &URL;'s одинаково.RemoteMan будет удален в &krusader;-1.51 , есть возможность переноса ваших &bookmarks_lnk;.Он будет удален полностью в &krusader;-1.60. + Процедура переноса &URL; + + установите &krusader;-1.51 + + + Откройте RemoteMan и соединитесь с &FTP; + + + сделайте закладку для текущего положения , выберите имя и сохраните. + + + сделайте это для всех ваших соединений , все ваши &bookmarks_lnk; будут сохранены в файле krbookmarks.xml + + + установите &krusader;-1.60, он использует файл krbookmarks.xml или импортируйте его если понадобится. + + + + + + + + + Почему привязки к типу файлов не работают внутри архивов? + + + Когда вы входите в архив и нажимаете клавишу F3 для просмотра файла с неизвестным расширением , например файл README, INSTALL &etc; и если просмотрщик открывает его в режиме HEX просмотра вместо обычного , просто надо настроить :Центр управления KDE Компоненты KDEПривязки файлов Приложенияoctet-stream, binary viewer нужно удалить. + + + + + + + + Почему Руководство не работает ? + + + Эта ошибка случается в дистрибутивах &debian;(или на основе &debian;) с пакетом krusader_1.51-1_i386.deb.Вы видите следующее сообщение об ошибке , когда открываете Руководство "Запрашиваемый файл не найден. Проверьте правильность установки документации".Для устранения перейдите в /usr/share/doc/kde/HTML/en/krusader/, вы должны увидеть файлы foo.docbook.gz.Теперь распакуйте все эти файлы с привилегиями root в файлы foo.docbook.Теперь Руководство будет работать.Эта ошибка исправлена в пакете krusader_1.60.0-1_i386.deb и старших версиях. + + + + + + + + Why "save last location" doesn't work? + + + Unfortunately the 1.70.x version contains a bug. The tabs are not saved if a "Panels Save Settings=Tabs" item is present in the configuration files. The fix is easy: open and edit ~/.kde/share/config/krusaderrc remove the "Panels Save Settings" item and it'll work with the <Last Session> thing in Konfigurator. More info can be found in our forum . + + + + + + + + + +Основной &FAQ; + + + + + Как мне отослать пожелания , предложения или комментарии ? + + + В открытых проектах есть великолепная возможность обратной связи с пользователями. Почему нам нравится слушать то что вы хотите сказать ? Ваши "Трудности" это наши инструкции.После 6 месяцев программирования программисты не увидели своих ошибок .Это естественно.Мы нуждается в идеях , критике и обратной связи , потому что хотим сделать &krusader; лучшим , наиболее удобным файловым менеджером. + + Наиболее удобный способ для связи с нами - это использование &forum_lnk;, или списка рассылки пользователей &mailing_lists_url;.Что бы увидеть что сделано посмотрите &todoforum_url;.Дополнительные элементы в &todoforum_url; только для разработчиков .Свободное место для обсуждения &featureforum_url; форум &todoforum_url; не для этого.Если у вас есть новые идеи - &krusader; Krew добавит вашу просьбу в &todoforum_url;.Мы рассмотрим и обсудим каждое предложение.Дополнительная информация на форуме по ссылке here . + + + + + + + Как мне прислать заплатку ? + + + It's not easy to write some patch guidlines, but here we give a try. + + Заплатки , новый код и предложения всегда приветствуются! + + + + Если вам хочется , всегда можно начать обсуждение с разработчиками в списке рассылки пользователей &mailing_lists_url; или на &forum_lnk;.Несчастные , мы не сможем принять заплатку , если она расходится с "основным направлением" в коде &krusader;(читайте дальше). + + + + Опишите проблему сразу , так разработчикам будет проще пронять и принять , если это заработает.Пожалуйста присылайте по одному предложению в письме , так будет проще продолжать обсуждение!Изменения будут приниматься шаг за шагом , с проверкой каждой строчки. + + + + Присылайте все файлы или заплаты в письме.Большинство почтовиков изменяют пробелы , эти изменения не обрабатываются и код не работает. + + + + Используйте машинно-независимые решения, &krusader; запускается в : All POSIX (&Linux;/BSD/&UNIX;-like OSes), &Solaris;. All BSD Platforms (&freebsd;/&netbsd;/&openbsd;/&MacOS;). &kde; 3.3- &kde; 3.5.3 and even on GNOME with &kde;libs. GCC 2.95 - GCC 4.1 . Изменения в архитектуре делает только сама команда разработчиков. + + + + A final thing to note is: Keep always in mind, a patch might be reject. Either it has side effects, which we could not fix or it does contradict the idea behind the patched module. Here a software project differs from lets say a wiki: in a software project there is someone, who makes the final decission. Otherwise software will not work. Furthermore: Keep in mind, that the examination of patches might take time, as we all have private lifes. + + + + + + + + + + + + Как мне послать сообщение об ошибке? + + + Ошибки?!?!? Хорошо, у нас есть система отслеживания ошибок. + Используйте помощь в системе отслеживания ошибок , так как много ошибок уже известно. Это избавит нас от продолжительного чтения форума &krusader; в поисках вчерашней ошибки.Пожалуйста используйте эту систему. + Перед отправкой сообщения , прочтите следующее: + Используйте функцию поиска &kruforumsearch_url; на форуме &forum_lnk;, возможно ваша ошибка уже устранена.Пожалуйста НЕ ПИШИТЕ сообщения в &bugforum_url;( исключая случаи , когда вы уверены что нашли ошибку).Мы используем его для обсуждения ошибок. + Проверьте если ошибка уже есть в &online_buglist_url; системе отслеживания ошибок. + Если вы нашли упоминание о ней , пожалуйста подтвердите её в системе нажатием кнопки Submit New в окне.Пожалуйста подтвердите следующие параметры: используемая версия &krusader;, дистрибутив+версия &Linux;, тип процессора , и полное описание проблемы , которую вы решаете. + + Спасибо за ваше сотрудничество! + Если возможно , попробуйте проделать те же операции в &konqueror; или других приложениях &kde;.Если вы встречаетесь с подобной проблемой , тогда , возможно они в &kioslaves1_url; или ошибках &kde;(библиотеках) и не являются проблемой &krusader;.&krusader; использует библиотеки &kde; и &kioslaves2_url; для многих операций .В некоторых случаях это проблемы конкретного дистрибутива , неправильная настройка , пожалуйста убедитесь в этом прежде всего! + + Если вы нашли такую ошибку , пишите не в bugzilla http://bugs.kde.org/ &kde;.Напишите в &krusader; и отчет будет перенаправлен. + + + + + + + Имеет ли &krusader; список рассылки ? + + + Да , в настоящее время имеется 6 &mailing_lists_url;.Свободно можно подписаться и отписаться. + + Совет.Наши списки можно просматривать прямо в браузере или просмотрщике новостей , так вам не надо подписываться. + &krunews_url; - это очень небольшой по объему лист , используемый для новостей и анонсов новых версий или критических ошибок.Новости также можно прочитать на &krulatestnews_url; и на &newsforum_url; которые будут представлены в немного ином формате. + &krudevel_url; - это лист рассылки для разработчиков(только для чтения).Если вы хотите присоединиться к разработке &krusader; и попасть на передовую - это место здесь! + &kruusers_url; - это рассылка для пользователей &krusader;.Здесь вы можете спросить совет , и поговорить о &krusader; с пользователями и разработчиками. + &krui18n_url; - это лист рассылки для переводчиков. + &krudoc_url; - рассылка документации. + &krucommits_url; (только для чтения) - когда &krusader; вносит изменения в код CVS , это сообщается в данном листе рассылки.Этот лист позволит вам быть в курсе состояния разработки &krusader;! Хотите быть всегда в курсе ? Ожидаете новых возможностей/исправлений ? + + + + + + + + + + Есть ли в &krusader; ленты новостей? + + + Да , есть.Несколько лент доступны в различных форматах.&filereleasefeed_url;, &forumfeed_url;, &krunewsfeed_url;, &krudevelfeed_url; и также дополнительные ленты на gmane.org. &kruusersfeed_url;, &krui18nfeed_url;, &krudocfeed_url;. + + + + + + + + Есть у &krusader; канал в IRC ? + + + Есть.Поговорить с &krusader; Krew, и пользователями можно через серверы &freenode_url;Сервер irc.freenode.org, канал #krusader.Всегда рады. + + + + + + + + Как работает форум &krusader;? + + + В духе свободы слова , все что связано с &krusader; можно обсудить на нашем форуме.И не важно новичок вы , или продвинутый пользователь , всегда добро пожаловать.В этом и сила открытых проектов, в обратной связи с пользователями.С вашей помощью мы сделаем &krusader; лучшим , иначе мы не узнаем о появлении новых идей , которые есть у вас.Только будьте последовательны, только так мы сможем удержаться от хаоса. ;-) + + Если Документация, &faq_lnk;, &kruforum_url; и &krudevel_url;(пожалуйста пользуйтесь поиском) , не помогли вам, не стесняйтесь писать в форум. &krusader; Krew или сообщество , всегда сможет помочь вам. + + Пожалуйста используйте функцию &kruforumsearch_url; на &kruforum_url;, возможно ваш вопрос уже обуждался(это сократит размножение сообщений).Если ваша тема уже обсуждалась в прошлом , есть большой шанс того , что решение уже найдено.Если же обсуждение ещё идет , вы можете присоединиться к нему.Некоторый вопросы регулярно повторяются.Для этого мы сделали &faq_lnk; ;-) Это позволит нам больше времени уделять разработке &krusader;. + +Форум &kruforum_url; разделен на 6 частей: + &newsforum_url; все последние новости + &bugforum_url;:обсуждение ошибок , позалуйста НЕ ПИШИТЕ сюда (исключение , если вы не уверены что это ошибка). + &featureforum_url;:обсуждение новых возможностей &krusader; в будущих версиях. + &todoforum_url; here you will find the list of the planned features. Registered users will be able to VOTE and COMMENT on the TODO items. Here you get the chance to push your favourite features (+3) and still prefer certain features over others (+1), if you don't care about a feature just simply don't vote on that feature. Unregistered users may only browse the &todoforum_url;. The &todoranking_url; contains the results based on the votes. Adding ToDo items or removing ToDo items which have been implemented will be done by the &krusader; Krew. + &useractionsforum_url; обсуждение &useractions_lnk;.Пишите сюда ваши - это очень ценно.Мы планируем включить лучшие в следующие выпуски &krusader;. + &krugenforum_url;:здесь все что не связано и не относится к другим форумам в &krusader;. + + + Спасибо за ваше сотрудничество! + + Ты также предоставляем ленты RSS для форумов. Вас не нужно будет постоянно проверять наличие новых сообщений , новости сами придут к вам!Просто добавьте &rss_url; в ваш клиент RSS. + + + + + + + + Как мне перевести &krusader; на мой родной язык? + + + Пожалуйста посетите &i18n_page_url;.Перевести не трудно!Многие уже сделали это , только это требует некоторого времени. + + + + + + + Как мне помочь &krusader;? + + + Вы можете поддержать &krusader; многими способами: присылайте нам заплатки обратная связь, &faqbugreports_lnk;,пожертвования, переводы,... + + + + + + + Есть ли порт для &MacOS; X ? + + + Есть , только в нем нет всех возможностей как в версии для &Linux;.Посетите раздел &MacOS; X port для получения дополнительной информации.Рекомендованный , родной файловый менеджер для &MacOS; - это &disk_order_url;(условно бесплатный). + + + + + + + Есть ли порт для &Windows;? + + + Нет, возможно в будущем.Пожалуйста помогите нам, спасибо.Рекомендуем для &Windows; - это &tcmd_url;(условно бесплатный). + + + + + + + + + + + diff --git a/doc/ru/features.docbook b/doc/ru/features.docbook new file mode 100644 index 0000000..ed14c93 --- /dev/null +++ b/doc/ru/features.docbook @@ -0,0 +1,473 @@ + + + + +Возможности +Возможности + +Наиболее важные возможности и улучшения освещены здесь, этот список будет слишком длинным, если включить все. Полное описание всех возможностей вы найдете в этом руководстве и в файле &changelog_url;. + + + + + + + + Возможности &ofm_url; + + Две, легкие в использовании панели. + + + &cmdline_lnk; и опционально &termemu_lnk; внизу. + + + Сильная ориентированность на клавиатуру, возможность работать со всеми функциями без использования мыши. + + + Контекстно зависимое выполнение скриптов и программ, например щелчок мыши/открыть (выполнить или открыть в ассоциированном приложении), F3(просмотр и F4(редактирование). + + + &usermenu_lnk;, - создайте ваше специальное меню! + + + История для всего, например ⪚ История каталогов, Наиболее часто посещаемые &URL;ы, ... + + + &vfs_lnk; для например &remote_connections_lnk;, &archives_lnk;, результатов поиска, синхронизатора, ... + + + Мощный встроенный просмотрщик и редактор через kparts поддерживает все доступные форматы файлов! + + + &advanced_search_module_lnk; : поиск в архивах и удаленных файловых системах. + + + Несколько режимов просмотра в панели через &popup_panel_lnk;. + + + &remote_connections_lnk; : &FTP;/SAMBA с поддержкой SFTP/SCP через &kioslaves1_url; + + + + + + + + + + Инструменты &krusader; + + Менеджер монтирования + + + &syncdirs_lnk; + + + &diskusage_lnk; + + + &locate_lnk; + + + + + + + + + + + + + + + + + Возможности &krusader; + + Работа с архивами: просмотр, распаковка, упаковка, тестирование.Поддкрживаются &archives_lnk; : ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip и 7-zip. + + + Проверка-создание контрольной суммы поддерживается md5, sha1, sha256, tiger, whirlpool.Поддерживаются внешние инструменты md5deep и cfv. + + + Подсчет занятого пространства для файлов, каталогов, архивов и удаленных файловых систем. + + + Сравнение каталогов и фильтрация. + + + Сравнение файлов по содержимому через внешную программу &kompare;, &kdiff3_url; или &xxdiff_url;. + + + Переименовывание файлов и каталогов через &krename_url; + + + Полноценная поддержка перетаскивания: перетаскивайте из &konqueror; в a .tar.gz файл, из панели в Корзину, на рабочий стол или в &konqueror;! + + + Сохранение даты для локальных целей при копировании/перемещении. + + + F2 откроет Окно терминала в текущем каталоге. + + + Легкая правка прав файлов и владельца файла, и прав(цифровой вид). + + + Выбор фильтров используемых в синхронизаторе и поиске. + + + Возврат + + + Полная поддержка mimetype (с или без "magic"!). + + + вкладки на панелях и Вкладки в Редакторе/Просмотрщике. + + + &rootmode_lnk;, &quick_search_lnk; + + + Разделитель файла. + + + Жесты мыши. + + + Быстрая навигация в панели адреса. + + + &whatsthis_url; функция помощи подсказками. + + + &sync_browsing_lnk; + + + + + + + + + + Настройте &krusader; под себя + + Конфигуратор - это центр настройки &krusader;. + + + &main_toolbar_lnk;, Меню UserActions для пользовательских действий и закладок. + + + Комбинации клавиш. + + + Цвета. + + + &panel_profiles_lnk; + + + &bookmark-manager_lnk; + + + &mouse_selection_modes_lnk; + + + Многие возможности настраиваются в вкладке запуск. + + + + + + + + + + Дополнения &krusader; + + &useractions_lnk; + + + &javascript_console_lnk; + + + &color_profiles_lnk; + + + &keybindigs_profiles_lnk; + + +Отправьте/загрузите свои любимые настройки/расширения/модули на &kde_files_url;! + + + + + + + Новые возможности в CVS версии(будущий релиз 1.80.0) + + Усовершенствование работы с архивами + + Поддержка паролей для: arj, ace, rar и zip. Пароли будут сохраняться в &kwallet; + + + + поддержка 7-zip, через внешние приложения 7z и 7za. + + + + Автоопределение, позволит вам открывать "скрытые архивы" (например, документы &openoffice; которые фактически являются архивами zip с другим расширением в имени файла) + + + + Упаковка/распаковка в фоне. + + + + + + + Улучшения в &useractions_lnk;. + + + + Кнопка Media. + + + + Копирование/перемещение: сохранение всех атрибутов (время, владелец, группа). + + + + Тусклые цвета для неактивной панели. + + + + Переименовывание файла без смены расширения, одиночный режим, сворачивание в системный лоток, проверка выхода в конфигураторе + + + + Элементарные расширения (ЕЩЁ НЕ ДОКУМЕНТИРОВАНО). + + + + Контекстное меню для закладок и разрешение/запрещение специальных закладок в контекстном меню. + + + + Изменение Меню. + + + + Улучшения в &termemu_lnk; (ЕЩЁ НЕ ДОКУМЕНТИРОВАНО). + + + + Улучшения в &synchronizer_lnk; (ЕЩЁ НЕ ДОКУМЕНТИРОВАНО). + + + + Улучшения в быстрой навигации (ЕЩЁ НЕ ДОКУМЕНТИРОВАНО) + + + + . + + + + + Много исправлений. + + + + TODO ...ЕЩЁ НЕ ВКЛЮЧЕНО В РУКОВОДСТВО ... + + + + ПРИМЕЧАНИЕ: НЕ ВСЕ ВОЗМОЖНОСТИ ОПИСАНЫ В РУКОВОДСТВЕ + + + + ЭТОТ СПИСОК НЕ ПОЛОН ...Если кто-то хочет помочь, посетите &contribute_url;, свяжитесь с Франком.Чтобы узнать больше прочитайте &changelog_url; и &cvsnews_url;. + + + &dev_cvs_note; diff --git a/doc/ru/glossary.docbook b/doc/ru/glossary.docbook new file mode 100644 index 0000000..2d4b64e --- /dev/null +++ b/doc/ru/glossary.docbook @@ -0,0 +1,190 @@ + + + + +This chapter is intended to explain the various words which have been used throughout the &krusader; documentation. If you feel any acronyms or terms are missing here, please don't hesitate to contact the &krusader; documentation team. Thank you! + +NOTE: This page is work in progress, Matej Urbancic is working at the Glossary. + + + +A + +bla bla. + + + + +B + +bla bla. + + + + +BSD + +Berkeley Software Distribution; here refers to any of several free &UNIX;-compatible operating systems derived from BSD &UNIX;. + + + + +CVS + +Concurrent Versions System; a software configuration management system used by many software projects including &kde; and &krusader;. + + + + +DEB + +This is a binary file format that is used by &debian; and &debian;-based distributions. This will be the suffix of a file specifically for these distributions. An example would be krusader_1.70.1-1_amd64.deb For more information on installing these files, refer to the Debian Web Site. + + + + +&FTP; + +&FTP; is the File Transfer Protocol; it is an Internet protocol that allows you to retrieve files from so-called &FTP; servers. + + + + +GPL + +GNU General Public License; a software license created by the Free Software Foundation defining the terms for releasing free software. + + + + +&GUI; + +Graphical User Interface + + + + +H + +bla bla. + + + + +&kde; + +K Desktop Environment; a project to develop a free graphical desktop environment for &UNIX; compatible systems. + + + + +RPM + +This is the binary file format for distributions based on the Red Hat package manager, a widely used packaging tool for the &Linux; operating system. If you still have to get &krusader; and your system supports RPM packages, you should get &krusader; packages ending in .rpm. They are very easy to use. + + + + +&URL; + +&URL; is an abbreviation for Universal Resource Locater. A universal resource locater is the technical term for what is commonly referred to as a websites address. Examples of URLs include http://krusader.sourceforge.net and &remote_connections_lnk;. + + + + +S + +bla bla. + + + + +Y + +bla bla. + + + + +Z + +bla bla. + + + + diff --git a/doc/ru/help.docbook b/doc/ru/help.docbook new file mode 100644 index 0000000..80777e3 --- /dev/null +++ b/doc/ru/help.docbook @@ -0,0 +1,142 @@ + + + +Помощь &krusader; + +Здесь вы можете присоединиться к &contribute_url; для &krusader; .Если вы чувсвуете , что сможете помочь , не стесняйтесь , свяжитесь с нами .Спасибо ! + + +Документация +Документация &krusader; нуждается в авторах для поддержания в актуальном состоянии(мы присматриваем новых авторов).Черновики с пояснениями нововведений доступны в списке рассылки разработчиков , мы нуждаемся в редакторах для внесения информации в Руководство.Играясь с новыми возможностями эти редакторы могли бы дать ценную информацию для разработчиков чтобы сделать нововведения как можно лучше ! + + +&krusader; дополнения +Пожалуйста загружайте ваши дополнительные расширения на &kde_files_url;, так они станут доступны сообществу пользователей &krusader;. Возможно они станут частью &krusader; в следующем выпуске :-)) Это возможности Keymaps, Цветовые схемы, User Actions, JavaScript Extensions. +Пользовательские действия обсуждаются тут &useractionsforum_url; , пожалуйста присоединяйтесь! + + +Распространение слова &krusader; +Если вам понравился &krusader;, let people know! Пишите статьи и обзоры для публикации в Интернет.Предложите вашим друзьям попробовать &krusader;.Учавствуйте в форумах и помогайте сообществу. + + +Переводы +&krusader; переведен на множество языков , обычно некоторые переводы нуждаются в обновлении и новые переводы всегда приветствуются , пожалуйста посетите &i18n_page_url; .Если для вашего родного языка уже есть переводчик , всегда будет полезно иметь второго или третьего ⪚ для корректировки перевода.Иногда текущий переводчик не может обновить перевод , когда это необходимо (учеба,праздники,...).Пожалуйста свяжитесь с переводчиком на ваш родной язык , он всегда будет рад предложенной помощи. Любой перевод (даже частичный) будет принят в &krusader;-Krew в любое время . + + +Открытое использование +В настоящее время мы не имеем значимых пожертвований , заинтересованные пользователи могут спросить нас на &donate_url; проекта. &krusader; есть и будет свободным , во все времена под публичной лицензией GNU. +Этот проект объединяет программистов и специалистов по эргономике в попытке улучшить качество работы пользователя.Наша цель сделать работу и диалог с компьютером дружественным и понятным для каждого.Мы нуждаемся в ваших комментариях , что сделать это как можно лучше.Если вы находите что какая-то часть программы слишком сложна , помогите нам сделать её проще. + + +Пожертвования +В настоящее время мы не имеем значимых пожертвований , заинтересованные пользователи могут спросить нас на &donate_url; проекта. &krusader; есть и будет свободным , во все времена под публичной лицензией GNU. + + +Сборщики +Мы всегда нуждаемся в сборщиках для различных дистрибутивных пакетов : rpm's, deb's, etc. Всякая помощь приветствуется. + + +Обратная связь с пользователями &krusader;порта &MacOS; +Крусадер портирован на &macosx_download_url; с &fink_url; и библиотеками libs, сопровождается &bodo_tasche_url;, и обратная связь приветствуется. + + +Портирование &krusader; для &Windows; +&krusader; написан с использованием &Qt; и зависит от библиотек &kde;. Долгое время они были недоступны для портирования &krusader; под &Windows; - это не давало выбора. Однако , мы верим , с портированием библиотек &kde; на &Qt;4 под лицензией GPL попытки портирования завершатся успешно , мы будем в деле и нуждаемся в поддержке для портирования &krusader; под &Windows;. + + +Часто задаваемые вопросы +Если у вас есть вопросы , которые отсутсвуют на &faq_lnk;, мы готовы выслушать их. + + +Другое +Обратная связь, Отчеты об ошибках, заплатки, &etc; всегда добро пожаловать! Огромная сила открытых проектов в помощи пользователей. + + +На некоторых сайтах подобных &freshmeat_url; или &kde_apps_url; вы можете выставлять рейтинг , если вам понравился &krusader; посетите один из сайтов и добавьте рейтинг &krusader;, заранее спасибо. + + + diff --git a/doc/ru/index.docbook b/doc/ru/index.docbook new file mode 100644 index 0000000..0dfaca9 --- /dev/null +++ b/doc/ru/index.docbook @@ -0,0 +1,1113 @@ + + + + + + + + + + + + + +Backspace"> + + + + + + +Online Handbook'> +&krusader; Screenshot'> +mail'> + +Krusader website'> +here'> +contribute'> +Donate'> + +&krusader; Forum'> +Search'> +General Discussion Forum'> +News and Announcements Forum'> +Bug Discussion Forum'> +New Features Discussion/Requests Forum'> +ToDo Forum'> +ToDo ranking system'> +UserActions Forum'> +here'> +&krusader;'s Cutting Edge page'> +Active &FTP; vs. Passive &FTP;, a Definitive Explanation'> + +ViewCVS'> +Sourceforge mirrors'> +ChangeLog'> +CVSNEWS'> +Documentation ChangeLog'> +i18n page'> + +requirements on &debian;'> +mailing lists'> +&krusader;-news'> +latest news'> + +&krusader;-commits'> +&krusader;-devel'> +&krusader;-users'> +&krusader;-doc'> +&krusader;-i18n'> + +rss-forumfeed'> +rss-filerelease feed'> +krusader-news feed'> +krusader-devel feed'> +krusader-users feed'> +krusader-i18n feed'> +krusader-doc feed'> + +online bug list'> +more translator credits'> + + +Subversion'> +Browse the Subversion Repository'> + +Filesystem Hierarchy Standard (FHS)'> + + +&krusader; downloadpage'> +&gentoo; Live Ebuild'> + +&gentoo;'> +&SuSE;'> +&mandriva;'> +&freebsd;'> +&debian;'> +&netbsd;'> +&yoper;'> +&MacOS;-X'> +&ubuntu;/&kubuntu;'> +&linspire;'> +&archlinux;'> +&frugalware_linux;'> +&pclinuxos;'> +&altlinux;'> +&ccuxlinux;'> +&lunarlinux;'> +&qilinux;'> +&rocklinux;'> + +klik protocol'> +klik://krusader'> +klik://krusader-latest'> +klik://krusader-cvs'> +available'> +stable &krusader;'> +cvs snapshot of &krusader;'> + + +&fedora; Extras'> +Distrowatch.com'> + +dag.wieers.com'> +Dries Verachtert RPM Repository'> +Portpkg'> +&krusader; SlackBuild'> + +freshmeat.net'> +rpmfind'> +rpmpbone'> +rpmseek'> + +kde-files.org'> + + +xxdiff'> +Kdiff3'> +Krename'> +Kasablanca'> +Kftpgrabber'> +XBEL standard'> +KDE-APPS.org'> +rpm.org'> +RPM Guide'> +KIOSlaves'> +KIOSlaves'> +KIOipod-slave'> +&kde;libs'> +&kde;base'> +GNOME'> +AfterStep'> +XFce'> + +in our forum'> +instructions'> +freenode.org'> +fink'> +KJSEmbed'> + +Orthodox File Manager (OFM)'> +Disk Order'> +&apple; X11'> +&apple; X11 SDK'> +Bodo Tasche'> + +Sourceforge.net'> +OpenUsability.org'> + +WhatsThis'> + + + + +Context Menu'> +Virtual file systems (VFS)'> +Mouse Selection Modes'> +Konfigurator Startup page'> +Konfigurator Look & Feel page'> +Konfigurator General page'> +Konfigurator Dependencie page'> +Konfigurator Protocol page'> +View menu'> +Edit menu'> +Compare Directories'> +FN Keys Bar'> +Main Toolbar'> +Actions Toolbar'> +Statusbar'> +Location Toolbar'> +Root mode'> +Settings menu'> +Key-Bindings'> +Key-binding Profiles'> +Color Profiles'> +Synchronizer'> +Synchronize Directories'> +Split file'> +Combine files'> +KDEDIR - QTDIR'> +UserActions'> +User Menu'> +FAQ'> +&krusader; Forum'> +help request'> +List Panel'> +PopUp Panel'> +Quick search'> +Locate &GUI; frontend'> +Folder tabs'> +MountMan'> +Command Line'> +Terminal emulator'> +&FAQ; missing libs or headers'> +Panel profiles'> +Sync-browsing'> +Disk Usage'> +Bookmarks'> +Bookmark-Manager'> +Advanced Search module'> +JavaScript console'> +archives'> +Remote Connections'> +krusaderrc'> + +Installation procedure'> +This feature is temporarily disabled and will be rewritten, sorry.'> +bug reports'> +Bug reports.'> +This is a new feature that can be considered as "beta". &hesbugreport_lnk; + User feedback is always welcome!'> +This is a new feature under development. Some descriptions may become obsolete if functionality changes during development. &hesbugreport_lnk; + User feedback is always welcome!'> +This module was rewritten. Some descriptions may become obsolete if + functionality changes during development. &hesbugreport_lnk; + User feedback is always welcome!'> +If you install a CVS or beta version and if &krusader; was previously + installed on your computer, then you should delete the krusaderui.rc file + in your home directory to activate the new menu entries + $ rm + , click here for more info.'> + +&GNU; General Public License (GPL)'> + + + If you are using a development or + CVS version, it is possible that the latest + new features are not yet in the "The Krusader Handbook". + Please read the &changelog_url; file online or in the &krusader; + sources to find out more about the new features. + For a brief description, please read the &cvsnews_url; file online + or in the &krusader; sources. + User feedback and + Bug reports are always welcome! + '> + + + +Folder Tabs'> +Right-click'> + + + +Midnight Commander'> +xxdiff'> +Krename'> +kget'> +Filelight'> +Kdevelop'> +KeditBookmarks'> +Kwallet"> + + +Fedora'> +Yoper'> +OpenLX'> +Apple ipod'> + + +FreeBSD'> +Debian'> +Mandriva'> +Gentoo'> +Mepis'> +Ubuntu'> +Kubuntu'> +Linspire'> +Xandros'> +Slackware'> +Ark Linux'> +Arch Linux'> +NetBSD'> +OpenBSD'> +Knoppix'> +Frugalware Linux'> +PCLinuxOS'> +altlinux'> +Source Mage'> +Kanotix'> +Lunar Linux'> +CCux Linux'> +QiLinux'> +ROCK Linux'> + +NVIDIA'> +Norton Commander'> +OpenOffice'> +Firefox'> +Safari'> +Apple'> + + +FreeBSD'> +Total Commander'> +&tcmd;'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + +Руководство Крусадер + + + ShieErlich Первый автор Руководства +
erlich@users.sourceforge.net
+
+ + RafiYanai Первый автор Руководства +
yanai@users.sourceforge.net
+
+ + DirkEschler Вебмастер & координатор локализации +
deschler@users.sourceforge.net
+
+ + CsabaKarai Разработчик +
ckarai@users.sourceforge.net
+
+ + HeinerEichmann Разработчик +
h.eichmann@gmx.de
+
+ + JonasBähr Разработчик +
jonas.baehr@web.de
+
+ + Frank Schoolmeesters Документация & маркетиновый координатор +
frank_schoolmeesters@yahoo.com
+
+ + RichardHolt Документация & корректор +
richard.holt@gmail.com
+
+ + MatejUrbančič Маркетинг & исследования +
matej.urban@gmail.com
+
+ +
+ + + 2000 + 2001 + 2002 + 2003 + Rafi Yanai + Shie Erlich + + + + 2004 + 2005 + 2006 + Krusader Krew + + + Разрешается копировать , распространять и/или изменять этот документ согласно с условиями GNU Free Documentation License , Версия 1.1 или любая последняя версия , опубликованная Фондом свободного программного обеспечения .Копия лицензии включена в исходные коды &krusader;. + + 2006-08-26 + 1.80.0 "cvs repository" + + + &krusader; - это продвинутый , двухпанельный файловый менеджер для КДЕ и других деcктопов в мире *nix + + + + КДЕ + крусадер + КДЕ + менеджер + файловый менеждер + двухпанельный + файловый + manager + двух-панельный + менеджер для линукс + менеджер для КДЕ + + +
+ + + &help; + &editors-note; + + + &introduction; + &features; + &user-interface; + &using-krusader; + &commands; + &keyboard; + &mouse; + &krusader-tools; + &konfigurator; + &faq; + &credits; + + + &installation; + &configuration-files; + &useraction-xml; + &release-overview; + + + &glossary; + + + &documentation.index; + +
+ diff --git a/doc/ru/installation.docbook b/doc/ru/installation.docbook new file mode 100644 index 0000000..462446c --- /dev/null +++ b/doc/ru/installation.docbook @@ -0,0 +1,1170 @@ + + + + +Installation + + +Requirements + +In order to successfully use the most recent &krusader;, you need &kde;libs >= 3.4 + +Required &kde; version: + &krusader; v1.01: &kde; 2 + + &krusader; v1.02 - 1.40: &kde; 3.0 - &kde; 3.2 + + &krusader; 1.40: prefers &kde; 3.2 (otherwise not all features will be available) + + &krusader; v1.50 - v1.51: &kde; 3.2 - &kde; 3.3 (Konfigurator crash on &kde; 3.4) + + &krusader; v1.60.0 - v1.70.0: &kde; 3.3 - &kde; 3.5 + + &krusader; 1.70.0: prefers &kde; >= 3.4 (otherwise not all features will be available) + + &krusader; v2.xx.x: &kde; 4 - &Qt; 4 The big challenge, maybe a first release in 2006 ;) + + + + +Platforms: + All POSIX (&Linux;/BSD/&UNIX;-like OSes), &Solaris;. + All BSD Platforms (&freebsd;/&netbsd;/&openbsd;/&MacOS;). + + + +&krusader; uses about 3-4 MByte of memory to run (and about 15 Mbyte shared memory which is also used by other processes), but this may vary depending on your platform and configuration. In order to handle archives the archivers must be configured here. + +A package of popular (un)packers, &krusader; itself and addons can be found on the &krudownload_url;. + +For more requirements, continue to read this chapter and read also the &faq_lnk; section. + + + + + +How to obtain &krusader; + +The latest information about &krusader; can be found on the &kruwebsite_url; . + + +Download &krusader; + +It's recommend to use the &krusader; package that is provided by your distribution, &distrowatch_com_url; is a great resource to check the availability. If your distribution does not offer &krusader; please contact the creators of your distribution and ask them to provide a &krusader; package, thanks! + +The latest version (and older versions) can be found on the &krudownload_url; and on the &sfmirrors_url;. It contains the source tarballs, RPM and DEB packages to whatever distro the &krusader;-Krew is using and packages build by third-parties and &krusader; users. + +Distributions who provide &krusader;: &suse_download_url; +>= 9.3, Note: please use &krusader;-1.60.0 and not &krusader;-1.51 (might be instable on &SuSE;9.3-&kde;3.4) &fedora; via &fedora_extras_url; # yum install krusader will do the job, thanks to Marcin Garski. &RedHat; RPM packages can usually found on the &krudownload_url; or at &dag_wiers_download_url; and &dries_verachtert_download_url; . &debian_download_url;, on our &krudownload_url; you might find more recent "unofficial bleeding-edge" DEB packages. Note: usually &debian; packages work also on distributions who are "based on &debian;", some of these provide their own (incompatible) packages. &ubuntu_kubuntu_download_url;, &linspire_download_url;, &knoppix; 4.x DVD, &kanotix;, ... &mandriva_download_url; via the contrib repository # urpmi krusader will do the job, &gentoo_download_url;, &yoper_download_url; &archlinux_download_url;, &frugalware_linux_download_url;, &pclinuxos_download_url;, &altlinux_download_url; &freebsd_download_url;, the port is maintained by Heiner Eichmann . &netbsd_download_url;, &lunarlinux_download_url; ,&arklinux;, &openlx;, &sourcemage;. Even more distributions can be found with &distrowatch_com_url; Use the installation tools that your distro uses to install the &krusader; package, sometimes an internet connection is needed if &krusader; is not available on the &CD; or DVD. There are probably more distributions out there who include &krusader;, sorry we can't mention you all, though feedback is always welcome to improve this distrolist. + +Others + + &slackware; tgz binaries can usually found on the &krudownload_url;, or use &portpkg_url; that contains a &kru_slackbuild_url;, # portpkg krusader will do the job. + + + There is a &macosx_download_url; port with the help of &fink_url; , the port is maintained by &bodo_tasche_url; . + + + + +Installation via the &klik_protocol_url; . + + &klik_krusader_url; downloads &krusader; provided by &debian; stable, more information is &klik_available_url; . + + + &klik_krusader_latest_url; downloads the latest &klik_stable_krusader_url; provided by the &krusader; Krew. + + + &klik_krusader_cvs_url; downloads a &klik_cvs_krusader_url; provided by the &krusader; Krew. + + + + + + + +Search engines You can also find packages on &Linux; software archives such as &freshmeat_url; or &kde_apps_url; . If you can't find a package for your distribution, we recommend searching for it with &rpmfind_url; , &rpmpbone_url; or &rpmseek_url; . If you like &krusader; go to one of these sites and rate &krusader;, thanks. + + +If you still can't find a package, please don't worry. We provide a very detailed installation procedure. This very thorough HowTo shows even newcomers how to compile &krusader; from source, even if you've never compiled a program from source. Please continue to read this chapter ;) + + + + +Version scheme +We use a new version scheme since &krusader;-1.60.0 First digit - the major version Second digit(s) - percentage of features completed for this major version third digit(s) - bugfixes. So in essence, releasing &krusader;-1.60.0, means that we believe that &krusader; is about 60% done with all the features we'd schedule for the 1.x.x series. Series 2.x.x will be &kde; 4.x releases. We hope it'd be easy to understand. + + + +Stable version +krusader-x.xx.tar.gz +&krusader; is released under the &gpl_lnk;, this means that THE PROGRAM IS PROVIDED "AS IS" WITH NO WARRANTY OF ANY KIND, even when it is marked as a stable release. + + + + +Development version (beta release) +krusader-x.xx-betax.tar.gz +Before every stable release we release at least one development version, so that we can hunt down the bugs. + +These releases are beta releases and will probably contain some bugs. &dev_cvs_note; The beta release has 3 goals: + + Apply a feature-freeze until the stable is released, only bugs will be fixed. New features have to wait until the stable is released. + + + Obtain feedback from &krusader; users so that we can fix the bugs. + + + Give translators the time to update the translations, for the coming stable. Please read the &i18n_page_url; + + + + + + + + +CVS builds +krusader-cvs-yyyymmdd.tar.gz + +These builds are untested and come without any warranty. They may contain bugfixes, new features or new bugs! + +We provide daily snapshots of &krusader;'s CVS version. For those who are interested, the nightly tarball can be found on the &krucutedge_url;. Depending on the stage of development, this version will either be stable or unstable. Just before a stable release, the CVS version is almost stable. After a stable release new features will be committed into CVS, which might lead to the appearance of bugs. In some rare cases, the build will even not compile if we make a mistake, in that case we try to fix the mistake as soon as possible. + +&krusader; provides 2 nightly snapshots: + + krusader-cvs-yyyymmdd.tar.gz: make -f Makefile.cvs must be run before the ./configure script is available + + + krusader-cvs2-yyyymmdd.tar.gz: for users who have problems with the make -f Makefile.cvs command, we have already done this for you and the ./configure script is included in the tarball (This tarball is a bit bigger then the first one). + + + + +Checkout from CVS. &krusader; can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the &Enter; key. + Currently, there are two module options: + krusader_kde2: the &kde;2 branch, stable but it's basically v1.01 and there are no planned changes + krusader_kde3: the &kde;3 branch, that we currently use + + +To checkout &krusader; from CVS: $ cvs $ cvs (note: updates from within the modules directory do not need the -d parameter) + +If you want to checkout a specific version of &krusader; from CVS (⪚ &krusader;-1.60.0) : $ cvs + + +If you want to checkout a specific date of &krusader; from CVS (⪚ &krusader;-2005-05-23) : $ cvs + + +Mostly being &gentoo; users, we provide a &gentoo_life_ebuild_url; for all those who want to stay on the bleeding edge of filemanagement and don't want to miss the advantages of portage. Please take a look at our &krucutedge_url; for more installation details. + +We also provide &viewcvs_url; to browse the CVS repository. + + + + + +Subversion +&subversion_url; will probably used for the &krusader; 2.x series for &kde;4. It's also possible to &browse_svn_repo_url;. + +To checkout the latest &krusader; 1.x for &kde; 3 from SVN: (NOTE: at moment of writing it's recommend to use CVS for krusader_kde3, since krusader_kde3 is developed in CVS and not in SVN) $ svn To checkout the latest &krusader; 2.x for &kde; 4 from SVN: (NOTE: not yet available at moment of writing) $ svn + + + + + +Older releases +Looking for older releases? Try the &sfmirrors_url; available from our project page. + + + + + + +Compilation and installation + + +I have downloaded the sources for &krusader;. What now? + +Check the environment variables &kdeqtdir_lnk;. + +In order to compile and install &krusader; on your system, type the following in the base directory of the &krusader; package: + +$ ./configure +$ make +$ su -c 'make +&krusaderui_rc_text; Since &krusader; uses autoconf and automake you should have no trouble compiling it. Should you run into problems please read the detailed installation instructions below. + + + + + +Installation Tutorial + +The next section will explain step by step, in detail, how to install &krusader;. This question has been asked many times and especially users new to &Linux; often have problems compiling software from source. Therefore, we are trying to keep the explanations as detailed as possible even if they are mostly not &krusader; specific. Experienced users may easily skip most of the steps. + +Because not all &Linux; distributions do follow the &fhs_url; it's unfortunately impossible to write a tutorial that always works in all circumstances, but with these guidelines will be a big help in the right direction. + +If you encounter problems, please read first this installation procedure and the &faq_lnk;, if this does not solve your problem then feel free to ask for help with an &help_request_lnk;. + + + + + Install all needed packages and libraries that you need for the compilation, please read the &faq_lnk;. If you install &kdevelop; then (almost) everything that you need to compile &krusader; will be installed on your computer, BUT please don't use &kdevelop; to compile &krusader; if you are not a developer (possible automake hell), just follow the next instructions. + + + + + + Open your favourite terminal emulator (⪚ &konsole;). + + + + + +We recommend you create a separate directory to keep all the sources you compile in. This will give you a better overview of installed programs and makes it easier to uninstall them later. $ mkdir ~/source The chosen directory is just an example, any other will work. + + + + + + + Copy the sources to the ~/source directory and unpack them. $ cp /"your_dir"/krusader-x.xx.tar.gz ~/source + $ cd ~/source + $ tar krusader-x.xx.tar.gz + + + + + +Optional step: the tarball is no longer needed at this point, you can delete it if you want or you can keep it if you like. $ rm krusader-x.xx.tar.gz + + + + + + Change to the directory containing the sources. $ cd krusader-x.xx + + + + + +Check the environment variables QTDIR and KDEDIR. &krusader;'s ./configure script needs to know where the &Qt; and &kde; directories are. + +QTDIR : <path to your Qt installation>/usr/lib/qt3 or /usr/qt3 + +KDEDIR : <path to your KDE installation>/usr or /opt/kde3 + +Normally your distribution will set them for you, but experience has shown that some don't. You can easily check the values with the echo command. $ echo $QTDIR +/usr/lib/qt3 +$ echo $KDEDIR +/usr If both commands give an output, the enviroment variables are set (the above example are the settings of &mandriva;-&Linux;). In case you just receive empty lines, the variables are not set and you have to set them it manually. If you have no idea what to set the variables to, or if you want to check if the variables are correctly set, ask your distributor or use the find command. $ find qtconfig +/usr/lib/qt3/bin/qtconfig +$ find kdeinit +/usr/bin/kdeinit In this case /usr/lib/qt3 is your QTDIR and /usr is your KDEDIR. The installed binaries will go to /usr/bin. Now we will set the enviroment variables with the export command. $ export QTDIR=<replace with your QTDIR> +$ export KDEDIR=<replace with your KDEDIR> + + + These enviroment variables are only set for the lifetime of your current shell. When you close your terminal and open a new one they will be gone. Assuming &krusader; is not the only &Qt;/&kde; program you want to compile, we recommend to make these settings permanent (⪚ append both export commands to your /etc/profile) file. + +If you can't determine your KDEDIR than kde-config --prefix might help you. + + + + + + + + + + If you have downloaded a stable version "krusader-x.xx.tar.gz" or a beta version "krusader-x.xx-betax.tar.gz", you can skip this step, in this case the ./configure script is provided. + + If you have downloaded a CVS build or nightly tarball "krusader-cvs-yyyy-mm-dd.tar.gz"", you will have to run the following command to create the ./configure script: $ make Makefile.cvs + + If everything is OK you will see the following output on your screen: $ make Makefile.cvs +This Makefile is only for the CVS repository +This will be deleted before making the distribution +*** Creating acinclude.m4 +*** Creating list of subdirectories +*** Creating configure.in +*** Creating aclocal.m4 +*** Creating configure +*** Creating config.h template +*** Creating Makefile templates +*** Postprocessing Makefile templates +*** Creating date/time stamp +*** Finished +Don't forget to run ./configure +If you haven't done so in a while, run ./configure --help +$ + + + You will need to have: autoconf 2.52, 2.53 or 2.54 and automake 1.6 (or higher) to run the make -f Makefile.cvs command + + If you encounter problems with this command click here. &krusader; provides 2 nightly builds (snapshots) one with a ./configure script and one without. + + + + + + + + Your &Linux; distro &krusader; RPM or DEB package will usually install &krusader; in the KDEDIR/bin directory. According to the &fhs_url;, any user installed files should go to the /usr/local directory, but in some cases you might want that &krusader; will be installed in an other directory, this behaviour can be determed with the prefix option. If you don't have root access /home/YOUR_USERNAME/.kde is probably a good choice. $ ./configure + + This will take about 1 minute, if everything goes well it will ⪚ end with the following messages: + + + +foo + +Krusader Project: +----------------- +Source code location: . +C Compiler: gcc +C Compiler flags: -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith +-Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 +-Wformat-security -Wmissing-format-attribute +C++ Compiler: g++ +prefix: /usr/local +kde_libraries: /usr/include +kde_includes: /usr/lib +kde_locale: /usr/share/locale +qt_libraries: /usr/lib/qt3/lib +qt_includes: /usr/lib/qt3/include +KDEDIR: /usr +QTDIR: /usr/lib/qt3 +Install path: /usr/local/bin +krusader version: 1.51 +krusader binary: /usr/local/bin/krusader (after 'make install') +Thank you for using Krusader + +Good - your configure finished. Start make now +bash$ + + + +This is the output for &Mandrake;-&Linux; 10, other distributions may give a different output. + +At the end of the ./configure script you will find a summary of the most important settings, ⪚ where the &krusader; binary will be installed (after the 'make install' command). This part will also display a warning if the environment variables &kdeqtdir_lnk; are empty. + + + +Since &krusader;-1.70.0 ./configure has two specific &krusader; options: ./configure : build Krusader without support &konqueror;'s servicemenus, default=with. This means that &konqueror;'s right-click menu entries will not be available. ./configure : build Krusader without JavaScript support, default=with. This means that the &javascript_console_lnk; will not be available. In the past the support was always compiled in when the headers where found, now you have the choice. + +Use ./configure to see more options or read the INSTALL file in the &krusader; sources. + +If you dit use the an other --prefix= than $KDEDIR or /usr/local , then it can't hurt to do an extra check: $ kde-config +/home/frank/.kde/bin/:/usr/bin/:/usr/local/bin/ +$ If the <prefix_dir/bin> directory is not shown, you need to use e.g. export KDEDIRS=/usr/local:/usr. To make these settings permanent you can ⪚ append this export command to your /etc/profile file. Than you need to restart &kde;, and check again. + + + If ./configure fails, take a look at &missing_libs_lnk;. + + + + + + + + Start the compilation process with the make command. $ make This will take about 10 to 40 minutes, if everything goes well it will ⪚ end with the following messages: foo +make[2]: Leaving directory `/home/source/krusader_kde3/tar' +make[2]: Entering directory `/home/source/krusader_kde3' +make[2]: Leaving directory `/home/source/krusader_kde3' +make[1]: Leaving directory `/home/source/krusader_kde3' +bash$ + + + + + + If ./configure was successful and make failed for some reason, continue to read this page. If you can't find any solution for your problem then feel free to post a help request at our &forum_lnk;. + + + + + + + If nothing went wrong, you can now install &krusader;. $ su -c 'make You will be asked to enter your root password. + + + + + + +&krusaderui_rc_text; + + + + Now you can start &krusader;. + + + + + + + Optional step: if you want you can clean up to save some diskspace. Note: in this case all the compiled files created with the make command will be deleted. $ make + + + + + + + + + If you ever want to uninstall &krusader;, just use $ su -c 'make You will be asked to enter your root password. + + + + + + + +If you encounter problems with installing &krusader; please read first the &faq_lnk;. If this installation procedure and the FAQ does not solve the problem, feel free to ask for help with an &help_request_lnk;. + + + + + + + + + +&MacOS;-x port + +Krusader is ported to &MacOS; thanks to Jonas Bähr and &bodo_tasche_url; . Unfortunately the only *stable* kdelib-binaries which &fink_url; has to offer is currenly 3.1.4 which means you need to use &krusader;-1.40 . Unfortunately the &MacOS; X &krusader; port doesn't have the same power as in a native &Linux;-&kde; environement. To run &krusader; you need also X11 which doesn't realy interact with the rest of the &MacOS; desktop (drag and drop, etc...) We hope that &Qt;4/&kde;4 will solve most of these problems. When you want a higher Krusader version than you need to compile &kde; , what is not so difficult with &fink_url; but it takes some CPU cycles. + + +Installation Instructions for &krusader;-1.40 + + + Download and install &fink_url; with the &kde;3.1 binaries provided by fink and read the documentation. + + + + Extract the krusader-1.40.fink.darwin-ppc.tar.bz2 package to /sw/fink/dist/local/main/ Only root can write here, you may have to create 'local' and 'main' + + + + Run as root: fink install krusader + + + + + + +If you like to compile more sourcecode or if you want to use a more recent &krusader; version then these are the installation instructions. + + + install &apple_x11_url; + + + + install the &apple_x11_sdk_url; developer-tools with X11 headers (gcc is included) + + + + install the fink-base + + + + compile kdelibs 3.4.1 or higher (fink provides the necessary .info files) + + + + compile the &krusader;-tarball or follow steps 2 and 3 of the previous section if a recent &krusader;-package ⪚ krusader-1.60.0.fink.darwin-ppc.tar.bz2 is available + + + + + + + + + +Starting &krusader; + +Type krusader (lower case) at a command prompt. You can create shortcut on your desktop or create an entry in the (&kde;) menu. Read the previous page and the &faq_lnk; if &krusader; doesn't start. + +When &krusader; is started from the command-line, various options can be specified to modify its behavior. + + +$ krusader +WARNING: Mt.Man: Born, looking around to get familiar. +foo + + +Don't worry about the messages you get in the &konsole;. These messages are log messages that can be used for debugging &krusader;. + +You can also use &Alt;F2 to open the Run Command dialog box, type krusader (lower case) and press &Enter; or click on the Run button. + +If &krusader; is installed by an RPM or DEB package then usually &krusader; can be started from the &kmenu;. ⪚ on &Mandrake;-&Linux; 10.0 click on the &kicon; button and choose ApplicationsFile tools &krusader;. + + + +Command-line options: + + <path> + start left panel at <path> + + + + <path> + start right panel at <path> + + + + <path1>,<path2>,<path3> + start left panel at <path1>,<path2>,<path3>, with tabs. + + + + <panel-profile> + load a panel-profile on startup (this overrides the default startup profile). + + + + + +Examples: $ krusader --left=<path> --right=<path> +$ krusader --left=/mnt/cdrom --right=ftp://downloads@myserver.net +$ krusader --left=<path1>,<path2> --right=<path1>,<path2>,<path3> +$ krusader --profile <panel-profile> +$ krusader --profile ftp-managment + + +The standard &Qt; and &kde; command-line options are available, and can be listed by entering krusader . + +Other command-line options: + + + List Qt-specific options + + + + List KDE-specific options + + + + List all options + + + + Show the authors names + + + + Show the version number + + + + Show license information + + + + + + +Configure &krusader; + +When you run &krusader; for the first time the &krusader; configuration module Konfigurator will show up and allow you to configure &krusader; as well as detect installed packers and tools. You can always run Konfigurator again from the &settingsmenu_lnk;. + + + + + diff --git a/doc/ru/introduction.docbook b/doc/ru/introduction.docbook new file mode 100644 index 0000000..c1a0689 --- /dev/null +++ b/doc/ru/introduction.docbook @@ -0,0 +1,152 @@ + + + + +Вступление + +Описание пакета + + + + + +&krusader; - это несложный , легкий и полнофункциональный двух-панельный файловый менеджер для &kde; и других *nix десктопов , подобный &mc; или &tcmd;.Он предоставляет вам все необходимые средства для управления файлами. + +Плюс: расширенная работа с архивами , монтирование файловых систем, &FTP;, продвинутый модуль поиска , редактор/просмотрщик, синхронизация директорий, сравнение файлов по содержимому , групповое переименовывание и много, много другого. Поддерживаются такие форматы архивов: ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip и 7-zip. Управление другими &kioslaves1_url; подобно smb:// или fish://. + +Практически полностью настраиваемый &krusader; дает большие удобства и замечательно выглядит на вашем рабочем столе ! + +Попробуйте &krusader;. + + + +
+&krusader; снимок экрана + + +&krusader; снимок экрана + +
+ + +Больше снимков можно увидеть на нашем сайте по адресу &kru_screenshots_url;. + +
+ + +Добро пожаловать в &krusader;! + + Мы стремились сделать для вас легкий, интуитивно понятный инструмент для простого выполнения ваших ежедневных задач:управляйте и работайте с вашими файлами удобным для вас способом и посмотрите как это удобно делать! + + Если вы гуру или новичок в &Linux;,&krusader; сделает управление файлами быстрым и аккуратным, позволив вам сфокусироваться на большей картине , не в окружении командной строки.Это особенно поможет , если вы новичок в xxNIX операционных системах.Сделайте это с &krusader; одетым в великолепную одежду &GUI; , поддерживащего перетаскивание обьектов и mime типов - это то что вам нужно для домашнего использования прямо сейчас ! + + &krusader; поставляется с продвинутым и быстрым &archives_lnk; для прозрачной работы с архивами.В дополнение, &krusader; ускоряет многие комплексные задачи управления файлами, уменьшая утомление, ошибки и раздраженность.В общем, &krusader; предоставляет все полезные возможности которые вы хотели от других качественных файловых менеджеров таких как &mc; и &tcmd;.Так почему мы изобретаем колесо ? - спросите вы.&krusader; вплотную интегрирован с &kde; - рабочим столом , выбранным многими программистами , сетевыми инженерами, и другими продвинутыми пользователями &Linux;.С &krusader; даже пользователь - новичок получит быстрый доступ к мощным , гибким и богатым возможностям в окружении &kde;.&krusader; открытый , свободный и распространяется под лицензией &gpl_lnk;, хотя мы (разработчики) всегда помним об авторских правах проекта с этим именем и управление проектов продолжает эволюционировать. + + Миссия проекта &krusader; состоит в создании файлового менеджера "все в одном" , который будет делать все обычные вещи освобождая вас от этого , плюс ещё немного ... Cогласно старому принципу &krusader; основан на &ofm_url;, двухпанельных файлов менеджеров (&mc;, &nc;, &etc;), это предоставляется &krusader; в виде стандартных файловых операций Копирование , Перемещение , Удаление , &etc; , потому что это заслуженная основа ! + + Сначала в основном фокусе предстают Виртуальные файловые системы. &vfs_lnk; абстрактный слой для всех видов архивированой информации (Файлы ZIP, серверы &FTP; файловая система NFS , ресурсы SAMBA , ISO образы дисков , каталоги пакетов RPM , &etc;), с возможностью прозрачного доступа для пользователя ко всей информации в различных типах файловых систем - кажется будто просто находишься в обычном каталоге! Файлы можно копировать и удалять (исключение ISO,rpm,tar.gz) из источников данных/контейнеров щелчком мыши. &krusader; , в настоящее время поддерживает VFSs для всех популярных [и некоторых специализированных] типов архивов (ace, arj, bzip2, gzip, iso, lha, rar, tar, zip and 7-zip), пакетов (rpm, deb) и традиционных удаленных файловых файловых систем (&FTP;, NFS, Samba, FISH, SFTP). + + &krusader; также включает встроенный менеджер монтирования &mountman_lnk; который позволяет вам смонтировать и отмонтировать файловые системы всех типов одним кликом мыши! Предоставляет использование и другую информацию в полном и легко доступном виде , во-вторых без передвижения вашей мыши!Простота и логичность это наша цель. + + &bookmark-manager_lnk; для локальных файлов/удаленных &URL; и в &advanced_search_module_lnk; для быстрого определения места расположения необходимых файлов.&krusader;также предоставляет возможность конфигурирования ваших инструментальных панелей , позволяет дополнительно сравнивать файлы по содержимому (доступны несколько отдельных методов поиска ), переименование группы файлов , стандартный терминал может быть вызван одним кликом мыши!Нуждаетесь во временном доступе с правами суперпользователя ? Просто "SU" в окне вызванного терминала или кликните на &krusader;'s "Root Mode" для запуска нового &krusader; с правами суперпользователя! + + Продвинутые пользователи получат большую выгоду от легкого и качественного выполнения обыденных задач без отвлечения рук от реально важной работы , большую помощь во время продолжительных ночных компиляций/редактирования. Удобные клавиатурные сокращения позволят вам легко передвигаться по дереву каталогов, создать многотабовый каталог с одновременным просмотром и полноценную историю - все одним кликом мыши! Благодаря эффективному программированию и низкой нагрузке на систему, &krusader; наиболее чувствительный во всем системном окружении инструмент для управления , который даст вам доступ ко всем потенциальным возможностям компьютера с использованием &kde;, или других , совместимых с X Window оконных менеджеров. Хотя он и спроектирован для работы в среде &kde;, &krusader; будет также работать и в Gnome, Enlightenment, WindowMaker, IceWM, BlackBox, Wiamea, XFCE, etc. - если будут установлены библиотеки &kde;. + + New extensibility is provided by the flexible &useractions_lnk;, a &krusader; innovation, that allows unlimited additional custom functionality to be added to suit the user's specific needs and wishes. We are planning to develop more modules in the near future, thereby enhancing &krusader; greatly. For information on what is proposed, approved, or remains to be completed look at the &todoforum_url;. + + Ни одна другая программа , из тех что мы знаем , не дает такого удобства и гибкости в таком простом и интуитивно понятном виде! Лучшие советы , из тех что мы слышим гармонично внедряются в &krusader; .Цель проекта &krusader; - простой и наиболее доступный фаловый менеджер! + Мы надеемся он вам понравится ! + + + +
diff --git a/doc/ru/keyboard.docbook b/doc/ru/keyboard.docbook new file mode 100644 index 0000000..ce7ee4a --- /dev/null +++ b/doc/ru/keyboard.docbook @@ -0,0 +1,1948 @@ + + + +Keyboard Commands +CommandsKeyboard + + +Keyboard Usage + +NOTE: this chaper is work in progress ;) + +In this chapter we will learn how to use the keyboard because most operations can be done much more quickly by keyboard than with the mouse. So put away your mouse and get ready for the next exercise ;) It will take some time to learn the &keybindigs_lnk;, but once you can "play piano" with &krusader; you will save a lot of time every day! Please note that &krusader; can use &keybindigs_profiles_lnk; to swap easily to other Key-binding setups, e.g. of other commanders, or you can create your own key-bindings. + +After starting &krusader; the keyboard action can begin. Use Ctrl+I to jump to the &location_toolbar_lnk;, here you type the desired directory. After Ctrl+Down Arrow you are in the &termemu_lnk;, and you can type any command you desire, use Ctrl+Up arrow to jump back to the active panel. If you want to jump to a file or directory that starts with "f", then simply press "f" on the keyboard to use the &quick_search_lnk; . Use the Enter key to execute the file or to open a directory that has the focus. Be sure to remember the Function Keys - to View F3, to Edit F4, to Copy F5, Alt+u Unpack, etc. + +You can also perform several operations with the &foldertabs_lnk;, including several selection operations. And at the end you can close &krusader; with F10. + + + + +Key Bindings +Key Bindings +Commands + Keyboard + + +Most of the key bindings (shortcuts) are configurable in the &konfiglookandfeel_lnk;. Some key bindings are not &krusader; Key Bindings ⪚ &kde; Key Bindings. By default &krusader; has the following key bindings: + +If you are used to use other Key Bindings then the default ones listed below, change them with the &konfiglookandfeel_lnk;. Here you will find even more actions who can be linked to a Key Binding. + + +Function (FN) Keys +These are the Key Bindings of the &fnkeybar_lnk;. These Key Bindings are configurable since version 1.51 + + + + +F1 +Help + +F2 +Terminal + +F3 +View files + +F4 +Edit files + +F5 +Copy files + +F6 +Move files + +F7 +Create a new directory + +F8 +Delete (or move to Trash) files + +F9 +Rename files + +F10 +Quit &krusader; + + + + + + +SHIFT keys + + + + +&Shift;F1 +What's this? + +&Shift;F3 +Enter an &URL; to view + +&Shift;F4 +Edit new file + +&Shift;F9 +Multi Rename (&krename;) + +&Shift;F10 +View all files + +&Shift;F12 +Custom view files + + +&Shift;Left Arrow +Change to left tab + +&Shift;Right Arrow +Change to right tab + + + + + + +ALT keys + + + + +&Alt;d +&diskusage_lnk; + +&Alt;e +Test Archive + +&Alt;k +Start &rootmode_lnk; &krusader; + +&Alt;L +&panel_profiles_lnk; + +&Alt;p +Pack files + +&Alt;u +Unpack files + +&Alt;+ +Select All + +&Alt;- +Unselect All + +&Alt;* +Invert Selection + +&Alt;/ +MountMan + +&Alt;` +&usermenu_lnk; + +&Alt;&Enter; +Properties + +&Alt;Left Arrow +Left bookmarks + +&Alt;Right Arrow +Right bookmarks + +&Alt;Down Arrow +&popup_panel_lnk; + +&Alt;F1..F12 +Standard (&kde;) key-bindings + + + + + + +CTRL keys + + + + +&Ctrl;+ +Select Group + +&Ctrl;- +Unselect Group + +&Ctrl;= +Compare directories (Compare Mode) + +&Ctrl;. +Show/Hide Hidden (dot) Files + +&Ctrl;/ +Opens command line history list + +&Ctrl;Down arrow +Go from the active panel to the command line/terminal emulator + +&Ctrl;Up arrow +Go from the command line/terminal emulator to the active panel + +&Ctrl;Up arrow +Go from the active panel to the &location_toolbar_lnk; + +&Ctrl;Home +Jumps to the Home directory + +&Ctrl;Left or Right arrow +Focus a file or directory on the left panel, press &Ctrl;Left arrow and the right panel changes: on a file: the right panel gets the same path as the left panel on a directory: refreshes the right panel with the contents of the directory For the right panel: press &Ctrl;Right arrow and the left panel will change. + + +&Ctrl;b +&combinefiles_lnk; + +&Ctrl;d +Open Bookmarks in the active panel. + +&Ctrl;e +Edit file as root (Default Useraction) + +&Ctrl;h +Opens History list in the active panel. + +&Ctrl;j +A &safari;-like Jump-Back . + +&Ctrl;l +Go to the &location_toolbar_lnk; (origin) as in &firefox; and &konqueror; + +&Ctrl;m +Open media list. + +&Ctrl;n +New Network Connection dialog. + + +&Ctrl;o +Select directory dialog to open this directory in the panel. + +&Ctrl;p +Split file + +&Ctrl;u +Swap Panels + +&Ctrl;r +Reload (Refresh) Panel + +Ctrls +Search + +&Ctrl;q +Quit &krusader; + +&Ctrl;w +Close tab + +&Ctrl;y +&syncdirs_lnk; + +&Ctrl;z +Popular URL's + +&Ctrl;&Backspace; +Jumps to the Root directory + +&Ctrl;PageUp +Up one directory + + + + + + +CTRL+SHIFT keys + + + + +&Ctrl;&Shift;d +Bookmark current item + +&Ctrl;&Shift;f +Disconnect remote connection + +&Ctrl;&Shift;j +Set jump back point + +&Ctrl;&Shift;l +&locate_lnk; + +&Ctrl;&Shift;Left arrow +Open left media list. + +&Ctrl;&Shift;Right arrow +Open right media list. + + + + + + +CTRL+ALT keys + + + + +&Ctrl;&Alt;j +&javascript_console_lnk; + +&Ctrl;&Alt;m +Mount (Default Useraction) + +&Ctrl;&Alt;n +New tab + +&Ctrl;&Alt;r +Toggels the &list_panel_lnk; between horizontal and vertical mode. + +&Ctrl;&Alt;s +Create a new symlink. + +&Ctrl;&Alt;t +Show/hide the terminal emulator. + +&Ctrl;&Alt;Left Arrow +Left History list + +&Ctrl;&Alt;Right Arrow +Right History list + +&Ctrl;&Alt;= +Equal Panel Size (Default Useraction) + +&Ctrl;&Alt;&Shift;n +Duplicate a tab + +&Ctrl;&Alt;&Enter; +Open current folder in a new tab + + + + + + +General CTRL keys + + + + +&Ctrl;a +Select all + +&Ctrl;PageDown +Move to the lower part in the current directory + + +&Ctrl;F1..F12 +Standard (&kde;) key-bindings + +&Ctrl;&Shift;F1..F12 +Standard (&kde;) key-bindings + + + + + + +Other keys + + + + +foo +&quick_search_lnk; + + +Switch between the panels + +&Enter; +On a file: open/execute that file + On an archive file: browse the archive as if it was a directory + +&Esc; +Will make the menu bar loose the focus if it has it + + +Delete +Delete (or move to Trash) + +&Shift;Delete +Delete permanently + +SPACE +On a file: toggle the marking of the file without affecting the marking of other files/directories. + On a directory: calculate the size, without without affecting the marking of other files/directories. + +&Backspace; +One directory up + +INSERT +Does the same as the SPACE key but it will go one position down to toggle the next file. + +MENU +Right-click menu + +Home +Cursor jumps to the top of the list + +End +Cursor jumps to the last file in the list + + + + + + +Command Line +&cmdline_lnk; keybindings. + + + + +Up arrow and Down arrow +scroll through previously typed commands. + +&Ctrl;/ +opens the command line history list. + +&Ctrl;Up arrow +jumps from the command line to the active panel. + +&Ctrl;Down arrow +jumps from the active panel to the command line. + +&Ctrl;&Enter; +inserts current file / directory name without path to current command line position. + + +&Ctrl;&Shift;&Enter; +inserts current file / directory with full path name to current command line position. + + + + + + + +Default Useractions +Default &useractions_lnk; keybindings provided by &krusader;. + + + + +&Ctrl;e +Edit a file as root + +&Ctrl;&Alt;c +Copy current item to clipboard + +&Ctrl;&Alt;m +Mount a new filesystem + +&Ctrl;&Alt;= +Equal panel-size + +Wina +Enqueue in Amarok + +Win1 +Sort by Name + +Win2 +Sort by Extension + +Win3 +Sorts the active panel by Size + +Win4 +Sort by Modified + + + + + + + +Other Key-bindings + + Marking files + + + KrViewer + + + &diskusage_lnk; + + + &locate_lnk; + + + &kcontrolcenter; -> Accessibility -> Keyboard Shortcuts + + + &useractions_lnk; configurable key-bindings + + + + + + diff --git a/doc/ru/konfigurator.docbook b/doc/ru/konfigurator.docbook new file mode 100644 index 0000000..7d70ff0 --- /dev/null +++ b/doc/ru/konfigurator.docbook @@ -0,0 +1,2167 @@ + + + + +Konfigurator: &krusader;'s Configuration Center +ConfigureKrusader + +Konfigurator is &krusader;'s configuration center. Here you can modify the way &krusader; does things and customize it to your own needs. At any time, pressing the Apply button will apply the changes, pressing Close will close Konfigurator, and pressing Defaults will re-apply &krusader;'s "factory" settings. Konfigurator is divided into pages, each containing items related to that page. For some changes to the &GUI;, you will have to close and restart &krusader;. + + +Startup + + + +
+Startup configuration + + +Startup configuration + +
+ +The startup page determines the way that &krusader; looks (and works) when it is launched. It is divided into two main parts: + + +General + + + Startup Profile : Starts the selected Panel profile at startup. <Last session> is a special Panel Profile, it is saved automaticly when closing &krusader;. + + Show splashscreen: Display a splashscreen when starting &krusader;. + + Single Instance Mode: Only one Krusader instance is allowed to run. + + + + + +User Interface + Determine which parts of the user interface are visible after startup. + Save settings on exit: if checked, restore the user interface components to their condition when last shutdown. + + Show toolbar: if checked, &main_toolbar_lnk; will be visible after startup. + + Show statusbar: if checked, the &statusbar_lnk; will be visible after startup. + + Show function keys: if checked, the &fnkeybar_lnk; will be visible after startup. + + Show command line: if checked, the &cmdline_lnk; will be visible after startup. + + Show terminal emulator: if checked, the &termemu_lnk; will be visible after startup. + + Save last position, size and panel settings: when launched, &krusader; will resize itself to the size it was when last shutdown. &krusader; will also appear in the same location on the screen, having panels sorted and aligned as they were. If this option is unchecked, you can use the menu Settings Save Position option to manually set &krusader;'s size and position at startup. + + Start to tray: if checked, &krusader; starts to tray (if minimize to tray is set), without showing the main window. + + + + + + +
+ + +Look & Feel + +Here you can determine the look & feel of things - which basically means fine-tuning the application to your needs. The page is divided into five tabs: Operation, Panel, Toolbar, Key-bindings and Panel Toolbar. Since Toolbar and Key-bindings are &kde; standard tools, we'll focus on the other sections: + + + + + + + +Operation + +<guilabel +>Look & Feel</guilabel +> + Warn on exit: if checked, &krusader; will display an "Are you sure?" warning when you try to shut it down; otherwise, it will exit without protest. + + Minimize to tray: if checked, when you minimize &krusader;, it's icon will appear in the system tray instead of the taskbar. + + Automark Directories: when selecting a group of files (either by using Select Group or by using Select All), &krusader; will check this option. If checked, then directories matching the select criteria will also be marked; otherwise, only files will be marked. + + Rename selects extension: When renaming a file, the whole text is selected. If you want total-commander like renaming of just the name, without extension, unmark this item. + + Use fullpath tab names: if checked, display the full path in the &foldertabs_lnk;, otherwise only the last part of the path will be displayed. + + Fullscreen terminal (mc-style): Terminal is shown instead of the &krusader; window (full screen). + + + + + + +<guilabel +>Quicksearch</guilabel +> + New style Quicksearch: The new Quicksearch feature is used. + + Case Sensitive Quicksearch: When using the Quicksearch feature: if checked (the &UNIX; default), all files beginning with capital letters appear before files beginning with non-capital letters; otherwise, all files beginning with a specified letter (capital or otherwise) will appear together. + + + + + +Panel + + + Panel font: allows you to change the font used inside the file lists. + Filelist icon size: allows you to change the size of the icons in the file lists. The available sizes are 16x16, 22x22, 32x32 and 48x48 pixels. + Use icons in filenames: if checked, show the icons in filenames and folders. + Human readable file size: if checked, the file size will be displayed in kB, Mb &etc; and not in bytes (default). + Since &krusader;-1.70.0 you need to configure the Columns with the right click menu in the panel and not in Konfigurator. The left and right panel use their own Columns independently. The next Columns are available: + Name + + Ext: show the last part of the filename (part after the last dot) in the Ext Column and not as a complete filename in the Name Column like e.g. &konqueror; does. + Type: show the mimetype field. + Size: show the size field. + Modified: show the modified date and time field. + Perms: show the full perissions ⪚ "rwxr-xr-x" or as octal numbers '0755' instead with enable/disable Nummeric Permissions in Look & Feel Operation Tab. + rwx: show only the rights of the current user ⪚ "-rw". + Owner: show the owner field. + Group: show the group field. + + + + Show Hidden files: if checked, &krusader; will display the "dot-files" which are otherwise hidden. + + Case Sensitive Sorting: if checked (the &UNIX; default), all files beginning with capital letters appear before files beginning with non-capital letters; otherwise, all files beginning with a specified letter (capital or otherwise) will appear together. + + Always sort dirs by name: Directories are sorted by name, regardless of the sort column. + + Numeric permissions: Permission column (Look & Feel Panel Tab) shows octal numbers '0755' instead of 'rwxr-xr-x'. + + + +Uncheck the un-used columns, this allows more space for columns in use. + + + + + +Panel Toolbar +Panel Toolbar visible: if checked, &krusader; will display the Panel Toolbar. + +The buttons on the Panel Toolbar can be made visible or hidden: + Clear Location Toolbar button: clears the &location_toolbar_lnk; + + Open button + + Equal (=) button + + Up (..) button + + Home (~) button + + Root (/) button + + Toggle-button for sync-browsing: if checked, show the &sync_browsing_lnk; button. + + + + + + +Selection Mode +Here you can configure the selection modes. <guilabel +>General</guilabel +> + &krusader; Mode: the way &krusader; has worked from day one. Both mouse keys allow selecting files. To select more than one file, hold the &Ctrl; key and click the &LMB;. Right-click menu is invoked using a short click on the &RMB;. + Konqueror Mode: pressing the &LMB; selects files -- you can click and select multiple files. Right-click menu is invoked using a short click on the &RMB;. + Total commander Mode: pressing the &RMB; selects multiple files and the right-click menu is invoked by pressing and holding the &RMB; The &LMB; does not select, but sets the current file without affecting the current selection. + + Custom Selection Mode: create your own selection style! + + +<guilabel +>Details</guilabel +> + Double-click selects (classic): A single click on a file will select and focus, a double click opens the file or steps into the directory. + + Obey KDE's global selection policy: pressing the &LMB; selects files -- Use &kde;'s global setting: &kde; Control Center -> Peripherals -> Mouse. + + Custom Selection Mode items: + Based on KDE's selection mode + Left mouse button selects + Left mouse button preserves selection + Shift/Ctrl-Left mouse button selects + Right mouse button selects + Right mouse button preserves selection + Shift/Ctrl-Right mouse button selects + Spacebar moves down + Spacebar calculates diskspace + Insert moves down + Right clicking pops context-menu immediately + + + + + + + + + + + +Colors + +This page configures the colors of the &list_panel_lnk; and the &synchronizer_lnk;. The KDE default colors is the default color configuration. + + + + + + + + + General + + + Use the default KDE colors: this is the default, it uses &kde;'s the color settings of kcontrol. + + + Use Alternate Background color: If checked, the Background color and the Alternate background color alternates line by line. When you don't use the &kde; default colors, you can configure the alternate colors in the Colors box. + + + Show current item even if not focused: If checked, shows the last cursor position in the non active list panel. This option is only available when you don't use the &kde; default colors. + + + Dim the colors of the inactive panel: If checked, the colors of the inactive panel are calculated by a dim color and a dim factor, these settings can be configured in the Inactive tab of the Colors box. This option is only available when you don't use the &kde; default colors. + + + + + + + Colors + Choose the colors the way you like. In the Preview section you can see the result. The following items of the active and inactive panel can be configured: + + Foreground + Directory foreground + Executable foreground + Symbolic link foreground + Invalid symlink foreground + Background + Alternate background + Marked foreground + Marked background + Alternate marked background + Current foreground + Marked current foreground + Current background + + The following items of the &synchronizer_lnk; can be configured: + + Equals foreground + Equals background + Differing foreground + Differing background + Copy to left foreground + Copy to left background + Copy to right foreground + Copy to left background + Delete foreground + Delete background + + + + + + Preview + Here you see a preview of the configured colors. + + + Color schemes + With the Import Color Scheme Export Color Scheme buttons you can load and save a Color Scheme profile. This allows that &krusader; can have the &tcmd;, &mc;, foo-commander or your custom colors. The Color Schemes are stored in $KDEDIR/share/apps/krusader, the foo.color is a binary file that holds the Color Scheme. + + A &mc; and &tcmd; Color scheme file is provided. Please upload your favorite Color schemes so that they become available for the &krusader; community. Thanks! + + + + + + + + + +General +Here you configure the basic operations. + + + + + + +The following options determine basic aspects of operation: + Delete files/Move to trash: when &krusader; deletes files it can either 'really' delete them or move them to the trash folder, thereby making them available via &kde;'s trash. + Use mimetype magic: mimetype magic is a mechanism which allows &krusader; to inspect the files in the panels and determine their type even if the file has no identifying extension. For example, if you take an image file - 'image1.jpg' - and rename it to 'image1', &krusader; will still know it's an image file and work with it accordingly. However, this mode of operation is slower (while refreshing the panel, or changing directories), so try &krusader; with and without mimetype magic and decide what's best for you. + Editor: choose what editor will be used when editing a file (via F4). + Default viewer mode: eighter: generic, text or hex mode. + Viewer opens each file in a separate window: use browsing tabs or not. + Terminal: choose what terminal emulator will be used when &krusader; opens a console window (via F2, or Commands->Terminal menu option). + Terminal Emulator sends Chdir on a panel change: if unchecked, there will be no cd command sended to the Termainal Emulator if the panelfolder changes. + Temp Directory: this option selects the base directory for &krusader;'s temporary files. The actual files will be created in separate directories under the 'Temp directory', so that each user running &krusader; will have his/her own temporary subdirectories under the chosen directory. You must choose a temporary directory to which all users running &krusader; have full permissions! + + + + + +Advanced +This page handles more advanced issues, so you should double-check what you do here, since modifying things around here makes &krusader; a more powerful AND dangerous tool. + + + + + + + +The page is divided into three parts: + + +General + + + Preserve attributes for local copy/move (slower): If checked, &krusader; will try to preserve all attributes (time, owner, group) of the local files according to the source one depending on your permissions. + Automount filesystems: this makes &krusader; try to mount a filesystem before entering it. For example, if you click on /mnt/cdrom (and /mnt/cdrom appears in /etc/fstab as a mount point), &krusader; will check if it is mounted. If not, it will try and mount it for you and then enter, so that you'd see the contents of your cdrom. Note, however, that &krusader; will NOT unmount when exiting /mnt/cdrom. + + Don't use KDE's media protocol for the Media button (if it's buggy or missing): If checked, &krusader; won't use &kde;'s media protocol for the Media button. Use this open when the media protocol is buggy (in some older &kde; versions) or if you have no kdebase package installed on your system. + + MountMan won't (un)mount the following mount-points: If you have filesystems that you don't want to accidentally unmount (or mount) then enter a list of mountpoints separated by commas (⪚ /, /boot, /tmp) and &mountman_lnk; won't try to (un)mount them. + + + + +Confirmations + By checking the options in this section, &krusader; will ask for confirmation before doing a specific action; otherwise, the following actions will be done without warning: + + deleting non empty directorie(s) + deleting file(s) + copying file(s) + moving file(s) + + + +Fine-Tuning + + Icon Cache Size: &krusader; uses an icon cache, so it won't have to reload icons that were already used before. Of course, as the cache grows bigger, it can store more icons and further speed operations, but the memory footprint of &krusader; will be bigger. + Arguments of updatedb: sets additional arguments for updatedb, please read the manpages for more information. + + + + + + + +Archives +This page handles the way &krusader; works with archives. In the General section you'll see a list of archive formats. Some are checked and some are grayed-out. The ones that are available (not grayed-out) are supported by &krusader;. If you check them, then &krusader; will handle them transparently and let you open them as folders; otherwise, &krusader; will attempt to invoke an application which opens that type of archive. If a certain archive is grayed-out, it means that &krusader; couldn't find the appropriate executables in the configured path. The next archives are supported: ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip and 7-zip. + + + + + + +If you've installed a certain archive application (let's say arj) and want &krusader; to know about it, just click the Auto Configure button. &krusader; will search for all supported executables and print a report listing the archive formats that can be handled. If all went well the new archive should be available and checked. + +Please install new packagers to your PATH (&ie;: /usr/bin or /usr/local/bin &etc;) + +The full path of the packagers is stored in the &konfigdependencie_lnk; (⪚ to handle ZIP archives, &krusader; needs the unzip and zip executables). It's possible that you need to configure manually the mimes to the protocols in the &konfigprotocol_lnk;. + +Fine-Tuning + + Allow moving into archives: this option allows you to move files into an archive (as opposed to just copying into the archive). The down side is that if a power failure occurs during the process, the files that were moved might already be deleted, but not yet packed into the archive. If such thing happens, the file(s) are NOT LOST. They were actually moved into a subfolder in the &krusader;'s temp directory. You can search that directory and find your files, safe and sound. + Test archives when finished packing: this option automatically runs a test on a newly packed archive. It is safer, but takes longer. + + + + + +Dependencies page + +This page configures the full path of the external applications. It is even possible to configure the full path of &krusader;! + + +General tab +Here you can configure the full path of the following external applications: + +application +configurable full path + + +df +/bin/df + + +eject +/usr/bin/eject + + +kdesu +/usr/bin/kdesu + + +kget +/usr/bin/kget + + +kmail +/usr/bin/kmail + + +diff utility +/usr/bin/kompare + + +krename +/usr/bin/krename + + +krusader +/usr/bin/krusader + + +locate +/usr/bin/locate + + +mount +/bin/mount + + +umount +/bin/umount + + +updatedb +/usr/bin/updatedb + + + + + + + + +By default &kompare; (part of the kdebase package) is used as external diff utility but you can also use your favorite diff utility ⪚ &xxdiff_url; or &kdiff3_url; , just fill in the full path and enjoy. + +Packers tab +Here you can configure the full path of the following external packers, &krusader; offers also a auto configure tool for packagers. + +packer +configurable full path + + +7z +usr/bin/7z + + +arj +usr/bin/arj + + +bzip2 +usr/bin/bzip2 + + +cpio +/bin/cpio + + +dpkg +/bin/dpkg + + +gzip +/usr/bin/gzip + + +lha +/usr/bin/lha + + +rar +/usr/bin/rar + + +tar +/bin/tar + + +unace +/usr/bin/unace + + +unarj +/usr/bin/unarj + + +unrar +/usr/bin/unrar + + +unzip +/usr/bin/unzip + + +zip +/usr/bin/zip + + + + + + + +It is possible that unace doesn't work, but please don't blame us. ACE doesn't want, that other programs could cooperate with it. Unace has closed source, and they wrote some additional lines, that if the stdin is redirected to somewhere else, unace gets into infinite loop. It works with the same manner as 'su', where you cannot enter the password only from the stdin. &krusader; +>= 1-51 emulates the command line environment for being able to cooperate with unace, but we noticed that unace always changes its output's format from release to release, making the cooperation almost impossible. + +Checksum Utilities tab +Here you can configure the full path of the following external Checksum Utilities: + +Checksum Utilities +configurable full path + + +md5sum +/usr/bin/md5sum + + +sha1sum +/usr/bin/sha1sum + + +md5deep +/usr/bin/md5deep + + +sha1deep +/usr/bin/sha1deep + + +sha256deep +/usr/bin/sha256deep + + +tigerdeep +/usr/bin/tigerdeep + + +whirlpooldeep +/usr/bin/whirlpooldeep + + +cfv +/usr/bin/cfv + + + + + + + + + + +UserActions + +Here you can configure the Terminal for UserActions and the font for the output-collection. The default terminal is konsole --noclose -e To set up, configure and manage your UserActions use ActionMan (&useractions_lnk; url). + + + + + + + + + + +Protocols + +This page links the mimes to protocols. ⪚ protocol "tar" is linked to mime "application/x-tar". + + + + + + + +In the Defined Links you will see ⪚ + + Iso + + application/x-iso + + + + krarc + + application/x-ace + application/x-arj + application/x-bzip2 + application/x-cpio + application/x-deb + application/x-debian-package + application/x-gzip + application/x-jar + application/x-lha + application/x-rar + application/x-rpm + application/x-zip + + + + tar + + application/x-tar + application/x-tarz + application/x-tbz + application/x-tgz + + + + + + + + + + +
diff --git a/doc/ru/krusader-tools.docbook b/doc/ru/krusader-tools.docbook new file mode 100644 index 0000000..118c9b8 --- /dev/null +++ b/doc/ru/krusader-tools.docbook @@ -0,0 +1,4254 @@ + + + + +Инструменты &krusader; + + +Удаленные соединения +Удаленные соединения + +Удаленные соединения легко создаются набором &URL; в Панели адреса, они работают в &kioslaves1_url;. Пожалуйста запомните, что в панели &krusader; не поддерживаются все &kioslaves2_url; например, http:// не будет работать в просмотрщике. Некоторые примеры: + + + ftp://public.ftpserver.org/directory/ + + + fish://username@hostname/ + + + sftp://username:password@sftp.foo.org/ + + + ftp://username@my.server.org:21/directory/ + + + smb://username:password@server/share + + + ftp://username@proxyusername:password@proxipassword@hostname/directory + + + + +Вы можете добавить эти &URL;'ы в закладки, прочитайте секцию Менеджер закладок относительно безопасного сохранения паролей. Для соединения с большим количеством адресатов добавьте &URL;'ы в закладки и открывайте их одну за одной в или откройте их одновременно, используя &panel_profiles_lnk;. Для переключения между адресами просто откройте &foldertabs_lnk; для каждой. + +Есть три способа создания удаленного соединения: + Введите &URL; в панели адреса + + + Выберите Команды Новое сетевое соединение, которое вызовет диалог с детальным описанием соединения. Этот диалог очень удобен, если вы не пробовали вписывать &URL;'ы в панели адреса. Пустые поля пароля и логина подразумевают анонимный вход. Примечание:мы планируем переписать этот диалог. + + + Вы можете сделать закладку для каталога на удаленной машине и вернуться в этот каталог из менеджера закладок с помощью кнопки в верхнем углу вашей панели, как будто это обычный браузер. + + + + +После регистрации на удаленном сервере вы можете просматривать его как локальный диск со следующими исключениями: + Вы не можете запускать исполняемые файлы на удаленной машине. + + Права доступа не всегда определяются на удаленном сервере (зависит от сервера и метода доступа) вы можете получить "?" в полях прав доступа для некоторых файлов. + + Информация о использовании дискового пространства не доступна на удаленных файловых системах. + + + + +Для выбора кодировки на удаленной машине используйте Команды Выбрать кодировку. + +Вы можете закрыть текущее активное удаленное соединение несколькими способами: + + + Вручную: добавить кнопку разъединения на &main_toolbar_lnk; и нажать её. + + + Автоматически: выбрать &URL; в &location_toolbar_lnk;. + + + + + + &krusader; - это файловый менеджер, который поддерживает удаленные соединения через &kioslaves1_url;, поэтому, если вы хотите получить больше возможностей для удаленных соединений мы рекомендуем, например, для &FTP; - использовать &kasablanca_url; или &kftpgrabber_url;. + + + + + +Менеджер монтирования:работа с файловыми системами +Монтирование + +Менеджер монтирования это инструмент, который поможет вам управлять монтированием файловых систем. Еще он показывает список разделов, смонтированных в настоящее время. Для каждой файловой системы он показывает имя устройства( с его номером /dev/fd0 для флоппи), тип (vfat, ext3, ReiserFS ...) и точку монтирования в системе (директорию, в которой файловая система смонтирована). + + + +
+Менеджер монтирования + + +Менеджер монтирования + +
+ +Менеджер монтирования также показывает информацию о занятом/свободном месте на разделе и свободное пространство в процентах. Если эти цифры видны как N/A, значит раздел не смонтирован. Клик левой кнопкой мыши на на строке раздела покажет в окне слева от списка графическую диаграмму для выбранного раздела. Щелчок на не смонтированной файловой файловой системе покажет not mounted. + + Двойной клик на файловой системе закроет Менеджер монтирования и откроет файловую систему в текущей панели внутри &krusader;. + Правый клик на файловой системе откроет в маленьком меню диалог с доступными для данной файловой системы действиями.Сейчас можно монтировать/отмонтировать и извлечь ( для cdrom). + + +Мы планируем расширить Менеджер монтирования в дальнейшем развитии &krusader;. Будет добавлено форматирование для флоппи, редактирование /etc/fstab, создание новых файловых систем и другое...Мы начали работу над этим + +Быстрый режим для Менеджер монтирования + +Для активации быстрого режима в Менеджер монтирования нажмите и удерживайте кнопку мыши на кнопке в &main_toolbar_lnk; + +Основная идея: показывать список всех доступных точек монтирования. Каждый раз, когда показывается меню, определяется точка монтирования смонтирована или нет и связывается с верным действием (монтирование/отмонтирование). Это быстрый способ доступа к Менеджер монтирования.Он позволяет только монтировать и отмонтировать. В новом &kde; будет сервис для fstab и часть старого кода будет удалена из Менеджер монтирования. + +
+ + + +Менеджер закладок: управление закладками +Закладки + +Менеджер закладок в &krusader; - это инструмент управления папками закладками, локальными и удаленными URL'ами, и дальнейший возврат их по щелчку мыши. Меню состоит их четырех секций: + Персональные закладки. + + + Наиболее часто посещяемые &URL;'ы. + + + Неизменяемые закладки. + + + Управление закладками. + + + + +Вы можете сделать закладку внутри удаленной файловой системы (&FTP; или SAMBA) и после использовать для быстрого доступа к удаленной машине, но НЕЛЬЗЯ сделать закладку внутри архива. + + + +
+меню Закладки + + +меню Закладки + +
+ + + +Использование закладок + +Обычно, вы нажимаете на кнопку Закладка, когда вы находитесь в целевом каталоге. Для примера создадим закладку для /usr/tmp, переведем &krusader; в каталог и нажимаем кнопку Закладки. Затем в диалоговом окне Добавить закладку путь к &URL; /usr/tmp. Имя, которое вы дадите закладке (например:временный каталог). Комбинации клавиш поддерживают добавление & в имя закладки, например &sourceforge, &home, down&loads &etc;, так вы можете быстро вызвать закладку, используя горячую клавишу &Alt;foo. Если вы добавите закладку не давая ей имени, она будет названа по пути к каталогу. URL являются именами закладок. Создать в создает папку закладок для упорядочивания ваших закладок. + +Для использования закладок нажмите кнопку Закладки и выберите закладку.Вы также можете использовать &keybindigs_lnk;: &Ctrl;&Shift;d для добавления закладки, &Alt;правая/левая стрелка для открытия правой/левой панели закладок и &Ctrl;d для открытия закладки в активной панели. A &MMB; откроет закладку в новой вкладке. + +Перемещение в закладках: + + начните печатать буквы + + + + Например, если вы напечатали 'h' и только одна закладка начинается с буквы 'h', откроется именно она - дальше ничего не нужно вводить + + + + если более чем одна закладка начинается с буквы 'h', вы должны вводить дальше, пока не определится необходимая закладка. + + + + + + + + +Обработка паролей + +Одно из преимуществ управления закладками - это сохранение паролей средствами &kde;, когда, например ваши пароли сохранены в &konqueror;/&kmail;. Если вы имеете бумажник &kde;, сохраняйте пароли в нем. Выберите закладки, в диалоге вас спросят о пароле и имени. Введите их и нажмите 'сохранить пароль'. Пароли и имена будут сохранены в бумажнике &kde;( если это разрешено в вашем дистрибутиве). При переустановке, если вы не сохраните ваши пароли из бумажника как файл закладок &krusader;, они будут утеряны. + + + + +Наиболее часто посещаемые + +Подменю Наиболее часто посещаемые хранит самые посещаемые &URL;'ы (локальные или удаленные). Это подменю показывает список 15 самых посещаемых мест, сортированных по посещаемости. Это удобно, если нужно быстро найти часто посещаемое место, и не обязательно нужно делать для него &bookmarks_lnk;, он служит временным списком закладок. Быстрый поиск это легкий способ найти/выбрать необходимый &URL;: + откройте Наиболее часто посещаемые или или используйте &Ctrl;z + введите несколько букв для сужения критерия поиска + жмите ввод (вы перейдете в список &URL;) + жмите ввод снова и панель обновится + + + + + + +Неизменяемые закладки + +Эти жестко запрограммированные закладки в меню не нуждаются в сохранении в файл.В &context_menu_lnk; вы можете запретить/разрешить неизменяемые закладки. Доступные следующие неизменяемые закладки. Доступны следующие неизменяемые закладки: + Носители использует Протокол media:/ из &kde; + + + Локальная сеть использует протокол &kde; lan:/. + + + Виртуальная файловая система &vfs_lnk; virt:/ - это не виртуальная папка, а только контейнер для &URL;'ов из различных файловых систем. Она используется например для Поместить на панель в модуле поиска и синхронизаторе. Панель адреса отобразит, например так :virt:/Результаты поиска 1 или virt:/Результаты синхронизации 1. + + Вернуться или &Ctrl;J позволяет вернуться на начальную позицию, когда вы создаете новую вкладку в панели. Эта возможность очень удобна - если вы находитесь глубоко внутри дерева каталогов можно вернуться на один шаг назад. Установить точку возврата или &Ctrl;&Shift;J установит текущую директорию как точку возврата. + + + + + + + +Управление закладками + +Чтобы редактировать и настраивать ваши закладки нажмите кнопку Закладки и выберите меню Управление закладками, будет вызван Редактор закладок. Здесь вы можете редактировать/удалять и переназначать закладки. Редактор закладок (часть базового пакета КДЕ) - используется дляr &konqueror;, &krusader; и других приложений по стандарту &xbel_url; для формата закладок. Закладки сохраняются в файле ~/.kde/share/apps/krusader/krbookmarks.xml. + Вы можете импортировать закладки из IE, Opera, Galeon, &kde;, Mozilla, &Netscape;. &keditbookmarks; - это легко сделать, прочитайте руководство Редактора закладок или &konqueror; если хотите узнать больше. + + + +
+Редактор закладок + + +Редактор закладок + +
+ + + +
+ + +Закладки - это кнопка управления на панели + +Кнопка закладки может быть помещена на &main_toolbar_lnk; или на &actions_toolbar_lnk;, в дальнейшем вы можете назначить сочетание клавиш для неё. + создайте ваши &bookmarks_lnk; . + Если вы хотите, создайте сочетание клавиш для вызова закладок в секции Сочетания клавиш в &konfiglookandfeel_lnk; . + Добавьте кнопку на &main_toolbar_lnk; или &actions_toolbar_lnk; используя секциюПанель &konfiglookandfeel_lnk; . + + + + +
+ + + +Krusader::Поиск: найдет то, что вы ищете +Поиск + +Добро пожаловать в многофункциональный модуль поиска, называемый Krusader::Поиск. Он является наиболее мощным(насколько мы знаем) инструментом для поиска в &Linux;, и дает несколько различных способов для быстрого поиска файлов. Функция поиска также доступна для удаленных файловых систем. Поиск разделен на два уровня : основной и дополнительный. Посмотрим на основную страницу... + + + +
+Основной поиск + + +Основной поиск + +
+ + +Страница разделена на четыре части: верхняя (фильтр) часть,нижняя часть - названная 'Содержащие текст', левая часть - 'Искать в ' и правая - 'не искать в'. Очевидно, что каждая часть предоставляет различные способы поиска. + +Верхняя часть: + Фильтр: здесь вы можете задать критерий поиска. Здесь вы можете ввести имя файла, символ (*.o.*, *.c &etc;) или оба - разделенные пробелом. Если вы ввели 'text' то результаты будут подобны '*text*'. Вы можете исключить из поиска файлы используя '|' ( например '*.cpp *.h | *.moc.cpp' ). + С учетом регистра: отмена этого позволит искать в верхнем и нижнем регистре (например : *.c интерпретируется как *.c и *.C). + Типы: это меню позволяет искать файлы по содержимому. Например, вы можете искать все файлы аудио, которые начитаются с буквы Б. Обычно эта опция выставлена по умолчанию на 'все файлы', но вы можете выбирать поиск для архивов, каталогов, графических и текстовых файлов, видео и аудио файлов. + + +Левая и правая части: + Искать в и Не искать в: используя эти две части вы можете уточнить путь поиска методом исключения. Например, вы можете искать файл в всей файловой системе ( начиная с /), но исключив поиск внутри /mnt. Все что нужно - это вписать / в поле Искать в и /mnt в поле Не искать в. Если вы хотите вписать более чем один каталог, просто нажмите ввод когда напишите первый. Имя каталога копируется в большое поле и можно вписывать следующее имя. Поле ввода делает автоматическое дополнение, используя глобальные настройки &kde;. Если хотите, можете щелкнуть по иконке папки и просмотреть каталог, который хотите добавить. + + + +Нижняя часть: + Текст: по введенному здесь тексту &krusader; проведет поиск внутри файлов (grep). Таким способом вы можете найти внутри всех файлах заголовков (*.h) слово 'testing 123'. + Выбирайте только полное слово + + С учетом регистра: поиск будет производится ссылаясь на ваш текст по верхнему/нижнему регистру или по фразе, которою вы ввели. + Искать в подкаталогах: произведет рекурсивный поиск и внутри каталога, по указанному пути. + Искать в архивах: &krusader; будет искать внутри поддерживаемых архивов. Однако это очень продолжительная операция. Если поставите здесь отметку, появится уведомление о невозможности использования grep внутри файлов. Это сделано потому что &krusader; распаковывает архивные файлы перед поиском, в результате на это уходит много времени. + + Следовать по ссылкам: если это установлено, &krusader; будет следовать по мягким ссылкам во время поиска. + Профили: если вы часто производите одинаковый поиск, например, внутри включая или исключая файлы и т.д., можно сохранить настройки. Нажмите кнопку 'Профили' и добавляйте/загружайте/удаляйте профили поиска. + + +Снимок экрана вверху показывает поиск файлов с окончанием c, cpp или h и включая строку 'testing 123'. &krusader; будет искать в /root, /opt, /bin и /usr, не будет искать в /usr/lib и /usr/share. + +Нажатие кнопки Поиск запустит поиск и покажет результат на странице результатов. Во время поиска вы можете нажать кнопку Стоп и остановить поиск. Кнопка Закрыть не доступна во время поиска. Сначала нужно остановить поиск и потом Закрыть окно. Когда поиск будет окончен, двойной щелчок в нем переведет активную панель в точку расположения найденных файлов. Только не закрывайте окно поиска, так будут доступны другие результаты поиска. + +Иногда бывает нужно сузить параметры поиска. Это можно сделать с помощью вкладки Дополнительно... + + + +
+Расширенный поиск + + +Расширенный поиск + +
+ + +Этот снимок экрана показывает поиск для файлов размером между 10KB и 150KB, которые изменялись между 10 октября и 1 ноября, принадлежащих любому пользователю в группе 'пользователи' и доступным для чтения/записи каждому в группе, но только для чтения всем остальным. + +Страница расширенного поиска разделена на три части: размер, дата и владелец. + +Размер + +Позволяет выбрать диапазон размера файла. Можно искать меньше чем ХХХ байт (или Кб, Мб), больше чем ХХХ байт, или, при выборе обоих параметров меньше чем ХХХ и больше чем YYY. + + +Дата + +Эта часть предлагает три различных пути определения даты: + Изменявшееся между: вводятся две даты. &krusader; бдует искать файлы между этими датами, включая их самих. Если вы установите дату только в левое поле будет поиск файлов старее этой даты. Соответсвенно если установите дату в правом поле - новее этой даты. Можно щелкнуть по иконке даты (рядом с полем ввода) - откроется стандартное окно даты - найдите свою дату в календаре. Щелчок по дате закроет окно и введет дату в соответствующее поле ввода даты. + + Не изменявшееся после: выбор этой опции заставит &krusader; искать файлы, которые не изменялись после указанной даты, что равнозначно поиску файлов старее этой же даты. + Изменялись за последние/Не изменялись за последние: в этих полях вводите не дату а только числа. Эти числа представляют дни/недели/месяцы (как выбрано в выпадающем списке). Введение цифры 5 в верхнем поле заставит &krusader; искать файлы изменявшиеся в течение последних пяти дней. Введение цифры 2 в нижнем поле ввода вызовет поиск файлов не изменявшихся за последние два дня. Комбинация обоих результатов даст в сумме поиск для файлов, которые изменялись в течение пяти последних дней и не изменялись за два последних дня. + + + +Владелец + + + Принадлежит пользователю/группе: при выборе этих опций вы сможете искать файлы, принадлежащие определенным пользователям/группам. В выпадающем списке показаны все пользователи и группы в вашей системе, только выберите необходимое. + Права: делится на владельца, группу и всех - поиск по правам доступа к файлам. Вы можете искать по правам доступа в любой комбинации. Знак вопроса (?) - это шаблонный символ - с ним действительны любые права доступа. + + +Снимок экрана вверху (раздел права доступа) поясняет поиск файлов, которые принадлежат любому пользователю в группе 'users', доступны для чтения, записи, не исполняемые и с неизвестен их владелец. + +Результаты + +Нажатие на кнопку Поиск запустит поиск и откроется окно результатов поиска.Здесь вы можете наблюдать за процессом поиска и результат выполненого действия. Если хотите отменить выполняемый поиск, нажмите кнопкуСтоп. В списке результатов поиска выберите файл и нажмите F3/F4 для просмотра/редактирования или используйте контекстное меню. Когда вы щелкните на найденном элементе, текущая активная панель переместится на каталог с файлом, если он не в текущем каталоге активной вкладки. Когда вы закроете окно поиска, выбранный элемент будет в активной панели. + +Поместить на панель + +Когда вы нажмете кнопку Поместить на панель результаты поиска будут помещены на вкладку результаты поиска. &krusader; попросит ввести имя, оно будет использовано для вкладки.Вы можете помещать необходимые файлы в новую вкладку.Панель адреса покажет, например virt:/Резульаты поиска 1. + +Файлы на вкладке результатов фактически и есть реальные файлы.Если вы удалите их - удалятся и реальные файлы! + +
+ + +Размещение - графическая оболочка + +&krusader; имеет графическую оболочку для команды locate (findutils). Locate используется для быстрого поиска файлов. Она не ищет в каталоге, только в базе данных. Пакет содержит два файла locate и updatedb. Updatedb осматривает локальную файловую систему и сохраняет файл внутри базы данных. Часто cron вызывает updatedb каждую ночь (установки в Kcron). Выберите Инструменты Размещение или &Ctrl;L. Настроить Крусадер устанавливает дополнительные аргументы для команды updatedb. + +Опции + Показывать только существующие файлы: если база содержит данные о файлах, которые больше не существуют (удалены, перемещены после последней updatedb), locate не покажет их. Эта операция проверит каждый файл перед выводом результатов поиска (медленно). + + С учетом регистра: снимите отметку для поиска в верхнем и нижнем регистре одновременно. + + + +Кнопки действий + Locate: выполнит locate foo foo и поместит вывод в окно результатов поиска. + Stop: остановит выполнение locate. + Обновить DB: запуск команды updatedb после введения пароля суперпользователя. + Закрыть: закроет окно Размещения. + + + +Окно результатов + двойной щелчок на элементе: перейти в каталог, сделать элемент видимым и закрыть диалог размещения. + + + правый клик: меню правка/просмотр/поиск. + F3: просмотр текущего элемента. + F4: редактирование текущего элемента. + &Ctrl;f: поиск файлов в окне результатов. + &Ctrl;n: следующий результат поиска. + &Ctrl;p: предыдущий результат поиска. + + + + + + + + + + + + + + +KrViewer: внутренний просмотрщик-редактор +Просмотрщик + Редактор + + +Нажатие &Enter; на выделенном файле откроет файл в связанном с ним приложении. Редактор/просмотрщик имеет многотабовый интерфейс, настройка в &konfiggereral_lnk; + + +Просмотрщик + +Внутренний просмотрщик &krusader; вызывается по F3. Он открывает файл быстро и с определением по содержимому . Просмотрщик - это часть &konqueror; и умеет работать с типами файлов (например, показывать изображения, проигрывать музыкальные файлы и просматривать содержимое архивов). Это доступно в режиме 'Основной просмотрщик'. Вы должны настроить привязки файлов для этого режима. + +Просмотрщик работает следующим образом: Сначалаон пробует открыть файл в 'Основной просмотрщик'. Когда тип файла (mimetype) не определяется или файл ( например приложение ) не связан ни с каким действием он не откроется в'Основном просмотрщике'. Файл будет обработан, как текстовый, в 'Текстовом просмотрщике'. Пользователь может выбирать в меню KrViewer между: 'Основной просмотрщик' (если доступно), 'Текстовый просмотрщик' и 'Просмотрщик Hex'. Режим по умолчанию настраивается в &konfiggereral_lnk; . + +&Shift;F3просмотреть &URL; по запросу, например: + man:/ просмотр страниц руководства. + man:/krusader покажет страницу руководства. + info:/ просмотр страниц инфо. + http://krusader.sourceforce.net/ просмотр сайта. + ftp://ftp.kde.org/pub/kde/ просмотр сервера FTP. + sftp://sftp.foo/ просмотр защищенного сервера FTP. + file:/home/frank просмотр домашнего каталога Франка. + /home/frank/archive.tar.gz просмотр архива tar.gz. + + + +KrViewer состоит из следующих меню: Файл, Правка, Вид, Настройки и Krviewer, в зависимости от того, какой тип файла просматривается. Это обсуждается в Разделе редактирование. Внутренний просмотрщик может переходить по ссылкам на HTML странице. &Ctrl;E запустит внутренний редактор &krusader;. + +Встроенный просмотрщик написан не нами, это часть библиотек &kde; и &kioslaves1_url;. Мы не можем и не хотим переписать его, к тому же использование готовых библиотек позволило уменьшить количество исходных кодов.Мы не изобретаем колесо ;-) + + + +Редактор + +Встроенный редактор &krusader; имеет все,что вы ожидаете от текстового редактора. Редактирование, подобно просмотру вызывается клавишей F4. По умолчанию используется встроенный редактор. Вы можете выбрать другой в &konfiggereral_lnk;, если вы предпочитаете использовать внешний редактор. + +Если вы впервые используете встроенный редактор, рекомендуем посмотреть секцию Настройки в меню и настроить его удобным для вас способом. + + + + +Обзор меню +Большинство меню легкодоступны. ;-) + + +меню <guimenu +>Файл</guimenu +> + + + &Ctrl;S Файл Сохранить + + Сохранить файл. + + + + + + Файл Сохранить как + + Сохранить файл с другим именем. + + + + + + F5 Файл Обновить + + Обновить файл. + + + + + + Файл Экспорт + + Экспорт в формат html. + + + + + + &Ctrl;P Файл Печать + + Печать файла. + + + + + +меню <guimenu +>Правка</guimenu +> + + + &Ctrl;Z Правка Отменить действие + + Отменить предыдущее действие. + + + + + + &Ctrl;&Shift;Z Правка Повторить + + Повторить предыдущее действие. + + + + + + &Ctrl;X Правка Вырезать + + Вырезать выбранный текст в буфер. + + + + + + &Ctrl;C Правка Копировать + + Копировать выбранный текст в буфер. + + + + + + &Ctrl;V Правка Вставить + + Вставить содержимое буфера в документ. + + + + + + &Ctrl;A Правка Выбрать все + + Выбрать весь документ. + + + + + + &Ctrl;&Shift;A Правка Снять выделение + + Снять текущие выделение. + + + + + + &Ctrl;&Shift;B Правка Block Selection Mode + + Toggle Block Selection, this will activate/deactivate the block selection possibility. + + + + + + Insert Правка Режим замены + + Переключение режима вставки/замены. + + + + + + &Ctrl;F Правка Поиск + + Искать текст. + + + + + + F3 Правка Найти текст + + Искать следующий текст. + + + + + + &Shift;F3 Правка Найти предыдущий + + Искать предыдущий текст. + + + + + + &Ctrl;R Правка Заменить + + Заменить текст. + + + + + + &Ctrl;G Правка Перейти на строку + + Перейти к строке. + + + + + +Меню <guimenu +>Вид</guimenu +> + + + F7 Вид Переключиться в командную строку. + + Показать командную строку. + + + + + + Вид Схема. + + Установка схемы, например &krusader; Normal, &krusader; Printing, &kate; Normal, &kwrite; Normal. + + + + + + F10 Вид Динамический перенос строк + + Переходить на следующую строку, когда превышается максимальное количество знаков в строке ( умолчание - 80 ). + + + + + + Вид Индикаторы динамического переноса строк + + Off, Follow Line Numbers, Always On. + + + + + + View Show Static Word Wrap marker + + + + + + + + F6 Вид Показывать отметки + + Показывать отметки. + + + + + + F11 Вид Показывать номера строк + + Показывать номера строк. + + + + + + Вид Показывать отметки на полосе прокрутки. + + + + + + + + F9 Вид Скрыть полосу сворачивания блоков + + + + + + + + Вид Сворачивание блоков кода. + + + + + + + + Вид Кодировка + + Например ISO8859-1, utf8, utf16, tscii, ... . + + + + + +меню <guimenu +>Закладки</guimenu +> + + + &Ctrl;B Закладка Поставить закладку + + + + + + + + Закладки Убрать все закладки + + + + + + + + + + + +меню <guimenu +>Инструменты</guimenu +> + + + Инструменты Режим 'Только для чтения' + + + + + + + + Инструменты Тип файла + + + + + + + + Инструменты Подсветка + + Подсветка для скриптов, языков программирования, макросов, например html, Bash, C++, XML, Makefile, Diff, ... . + + + + + + Инструменты Конец строки + + Выбор окончания строки: &UNIX;, &Windows;/DOS, Macintosh. + + + + + + &Ctrl;I Инструменты Вставить отступ + + + + + + + + &Ctrl;&Shift;I Инструменты Снять отступ + + + + + + + + Инструменты Clean Indendation + + + + + + + + &Ctrl;D Инструменты Закомментировать + + Добавить подходящие теги комментариев, если доступно. + + + + + + &Ctrl;&Shift;D Инструменты Раскомментировать + + Удалить теги комментариев. + + + + + + &Ctrl;U Инструменты ВЕРХНИЙ РЕГИСТР + + + + + + + + &Ctrl;&Shift;U Инструменты Нижний регистр + + + + + + + + &Alt;&Ctrl;U Инструменты Как в предложениях + + + + + + + + &Ctrl;J Инструменты Объединить строки + + + + + + + + Инструменты Перенос строк в документе + + + + + + + + + меню <guimenu +>Настройки -> Настроить редактор</guimenu +> + + + Настройки Настроить редактор Цвета + + Настройка цвета для: фона, выбранного текста, текущей строки и подсветка скобок. + + + + + + Настройки Настроить редактор Шрифты + + Настройка шрифтов для монитора и принтера: шрифт, тип и размер, с окном предпросмотра. + + + + + + Настройки Настроить редактор Indentation + + Indentation configuration: Automatically indent, use Spaces to indent, Keys indent, &Backspace; key unindents, keep indent profile, keep extra spaces. + + + + + + Настройки Настроить редактор Selection + + Selection configuration: Persistent selections, Overwrite selected text. + + + + + + Настройки Настроить редактор Редактирование + + Настройка редактирования: настройка переноса строк, пробелов, автоскобки, максимальное количество шагов отмены. + + + + + + Настройки Настроить редактор Сочетания клавиш + + Настройка сочетаний клавиш. + + + + + + Настройки Настроить редактор Подсветка + + Настройка подсветки: нет и режимы подсветки. + + + + + + Настройки Настроить редактор Внешний вид + + Внешний вид: Динамический перенос строк, показывать номера строк, показывать отметки, показывать полосу сворачивания блоков(если поддерживается). + + + + + + Настройки Настроить редактор Модули + + Настройка модулей, например kTexteditor - встроенный модуль поиска, kTexteditor - модуль вставки файла... + + + + + + меню <guimenu +>KrViewer</guimenu +> + + + &Ctrl;&Shift;G KrViewer Основной просмотрщик + + Встроенный просмотрщик &krusader; - это часть Konqueror, который умеет, например показывать изображения, проигрывать музыкальные файлы, показывать содержимое архивов. + + + + + + &Ctrl;T KrViewer Текстовый просмотрщик + + Просмотр файла в текстовом режиме. + + + + + + &Ctrl;&Shift;H KrViewer Просмотрщик Hex + + Просмотр файла в Hex режиме. + + + + + + &Ctrl;&Shift;E KrViewer Текстовый редактор + + Редактирование файла в текстовом режиме. + + + + + + &Alt;Вправо KrViewer Следующая вкладка + + Следующая открытая вкладка. + + + + + + &Alt;Влево KrViewer Предыдущая вкладка + + Предыдущая открытая вкладка. + + + + + + &Ctrl;&Shift;D KrViewer Отделить вкладку + + Отделить вкладку и открыть в новом окне. + + + + + + &Esc; KrViewer Закрыть текущую вкладку. + + Закрыть текущую просматриваемую вкладку. + + + + + + &Ctrl;Q KrViewer Закрыть + + Закрыть окно редактора/просмотрщика &krusader;. + + + + + + + + + +Синхронизатор +Синхронизатор + +Это функция сравнения каталогов левой и правой панели и представления различий между ними. После выбора опций и выполнения сравнить файлы и каталоги будут синхронизированы. Одна из панелей может быть сервером &FTP;. Только не забудьте опцию сравнить по содержимому, если файлы одинакового размера. Выберите Инструменты Синхронизировать каталоги или &Ctrl;Y для выполнения этой операции .Цвета настраиваются. + +Для локальных файлов: синхронизатор изменит информацию о дате на исходную. + + + +
+Синхронизатор + + +Синхронизатор + +
+ + + + Процедура: + Установите Левый каталог и Правый каталог. + + Настройте по необходимости Файловый фильтр, Основные и Дополнительно. Основные включают опцию не искать в, которая позволяет исключить каталоги. + + Установите опции: Рекурсивный обход подкаталогов, Следовать по символическим ссылкам, Сравнивать по содержимому, Игнорировать дату и Асимметричный режим. + + Нажмите кнопку Сравнить для сравнения каталогов. + + Используя Показать параметры, вы можете включить/исключить определенные типы файлов. Эти файлы будут исключены из синхронизации. + + Если нужно, вы можете изменить задачи в компараторе в контекстном меню. + + Когда вы согласитесь с результатами Сравнить нажимайте на кнопку Синхронизировать для показа диалога синхронизации. + + После выбора опций в Сихронизировать, нажимайте на кнопку Старт для запуска процедуры синхронизации. + + +Детальное описание всех функций и кнопок в следующем тексте. + +Сравнение + + +Панель элементов + + + Левый каталог: левый сравниваемый каталог. + + Правый каталог: правый сравниваемый каталог. + + Файловый фильтр: фильтр для синхронизации, например *.png выбирает только файлы с окончанием .png Каталоги будут выбраны, если оканчиваются на .png или содержат файлы с расширением .png Пример включения/исключения: '*.cpp *.h | *.moc.cpp' будут включены *.cpp *.h и исключены *.moc.cpp + + Основные: содержащие текст + + Дополнительно: размер, дата, владелец + + + + + +Опции + + + Рекурсивный обход подкаталогов: Сихронизатор будет опускаться внутрь подкаталогов при сравнении. + + Следовать по символическим ссылкам: Сихронизатор будет переходить по символическим ссылкам на каталоги (не файлы!). + + Сравнивать по содержимому: файлы одинакового размера будут сравниваться по содержимому. + + Игнорировать дату: информация о дате будет проигнорирована ( используется для &FTP;, smb, archive, ... ), она уместна только для локальных файловых систем. + + Ассиметричный режим: Левый каталог это целевой каталог, Правый каталог это исходный каталог. Это способ синхронизировать содержимое левого каталога с правым. Файлы, которые есть только в левом каталоге будут удалены. Те файлы, которые есть только в правом каталоге, будут скопированы в левый . Те файлы, котрые будут считаться одинаковыми, останутся нетронутыми. Файлы, содержащие отличия, будут копированы в левый каталог. Используйте эту возможность с осторожностью! Эта функция используется если информация о дате не доступна, или синхронизацируется каталог с файловым сервером (подобно загрузке). Или сохраните содержимое правого каталога в левом, или сделайте резервную копию данных. ПРИМЕЧАНИЕ: НЕ используйте эту опцию для синхронизации с переносным компьтером ( Файлы, которые есть только в левом каталоге будут удалены!). + + Автоматическая прокрутка: эта опция для медленных серверов &FTP;, ... Когда Синхронизатор закончит сравнение файлов, он поместит файл в конец списка и переместит фокус в окно, если это необходимо. Это важно, если вы хотите знать что делает Синхронизатор. Если сервер слишком медлен, сравнение может занять продолжительное время. Уставливая эту опцию вы увидите работу "вживую", только медленно. На быстрой файловой системе скорость синхронизации немного уменьшится. + + + + + + + +Когда все указанные операции будут проделаны, нажмите кнопку Сравнить. Результаты сравнения будут выведены в "Список файлов". + +"Список файлов" + + Список файлов содержит следующие столбцы: "Левый имя | Левый размер | Левый время | Задача | Правый время | Правый размер | Правый имя". + + + +Задачи (<= +>) + Этот столбец показывает действие, которое планируется синхронизатором. + + ->: копирует из левой части в правую. mkdir для каталогов в правой части. + + =: файлы одинаковы, синхронизировать нечего. + + !=: файлы исключены, или Синхронизатор не знает что делать. + + <-: копирование из правой части в левую. mkdir для каталогов в левой части + + DEL: удалит файлы из правой части. + + + Выбор задачи доступен в контекстом меню. + + + + Показать опции + + Здесь можно включать/исключать специфические типы файлов. Эти файлы, которых нет в списке, будут исключены из синхронизации. + + ->: Разрешить/Запретить копирование из левой части в правую. + =: Разрешить/Запретить показывать в списке одинаковые файлы. + !=: Разрешить/Запретить показывать исключенные / "не знаю что делать" файлы. + <-: Разрешить/Запретить копирование из правой в левую часть. + Удалить: Разрешить/Запретить единичное удаление файла из левой части. + Duplicates: Enable/Disable those files that exist on both side. + Singles: Enable/Disable those files that exist only on one side. + + + + Кнопки действий + + + Сравнить: сравнить каталоги, результаты выведутся в Список файлов. + Стоп: остановить сравнение. + Синхронизировать: появится диалог синхронизации. + Закрыть: закроет окно Синхронизатора. + + + + Статусная строка может включать + + + Число сканируемых при сравнении каталогов. + Имя файла при сравнении по содержанию(для больших файлов). + Количество файлов в списке. + + + + Контекстное меню в списке файлов + + Меню разделено на три секции: + + 1. выбор задачи - операции, выбранной для сравнения. Выберите один или несколько файлов. Изменение будут применено, только нажмите на соотвествующий элемент. Если выбрано изменение для каталога, оно применится для всех файлов/подкаталогов внутри него. + + Синхронизировать каталоги: запуск синхронизации. + Исключить: исключает файл/каталог из синхронизации ( выбор != ). + Восстановить настройки по умолчанию: вернет начальный результат сравнения. + Поменять направление: изменит направление ( -> to <-, и <- to -> ). + Копировать справа налево: выберет <-. + Копировать слева направо: выберет ->. + Удалить левый( левый одиночный ): выберет DEL. + + + 2. измените + + Выделить элементы: откроет диалог выбора выделяемых элементов. Это диалог Выбрать группу из &editmenu_lnk;. + Снять выделение с элементов: откроет диалог, снятия выделения с выбранных элементов. Это диалог Снять выделение с группы из &editmenu_lnk;. + инвертировать выделение: инвертирует выбранное состояние для всех элементов. + + + 3. другие замечания: выбранные операции работают на файле, выбранном по правому щелчку мыши, не при выделении. + + Просмотр левого файла: запустит просмотрщик на левом файле. + Просмотр правого файла: запустит просмотрщик на правом файле. + Сравнить файлы: запустит приложение diff ( например &kompare;). + + + + + Другие кнопки + + + + Профили: если вы часто делаете синхронизацию определенных каталогов, можно сохранить настройки, например включить/исключить файлы, ... Нажмите кнопку Profile добавьте / загрузите / удалите профили синхронизатора. + + + Поменять стороны местами: сменит стороны в списке файлов. + + + + + + + Синхронизировать с &kget; + + Если вы хотите синхронизировать локальный каталог с нестабильным сервером ftp, &kget; будет лучшим решением, чем просто копирование файлов. После сравнения вы можете в контекстном меню выбрать Синхронизировать с kget, после этого выбранные файлы будут загружаться через kget вместо Крусадер. Конечно же kget должен быть установлен, иначе эта опция будет недоступна. + + + + + + + + Синхронизатор + После нажатия кнопки Синхронизировать появится диалог синхронизации. + + + Опции + + Здесь вы подтверждаете операции копирования и удаления в Синхронизаторе + + Справа налево: копирование файла Х1 ( Y1 bytes ) разрешить / запретить копирование из левой части в правую. + Слева направо: копирование файла Х2 ( Y2 bytes ) разрешить / запретить копирование из правой части в левую. + Левый: удалить Х3 файлов (Y3 байтов ) разрешить / запретить удаление в левой части. + Подтверждать перезаписывание: при включении этой опции Крусадер будет показывать диалоговое окно переименовать, пропустить, перезаписать, пропустить все, перезаписать все перед перезаписью файла. + + + + Строки состояния + + + Ready: A1/A2 files, B1/B2. This line is changed at synchronizing, showing that synchronizer finished with A1 files from A2 ( B1 bytes from B2 ). + Индикатор выполнения: показывает состояние синхронизации (в байтах). + + + + Кнопки действий + + + Старт: запуск синхронизации. + Приостановить / Возобновить: приостановка / возобновление синхронизации. + Закрыть: закрывает диалог синхронизации (и останавливает синхронизацию). + + + + + +
+ + + +UserActions +UserActions + + +В менеджере действий вы можете устанавливать, настраивать и управлять вашими UserActions, некоторые основные настройки настраиваются в Konfigurator. В UserActions пользователь может создавать свои действия для файлов или обращаться к служебным функциям Крусадера напрямую. Действия встроены в &kde;, стандартный диалог настройки панелей и горячих клавиш также является пользовательским действием. Пользовательские действия сохраняются в файле ~/.kde/share/apps/krusader/useraction.xml (структура файла документирована в заголовках doxygen для UserActionXML). Некоторые примеры включены в документацию. UserActions редактируютсяt/добавляются/импортируются-/экспортируются в менеджере действий. UserActions по усолчанию находятся в файле ~/.kde/share/apps/krusader/useraction_examples.xml. UserActions can appear nearly everywhere where "normal" KActions can be placed. They integrate seamless in the well knows Edit-(Toolbar,Shortcut) Dialogs from &kde;. It's even possible to place them in the menubar, but for that one has to manipulate the krusaderui.rc file with an editor. Some examples: Useractions Menu &usermenu_lnk; &actions_toolbar_lnk; right-click menu's &etc; Once you understand how to write UserActions you will find out that &krusader; has a very powerful, customizable UserActions tool. + +Несколько UserActions доступно из коробки. Вы можете загрузить свои UserActions, так они станут доступны сообществу. Мы также имеем форум &useractionsforum_url;. + +UserActions основываются на запуске внешних программ с различными параметрами. Для примера вы можете сделать UserAction следующей командой: xmms - добавление всех выбранных элементов в активной панели в запущенный экземпляр xmms. В дополнение здесь можно получить ограниченный доступ к встроенным функциям, которые определяют параметры, так команда %aPanelSize("80")% установит ширину активной панели в 80% главного окна &krusader;. Служебные параметры могут содержать внутри себя другие параметры, маленькие скрипты можно сделать в &javascript_console_lnk;. + +Управление UserActions +Откройте Конфигуратор и выберите "Меню пользователя -> Запустить менеджер действий". Здесь вы можете добавить/удалить/редактировать/импортировать/экспортировать UserActions. Создать новое действие: появится пустая маска, где вы можете ввести все параметры.Действие будет добавлено, как только вы нажмете Применить. Имя будет показываться в списке слева. Редактирование действия: выберите действие в списке слева. Теперь вы можете редактировать параметры, изменения вступят в силу только после нажатия Применить. Удалить выбранное действие: Выберите действие в списке слева и нажмите кнопку удаления. Загрузить действие: при загрузке действие автоматически добавится в список. Если возникнет конфликт с именем(имена могут быть уникальными, потому что имеют ID в системе действий &kde;) вас спросят о новом имени. В списке будут показаны конфликтующие действия. Вы можете дать новое имя или удалить их. Сохранить действие: у вас спросят имя для действия и оно будет сохранено в файл. Если он уже содержит какие-то действия то новое будет добавлено к сущевствующим. Все определенные вами действия будут видны в меню пользователя и в диалоге клавиатурных сочетаний &kde;. Также они будут доступны в контекстном меню по щелчку правой кнопкой мыши. + + +Основные свойства +"Идентификатор", "Пункт меню" и "Команда" обязательны, все остальные свойства опциональны. + "Идентификатор": уникальное имя действия, используется для идентификации в системе действий &kde;. + "Значок": выбор значка для вашего действия. + "Категория": добавление в категорию для улучшения обзора. + "Пункт меню": заголовок, показываемый в меню/диалогах. + "Всплывающая подсказка": подсказка для вашего действия, показывается при наведении курсора. + "Описание": описание, того что делает действие. Оно также отображается в "Что это?" если вы нажмете &Shift;F1 на действии. + "Use Tooltip checkbox": uses the tooltip as description. + "Команда": здесь указывается команда, которая будет выполняться. Вы можете добавить шаблон нажав Добавить. + "Рабочий каталог": каталог, из которого будет запускаться команда. + + "Режим выполнения": + + "Нормальный": нормальный режим. + "Запустить в терминале": запускает команду в терминале. + "Перехватывать вывод": убирает вывод команды в окне. + "Выделять стандартный вывод для ошибок" когда используется "Перехватывать вывод" стандарный вывод и вывод ошибок будут разделятся + + + + "Применять команду": + + "Только для локальных файлов(не использовать URL's)": покажет шаблон возвращающий локальный адрес. + "Для удаленных (URL) и локальных файлов": покажет шаблон возвращающий &URL;ы. + + + + + + "Комбинация клавиш по умолчанию": настройка сочетания клавиш для действия. + + + +Синтаксис командной строки: +В основном любая введенная команда будет выполнена (если вы введете "ls -l", "ls -l", они выполнятся). Вы в можете использовать характерные для &krusader; встроенные команды, которые представляют статус текущей панели. Они выполнены как шаблоны. Шаблоны начинаются с символа ('%'), следом идет индикатор ('a' -активна, 'o' - другое, 'l -' левая и 'r' - правая панель. Если шаблон не нуждается в панели для работы вы должы указать это знаком ('_')). Затем следует имя шаблона (см. список ниже), которое может некоторые параметры окружения в кавычках, и, в конце снова знак проценты. +This sounds very complicated, so lets make an example: '%aList("Selected")%' will be replaced by a list of all selected items in the active panel. So a command like 'xmms --enqueue %aList("All", " ", "", "*.mp3")%' will execute xmms with a list of all .mp3's in the current panel, separated by a single blank. +В настоящее время включены следующие шаблоны: Путь в панели - замена пути в панели &useraction_optional_parameter; автоматически пропускать пробелы. &useraction_default; да Количество - заменяет число <первый параметр> &useraction_parameter; какие элементы; из "All", "Selected", "Files" или "Dirs" Маска фильтра - заменяет маску фильтра в панели Текущий файл - переписывает текущий элемент &useraction_optional_parameter; Не включать текущий путь. &useraction_default; нет &useraction_optional_parameter; Автоматически пропускать пробелы. &useraction_default; да Список значений - заменяет список всех <первых параметров> &useraction_parameter; Список файлов "All", "Selected", "Files" or "Dirs" &useraction_optional_parameter; Разделитель между элементами. &useraction_default; " " &useraction_optional_parameter; Не включать текущий путь.&useraction_default; нет &useraction_optional_parameter; Маска (только для всех "Выделенных"). &useraction_default; * &useraction_optional_parameter; Автоматически пропускать пробелы&useraction_default; да Выбор - управление выбором в панели &useraction_parameter; Маска &useraction_optional_parameter; выбор по какому пути; из "Set", "Add" или "Remove". &useraction_default; "Set" Перейти к местонахождению - изменит путь панели в <первый параметр> &useraction_parameter; Относительный или абсолютный путь, или URL &useraction_optional_parameter; Open the location in a new tab. &useraction_default; no Спрашивать пользователя о парамерах - запросит текст и перепишет ответ &useraction_parameter; Вопрос &useraction_optional_parameter; Предустановка &useraction_optional_parameter; Значение Буфер обмена - управление буфером обмена &useraction_parameter; Что должно быть скопировано (вы может использовать "%aCurrent%" здесь) &useraction_optional_parameter; Добавить к текущему содержимому буфера обмена через разделитель Копировать - копирование файлов, удобно для быстрого локального резервного копирования &useraction_parameter; Что должно быть скопировано &useraction_parameter; Куда копировать Открыть профиль синхронизатора - откроет Синхронизатор с заданным профилем &useraction_parameter;Выбрать профиль синхронизатора Открыть профиль модуля поиска - откроет окно поиска с заданным профилем &useraction_parameter; Открыть профиль Загрузить профиль панели - загрузит выбранный профиль &useraction_parameter; Выбрать профиль Each - splits the commandline into a list. These commands are executed one after another. &useraction_parameter; A list-item (all, all files, all dirs, all selected). Move - Move from source to destination. &useraction_parameter; A source &useraction_parameter; A destination PanelSize - Change the ratio between the two panels. &useraction_optional_parameter; A integer value, e.g., 80 makes the active panel use 80% of &krusader;'s width (height in vertical-mode), omitting the parameter means 50%. Ask - Cancel the execution. &useraction_optional_parameter; A string for the cancel question. Script - Executes an external Javascript file. NOTE: is still experimental and the interface may change, feedback is always welcome. &useraction_parameter; path to the external foo.js file, absolut path or relative to <kde-app-data>/krusader/js/. <kde-app-data> is $(kde-config --localprefix)/share/apps/ or $(kde-config --prefix)/share/apps/, for those who don't know where so copy the scripts/extensions. If all the needed files (normaly .js and maybe .ui) are in one of these dirs it's sufficient to give the filename only as 1. parameter. &useraction_optional_parameter; a list of variables which should be set, like "return=cmd; a=lalala; b='%_Ask(..)'" so that the placeholder is replaced be the content of the variable cmd and the other two have already these values when the script starts. ListFile - is replaced by path/filename of a temporary file containing a list of items &useraction_parameter; path/filename ColSort - set the sorting on a column of a specific panel. &useraction_parameter; Column: either "Name", "Ext", "Type", "Size", "Modified", "Perms", "rwx", "Owner" and "Group" &useraction_parameter; Sort sequence: either "Toggle", "Asc", "Desc" View - set the view mode. &useraction_parameter; View mode: either "generic", "text", "hex" &useraction_parameter; Window Mode: either "tab", "window" A GUI-based helper for placeholder-adding is provided. Spaces In Path, Current and List are by default, automatically escaped. There is one more important thing to know: All placeholders that interact with &krusader;-internal functions are called at expand-time (meaning directly when the placeholders are replaced). External programms are called at execution-time (meaning after all placeholders are replaced). + +Дополнительные свойства +Здесь вы можете редактировать где ваши команды будут видны (в контекстном меню). В дополнение возможно подтверждать вызов каждой команды отдельно. Вы также можете запускать от имени другого пользователя. + Правуильно настройте протокол, путь, тип Mime или имя файла. + Настройте опции команды. + Установите другого пользователя (это не действует в встроенных функциях крусадера) + + + + + + +JavaScript Console +JavaScript Console + +&Alt;&Ctrl;j opens the JavaScript-console. (only available if libkjsembed is present at compile- and runtime) + +The JavaScript console is an interface to the embeded JS-Interpreter which can be used to play around and test how things work. + + + + +JavaScript interface +JavaScript interface + +Warning: The JS-Support is quite stable (which means that it won't crash &krusader; (hopefully ;)) and you can't loose any data by using it). However, the JS-interface will certainly change! So using it can't do any harm but you must know that your scripts may (or quite certainly, if you're interacting with Krusader) won't work with future versions of &krusader; anymore. + +Please upload your favorite JavaScript Extensions so that they become available for the &krusader; community. Thanks! + +JavaScript applications have usually 2 files foo.js and foo.ui. They will be installed in ~/.kde/share/apps/krusader/js/, a useraction with a "%_Script" action will start the Javascripting. Currently we have 2 JS demo's root-mount-extension.tar.bz2 and js-demo-calc.tar.bz2 that will be more explenatory. + +When a script is executed, the script doesn't know it's origin (or maybe there is a way which that we don't know) and all relative path's are relative to the current working-dir. But this dir is (normaly) not the one where the script is located but the current dir of the active Panel of Krusader. This needs to stay like this. However, for referenceing additional files like .ui (Userinterface, exported by &Qt;'s Designer) one need the path of the script. The alternative where absolute path's but this is more then unhandy. For this reason the Variable "scriptDir" was introduced. If a Script want to load a &GUI; from a .ui-file this can be done this way: var ui = Factory.loadui( scriptDir + 'filename.ui' ); I recomend using Dialog as a base when designing &GUI;'s for using with JS. Execute the dialog with: ui.exec(); The elements of the &GUI; may be accessed like this: ui.child('widgetName') + +Currently there are only the objects 'Krusader' and 'PanelManager' which are exposed C++ objects without a real sence behind. They can be inspected using the JS-Console and the functions 'properties()', 'children()' and 'slots()'. The children can be accessed with the function 'chlid("nameOfChild")' with returns an object itself. Currently more usefull is the Variable scriptDir. Following the root-mount-extension it's already possible to create advnaced &GUI;'s for commandline-tools + +You can play around with'Krusader.setCaption("Hey Ho, Let's go!");', 'Krusader.children();', 'Krusader.child("help").slots();', 'alert(Krusader.properties())' or 'Krusader.child("help").show();'.... In addition a new placeholder for the &useractions_lnk;, %_Script()%, will execute an external file. + +NOTE: The object 'Krusader' will change. We haven't made decisions about the JS-interface yet (at the time of the 1.70.0-release). Any ideas are welcome. Plase use our &kruforum_url; for feedback. + +The JavaScript-support is based on &kjsembed_url;. Some expamples which show the power of this library can be found on . Support for all of KDE's ground-laying technologies like DCOP or KParts is provided. You can even load whole GUI's from .ui-files, created with &Qt;'s Designer. An example extension making use of this can be found here. + + + + +Использование диска +Использование диска + +Интерфейс основан на коде &filelight;. Использование диска показывает в графическом виде, как используется дисковое пространство на вашей файловой системе.Доступны: Линейный Детальный Круговой: в виде концентрических сегментных колец. Выберите Инструменты использование диска или &Alt;d для запуска в отдельном окне, или откройте в &popup_panel_lnk;. + +Клавиши Использования диска, контекстное меню. + Del: Удалить + &Ctrl;e: Исключить + &Shift;Вверх: выше на один уровень + &Ctrl;n: новый поиск + &Ctrl;r: обновить + &Ctrl;i:включить все + &Shift;Вниз: войти + + Меню вид: + &Ctrl;l: линейный + &Ctrl;d: детальный + &Ctrl;f: круговой + &Shift;Правый: следующий + &Shift;Левый: предыдущий + + + + + + + + + + + + + +
diff --git a/doc/ru/mouse.docbook b/doc/ru/mouse.docbook new file mode 100644 index 0000000..a1e0596 --- /dev/null +++ b/doc/ru/mouse.docbook @@ -0,0 +1,56 @@ + + + +Mouse Commands +CommandsMouse + + +Mouse Usage + +TODO + + + + +Mouse Gestures + +NOTE: this chaper is work in progress ;) + +We provide online a Mouse Gestures howto that explains howto use KHotKeys mouse gestures with &krusader;. + + + + + diff --git a/doc/ru/release-overview.docbook b/doc/ru/release-overview.docbook new file mode 100644 index 0000000..85d5b74 --- /dev/null +++ b/doc/ru/release-overview.docbook @@ -0,0 +1,694 @@ + + + + + +Release overview +This appendix gives an overview of the &krusader; releases. + + + +Release overview + + + + &krusader; version + release date + &kde; version + + + + + + 2.0.0 "name ?????" + 2006-??-?? under construction + &kde; 4 + + + + 1.80.0 "name ?????" + 2006-??-?? under construction + &kde; 3.3 - 3.5 + + + + + 1.70.1 "Round Robin" + + 2006-07-17 + &kde; 3.3 - 3.5 + + + + + 1.70.0 "Round Robin" + + 2006-02-12 + &kde; 3.3 - 3.5 + + + + + 1.70.0-beta2 "Afterburner" + + 2005-11-05 + &kde; 3.3 - 3.5 + + + + + 1.70.0-beta1 "Hellfire" + + 2005-10-02 + &kde; 3.3 - 3.5 + + + + + 1.60.1 + + 2005-10-30 + &kde; 3.3 - 3.4 + + + + + 1.60.0 + + 2005-04-10 + &kde; 3.3 - 3.4 + + + + + 1.60.0-beta2 + + 2005-03-21 + &kde; 3.3 - 3.4 + + + + + 1.60.0-beta1 + + 2005-03-03 + &kde; 3.3 - 3.4 + + + + + 1.51 + + 2004-12-14 + &kde; 3.2 - 3.3 + + + + 1.50 + 2004-10-31 + &kde; 3.2 - 3.3 + + + + 1.50-beta1 + 2004-10-17 + &kde; 3.2 - 3.3 + + + + 1.40 + 2004-07-20 + &kde; 3.2 + + + + 1.40-beta2 + 2004-06-22 + &kde; 3.2 + + + + 1.40-beta1 + 2004-04-11 + &kde; 3.2 + + + + 1.30 + 2003-11-14 + &kde; 3.0 - 3.2 + + + + 1.29-beta1 + 2003-10-02 + &kde; 3.0 - 3.2 + + + + 1.25-beta1 + 2003-08-15 + &kde; 3.0 - 3.2 + + + + 1.21-beta1 + 2003-07-18 + &kde; 3.0 - 3.2 + + + + 1.20 + 2003-05-31 + &kde; 3.0 - 3.2 + + + + 1.12-beta2 + 2003-05-09 + &kde; 3.0 - 3.2 + + + + 1.12-beta1 + 2002-12-23 + &kde; 3.0 - 3.2 + + + + 1.11 + 2002-10-17 + &kde; 3.0 - 3.2 + + + + 1.10 + 2002-08-16 + &kde; 3.0 - 3.2 + + + + 1.01 + 2002-04-01 + &kde; 2 + + + + 1.00 + 2002-01-01 + &kde; 2 + + + + 0.99 + 2001-12-01 + &kde; 2 + + + + 0.98 + 2001-10-27 + &kde; 2 + + + + 0.97 + 2001-10-08 + &kde; 2 + + + + 0.95 + 2001-07-22 + &kde; 2 + + + + 0.93 + 2001-05-31 + &kde; 2 + + + + 0.92 + 2001-05-17 + &kde; 2 + + + + 0.91 + 2001-05-10 + &kde; 2 + + + + 0.90 + 2001-04-30 + &kde; 2 + + + + 0.79 + 2001-02-25 + &kde; 2 + + + + 0.65 + 2000-08-19 + &kde; 2 + + + + 0.60 + 2000-07-19 + &kde; 2 + + + + M2 (milestone 2) + 2000-07-11 + &kde; 2 + + + + M1 (milestone 1) + 2000-??-?? + &kde; 2 (Kleopatra 1.91) + + + + Project began + 2000-04-30 + Kleopatra 1.91 + + + + +
+ +Note: some very old 0.x beta releases are not included in this table. + +
diff --git a/doc/ru/user-interface.docbook b/doc/ru/user-interface.docbook new file mode 100644 index 0000000..9e45046 --- /dev/null +++ b/doc/ru/user-interface.docbook @@ -0,0 +1,975 @@ + + + + +Интерфейс пользователя +Интерфейс пользователя + + +OFM интерфейс +ПРИМЕЧАНИЕ: эта часть ещё не дописана ;) + +Концепция OFM файлменеджера содержит много возможностей, которые делают их наиболее мощными.Интерфейс прост: левая и правая панели, командная строка внизу. Взаимодействие между этими тремя элементами радикально увеличивает скорость управления файлами во время работы. + +Если вы хотите узнать как попробовать &krusader; есть только один путь, установитеего на свой компьютер и используйте некоторе время! Признайте, &krusader;, похож на &ofm_url;, вы нуждаетесь в новых идеях которые уже существуют 20 лет :) Если вы хотите и дальше терять время и терять производительность, вы всегда можете продолжать использовать однопанельные файловые менеджеры, которые основаны на идее &Windows; Explorer ;-) + + + + + +Главное окно &krusader; + + + +
+Главное окно &krusader; + + +Главное окно &krusader; + +
+ +Интерфейс пользователя основан на парадигме &ofm_url;, этот принцип проверен 20-ти летней практикой.Он заведомо прост, легок и мощен.В следующей части мы рассмотрим основные функции каждой части, исключая: + + + + Меню, которое имеет свой раздел. + + + + Закладки, которое имеет свой раздел. + + + + The Строка состояния показывает свойства файла, который выбран или в фокусе. Вы можете использовать перетаскивание &URL; в строку состояния. + + +
+ + +Основная панель инструментов +Панель инструментовПанель инструментов + + + +
+Основная панель инструментов + + +Панель инструментов + +
+ + +панель инструментов &krusader; - это стандартная панель &kde;, которая перемещается внутри приложения или настраивается через контекстное меню. Вы можете выбрать показывать или нет её при запуске в &konfigstartpg_lnk;, и зафиксировать для текущей сессии в &viewmenu_lnk;. Содержимое настраивается из Настроить панели инструментов в &settingsmenu_lnk; или во вкладке панель меню &konfiglookandfeel_lnk;. Различные команды и опции в &krusader; зависят от контекста, некоторые не всегда доступны, иконки невозможных или неактивных действий деактивируются(сереют) и вы не можете выбрать или использовать их. &bookmarks_lnk; можно поместить на основную панель и панель действий перетаскиванием. + +
+ + +Панель действий +Панель инструментовПанель действий + +&useractions_lnk; и &bookmarks_lnk; можно поместить на панель действий. Выберите Настройки Показывать панель действий. Чтобы добавить действие используйте Настройки Панели инструментов и выберите панель действий. Вы можете, например переместить панель в правый угол, используя мышь. + + + + +Панели + +Панели &krusader; это место где производится работа. В настоящее время есть два типа панелей: &list_panel_lnk;: показывается список каталогов и файлов. &popup_panel_lnk;: включает остальные режимы: Предпросмотр, Дерево каталогов, Выбор быстрых операций, Просмотр статистики использования диска файлом или каталогом. Дополнительную панель можно открывать ил закрывать по своему усомтрению. &krusader; - это "двухпанельный" файловый менеджер и в нем только "Левая" и "Правая" панели, или, логичнее, активная и неактивная. В активной панели вы получаете реакцию на нажатия кнопок мыши и клавиатуры. Если вы выбираете команду из меню или панели она выполнится для выбранных файлов/каталогов в активной панели. Вы можете переключатся между панелями клавишей , нажатием на информационное поле, или выбрав любой файл или каталог в панели мышью. Как всегда: стартовые настройки в &konfigstartpg_lnk;, и управление текущей сессией в &viewmenu_lnk;. + + + +
+Панель списка + + +Панель списка + +
+ + + +Панель списка +Панель инструментовПанель адреса +Это основная панель и она используется больше всего. Эта панель показывает содержимое каталога (раздел смонтированной файловой системы, файлы или содержимое архива) или файлы на удаленной файловой системе (&FTP; или Samba). Поддерживается копирование/вставка/вырезка через буфер обмена между &konqueror; и &krusader; сочетаниями клавиш &Ctrl;c, &Ctrl;v, &Ctrl;x. &Alt;&Ctrl;r переключает Панель списка между горизонтальным и вертикальным режимами. + +Имеются следующие элементы: Панель адреса : показывает путь в текущей панели. Если он слишком длинный то сработает автоматическое сокращение вида "..." с пренебрежением вывода полного пути. В архиве путь будет иметь вид "имя архива:/каталог/имя архива/каталог внутри архива". Этот формат делает вывод пути легким для чтения и однообразным. Панель адреса также поддерживает некоторые &kioslaves1_url;, только не все, т.к. некоторые используются только в просмотрщике или не поддерживаются. Перейти в желаемый каталог можно одним щелчком кнопки мыши, ⪚ /mnt/cdrom/ settings:/ просмотр и открытие компонентов Центра управления КДЕ devices:/ обзор устройств хранения данных, например floppy или cdrom. trash:/Корзина &kde; ipod:/ используется для доступа к &kio_ipodslave_url;, загрузка песен и управление &appleipod;. И последнее, но не малое! &remote_connections_lnk; ! Вы можете копировать-вставлять &URL; вПанель адреса или щелкнуть колесом мыши. В контекстном меню по правому щелчку можно настроить функцию завершения текста. Дополнительно есть кнопкаОчистить поле адреса. Быстрая навигация: &Ctrl;установите курсор в середине &URL; в панели адреса, всплывающее окно покажет &URL;, место, куда перейдет текущая панель при щелчке с удержанием &Ctrl;, эта возможность дает быструю и удобную навигацию в большом дереве каталогов. Панель инструментов : содержит настраиваемые кнопки. Информационное поле : показывает размер доступного пространства в файловой системе, сколько места занято в файловой системе и путь монтирования. Если информация не доступна(чаще всего в случае удаленнойфайловой системы) будет сообщение о невозможности вывести информацию. Кнопка Медиа слева в информационном поле показывает список доступных медиаустройств, можно выбрать необходимое устройство(диск раздел, dvd, usb-stick, &etc;). Контекстное меню содержит несколько опций: Монтировать, Открыть в новой вкладке, &etc;. Кнопка медиа настраивается. Столбцы : здесь вы можете выбрать порядок сортировки файлов и каталогов по своему желанию. По умолчанию критерий сортировки Имя. Критерий сортировки выбирается моментально нажатием в поле Столбцы. Для сортировки в обратном порядке щелкните повторно в необходимом поле. Стрелка справа от текста в поле столбца, показывает направление сортировки. Умолчальные клавиши для столбцов настраиваются в &useractions_lnk;. Имеются столбцы: Имя, Расширение, Размер, Изменен, Права. Остальные дополнительные столбцы доступны по &RMB;. Ширину столбцов можно регулировать перемещения линию разделения столбцов левой кнопкой мыши(с удержанием нажатия). Обе Панели запоминают порядок сортировки и ширину столбцов. Столбцы можно изменять и сохранять индивидуально для каждой панели. Список файлов : показывает файлы и каталоги внутри просматриваемого каталога. &quick_search_lnk; позволяет быстро находить файлы, вводя их имена, или первые буквы имени. Нажатие &Enter; или двойной щелчок мыши на файле открывает/запускает его. Вы можете выделять/снимать выделение файлов мышью, клавишей Insert или &editmenu_lnk;. Поле суммы : выделяя или снимая выделение с файлов вы изменяете поле суммы в нижней панели, которое показывает сколько файлов вы выбрали (и сколько места на диске они занимают), общее количество файлов в директории и занятое ими место (иначе информационное поле показывает сведения о файловой системе в целом). Если каталог содержит много подкаталогов, то перенос &URL; на панель (где видны только подкаталоги) невозможен, но &URL; можно перетащить в "Панель состояния" или "Поле суммы". Когда установлен специальный фильтр будет показываться только установленное. Пример: [*.cpp]. Когда используются "&kde; умолчательные цвета", выделенные файлы отмечаются голубым и текущий файл окружен прямоугольником. По умолчанию иконка отображает связанный с файлом тип. Используйте &konfiglookandfeel_lnk; для изменения настроек по своему предпочтению. + + +Некоторые полезные &keybindigs_lnk; Панели списка: + + + &Ctrl;r обновит панель. + + + + Наведите фокус на файл или каталог в левой панели и нажмите &Ctrl;Стрелка вправо и правая панель изменится: + + на файле: правая панель перейдет по пути левой панели. + + + + на каталоге: правая панель обновится и покажет содержимое каталога. + + + + + Для правой панели: нажмите &Ctrl;Стрелка влево и изменится левая панель. + + + + + + + + + +Дополнительная панель + +Это "третья рука" Крусадера или дополнительная панель. Нажмите кнопку со стрелкой вверх в левом поле суммы или &Alt;Down-Arrow для открытия дополнительной панели. Эта панель имеет несколько режимов, которые вызываются нажатием на соответсвующую кнопку Панель предпросмотра : позволяет предпросмотр файла на который наведен фокус (текущий выбранный файл). Дерево : используется для быстрой навигации в локальном дереве каталогов. Эта панель подобна основной, только нужно выбрать один каталог и двойной щелчок или нажатие &Enter; откроет его в активной панели. панели полностью поддерживают перетаскивание (копирование, перемещение, ссылки). Панель быстрых операций: быстрый выбор файлов, например *.png и нажмите кнопку "применить выбор". Кнопка "флоппи" сохранит текущее выделение. "Диалог выбора группы" также воможен. Панель просмотра : просмотр текстового файла, просмотр изображения, &etc;. Просмотр уменьшенных копий картинок создается когда открывается Панель просмотра и выбирается каталог с картинками. Панель статистики : просмотр &diskusage_lnk; каталогом. Если необходимо, вы можете изменять размер окна, например для лучшего вида просматриваемой картинки или файла. Нажмите на кпопку со стрелкой вниз и дополнительная панель закроется. + + + + + +Панель инструментов +Панель инструментовПанель инструментов + +Обе панели имеют настраиваемые панели инструментов. Панель инструментов или специфичные кнопки можно делать видимыми или скрытыми. + + + Кнопка Открыть каталог файлов: открывает браузер каталогов. + + + + Кнопка равно (=): меняет каталог в активной панели на каталог неактивной. + + + + Кнопка вверх (..): переводит активную панель в родительский каталог. + + + + Домой (~): переход в домашний каталог + + + + Корневой каталог(/): переход в корневой каталог. + + + + Кнопка синхронного режима: когда активна, каждое изменение любого каталога в панели применяется в другой панели автоматически. + + + + + + + + +История каталогов + +Обе панели запоминают недавно посещенные каталоги. Нажмите на кнопку "История каталогов" ( значок "часы") для открытия истории посещения каталогов. Здесь вы можете быстро выбрать каталог, текущий отмечен галочкой. При каждом новом запуске история очищается. + + +
+ + + +Командная строка / Эмулятор терминала + +Эта часть &GUI; имеет два режима: + + + +
+Командная строка + + +Командная строка + +
+ + +Традиционный режим предлагает одну строку для ввода команд и две кнопки: "запускать в теминале" (иконка терминала) и "история команд" (стрелка вниз) справа от поля ввода. Когда вы начнете набирать команду будет предложено "автодополнение", только включите его в &kcontrolcenter;. Если вы хотите изменить поведение автодополнения для текущей сессии - правая кнопка мыши в командной строке и выберите необходимое. Слева в строке ввода вы можете найти локальный путь для активной панели, этот путь путь будет использован при выполнении команды. Введя cd <каталог> в командной строке вы также переведете активную панель в этот каталог. Щелкните сюда для просмотра быстрых клавиш командной строки. + + + +
+Эмулятор терминала + + +Эмулятор терминала + +
+ + +Эмулятор терминала - это фактически маленькая консоль и работает она также. Вы можете изменить активный каталог используя команду cd. Когда вы перетаскиваете файлы из "Панели списка", можно выбирать между "Вставить", cd, mv и ln. Если вы перетаскиваете несколько файлов cd не доступно. Закрыть эмулятор можно командой exit. + +Вы можете выбрать режим работы(командная строка, эмулятор, оба или ни одного) при старте Крусадера в &konfigstartpg_lnk; или для текущей сессии в &viewmenu_lnk;. + +
+ + +Функциональные клавиши(FN) + + + +
+Функциональные клавиши(FN) + + +Функциональные клавиши(FN) + +
+ +Эта панель составлена из названий функций клавиш (FN). Для каждой кнопки на этой панели имеется соотвествующая клавиша, выполняющая определенное действие. Она унаследовала дизайн первых двухпанельных файловых менеджеров и и обычно клавиши используются для двух действий: F2 для вызова терминала в текущем каталоге и F9 для перемеиновывания файла. Новый каталог F7 создает целое дерево каталогов на лету, например foo/bar/test. Вы можете выбрать показывать или нет FN панель при запуске &krusader; через &konfigstartpg_lnk;, и переключать использование для текущей сессии в &viewmenu_lnk;. Действия и &keybindigs_lnk; выполняемые функциональными клавишами настраиваются с версии 1.51 , они остаются активными независимо от того видна панель FN или нет. + +
+ + + +Вкладки каталогов + + + +
+Вкладки каталогов + + +Вкладки каталогов + +
+ + +Используя &folder_tabs; вы можете быстро изменять многочисленные каталоги, каждая панель имеет свою &folder_tabs;. Положение во вкладках сохраняется при закрытии Крусадера. Переключаться между вкладками можно с помощью мыши. В неиспользуемых вкладках полный путь отображается в сжатом виде. Для вкладок доступны следующие операции: + + + открыть новую вкладку и остаться в текущем каталоге: &right_click; в каталоге и выбрать открыть в новой вкладке, или &MMB;, или &Alt;&Ctrl;n. + + + + дублировать вкладку: &right_click; на вкладке и выбрать дублировать вкладку, или &Alt;&Ctrl;&Shift;n. + + + + закрыть вкладку (исключая левую): &right_click; на вкладке и выбрать закрыть вкладку, или &MMB;, или использовать кнопку "красный крест" или &Alt;&Ctrl;c. + + + + открыть вкладку в "домашнем каталоге": нажмите на кнопку Новая вкладка. + + + + сменить вкладку: &Shift;Стрелка влево или &Shift;Стрелка вправо. + + + + Для открытия текущего каталога в новой вкладке используйте &Ctrl;&Alt;&Enter; + + + + +
+ + + +Кнопки + +Для быстрых операций доступны следующие кнопки: &main_toolbar_lnk;, &actions_toolbar_lnk;, Панель инструментов, Очистить панель адреса, Медиа, История каталогов, Закладки, Вкладки, Командная строка, Функциональные клавиши. + + +
+ diff --git a/doc/ru/useraction-xml.docbook b/doc/ru/useraction-xml.docbook new file mode 100644 index 0000000..9c0a290 --- /dev/null +++ b/doc/ru/useraction-xml.docbook @@ -0,0 +1,338 @@ + + + + +useraction.xml +This appendix gives several examples of useraction.xml files. With this you can begin to discover the power of the &useractions_lnk; and start learning how to use them. Once you understand how to write UserActions you will find that &krusader; is an even more powerful, customizable tool. + +Please consider to upload your UserActions at &kde_files_url;. We are collecting UserActions, if your UserAction is selected by us it will be shipped with &krusader; at the next release. We provide also an &useractionsforum_url;. + + + Runs uptime <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> + <KrusaderUserActions> + <action name="uptime" > + <title>Up-time</title> + <tooltip>tells how long since the computer has been booted</tooltip> + <icon>clock</icon> + <category>information</category> + <description>tells how long since the computer has been booted</description> + <command executionmode="collect_output" >uptime</command> + <defaultshortcut>Alt+Ctrl+U</defaultshortcut> + </action> +</KrusaderUserActions> + + + Runs ls -l <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> + <KrusaderUserActions> + <action name="ls -l" > + <title>ls -l in current dir</title> + <description>Runs ls -l in current dir</description> + <command executionmode="collect_output" >ls -l %aPath% %oPath%</command> + </action> +</KrusaderUserActions> + + + Echo Placeholder <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> + <KrusaderUserActions> + <action name="test_placeholder" > + <title>Echo Placeholder</title> + <tooltip>Echo's the placeholder values</tooltip> + <category>Testing</category> + <description>Echo's the placeholder values</description> + <command executionmode="collect_output" onmultiplefiles="call_each" >echo -e "aPath %aPath()% \naCurrent: %aCurrent()%"</command> + </action> +</KrusaderUserActions> + + + This useraction copies current path and filename to clipboard: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="clipboard current" > + <title>Copy to Clipboard</title> + <tooltip>Copy to clipboard</tooltip> + <icon>klipper</icon> + <category>System</category> + <description>Copy current path and filename to clipboard</description> + <command>%_Clipboard("%aCurrent%")%</command> + <defaultshortcut>Win+C</defaultshortcut> + </action> +</KrusaderUserActions> + + + Selects .diff and *.h in the active panel: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="test_select" > + <title>Add selection *.diff and *.h</title> + <category>Selection</category> + <command>%aSelect("*.diff", "add")% %aSelect("*.h", "add")%</command> + </action> +</KrusaderUserActions> + + + Active panel changes to mnt/floppy (bookmark): <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<action name="mnt/floppy bookmark" > + <title>Jump to /mnt/floppy</title> + <category>Bookmarks</category> + <command>%aGoto("/mnt/floppy", "yes")%</command> + </action> +</KrusaderUserActions> + + + Select in the non-active panel, all filenames that are highlighted in the active panel: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> + <action name="asdfasdf" > + <title>Select in Other Panel</title> + <category>Selection</category> + <description>Select all filenames that are selected in the active panel, also in the non-active panel</description> + <command>%oSelect("%aList("selected", " ", "Yes")%")%</command> + </action> +</KrusaderUserActions + + + Make a backup of the current file/folder to foo.bak into the current directory: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="backup current" > + <title>Backup in Current Directory</title> + <tooltip>Backup in current directory</tooltip> + <icon>filesaveas</icon> + <category>System</category> + <description>Backup in current directory</description> + <command>%_Copy("%aCurrent%", "%_Ask("new name", "%aCurrent%.bak")")%</command> + <defaultshortcut>Shift+F5</defaultshortcut> + </action> +</KrusaderUserActions> + + + Opens KruSearcher: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="search" > + <title>Search Test</title> + <command>%_NewSearch("Search 2")%</command> + </action> +</KrusaderUserActions> + + + Sets the selected picture as wallpaper: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="set wallpaper" > + <title>Set as Wallpaper</title> + <tooltip>Set as wallpaper</tooltip> + <icon>image</icon> + <category>Service Menu</category> + <description>Set as wallpaper (scaled)</description> + <command>dcop kdesktop KBackgroundIface setWallpaper "%aCurrent%" 6</command> + <defaultshortcut>Win+W</defaultshortcut> + </action> +</KrusaderUserActions> + + + This useraction edits a file with root permissions using kdesu: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="edit as root" > + <title>Edit as Root</title> + <tooltip>Edit as root</tooltip> + <icon>kwrite</icon> + <category>System</category> + <description>Edit a file with root permissions using kdesu</description> + <command>kdesu kedit %aCurrent%</command> + <defaultshortcut>Win+F4</defaultshortcut> + </action> +</KrusaderUserActions> + + + This useraction Add item(s) to Amarok playlist: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="amarok enqueue" > + <title>Enqueue in Amarok</title> + <tooltip>Append selected item(s) to Amarok playlist</tooltip> + <icon>amarok</icon> + <category>Multimedia</category> + <description>Append selected item(s) to Amarok playlist</description> + <command>amarok --append %aList("Selected")%</command> + <defaultshortcut>Win+A</defaultshortcut> + </action> +</KrusaderUserActions> + + + Opens &synchronizer_lnk;: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="synchronizer" > + <title>Synchronizer</title> + <command>%_Sync("Sync 2")%</command> + </action> +</KrusaderUserActions> + + + Copy selected files & directories with root privileges (also inside archives): <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="root_copy" > + <title>Copy as "root"</title> + <tooltip>Copy as "root"</tooltip> + <icon>editcopy</icon> + <category>Selection</category> + <description>Copy selected files & directories with root privileges, also inside archives!</description> + <command run_as="root" accept="url">kfmclient copy %aList("Selected", " ", "No")% %oPath%</command> + </action> +</KrusaderUserActions> + + + Search and replace a strings and regular expressions in textfiles using sed: <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="search_replace" > + <title>Simple Search and Replace</title> + <tooltip>Search and replace a string/regex in textfiles</tooltip> + <icon>kcachegrind</icon> + <category>Samples</category> + <description>This UA uses the UNIX standard-tool sed (the stream-editor) so perform search and replace operations in all selected files It is possible to give a regular expression for both strings. Please note: The sed-command is "s/search/repleace/", so you have to escape the slash when you need it!</description> + <command>sed -i -e 's/%_Ask("Search for:")%/%_Ask("Replace with:")%/' %aList("Selected")%</command> + </action> +</KrusaderUserActions> + + + + Converts content of selected text-files from ISO-8859-15 to UTF8 and vice versa using iconv (also inside archives): <?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE KrusaderUserActions> +<KrusaderUserActions> + <action name="iso8859-15_to_utf8" > + <title>ISO 8859-15 => UTF8</title> + <tooltip>convert characterset</tooltip> + <icon>editcopy</icon> + <category>Selection</category> + <description>Converts content of selected text-files from ISO-8859-15 to UTF8</description> + <command>sh -c 'cd %aPath%; for i in %aList("Selected", " ", "Yes")% ; do iconv -f iso8859-15 -t utf-8 "$i" -o %oPath%"$i"; done '</command> + </action> + <action name="utf8_to_iso8859-15" > + <title>UTF8 => ISO 8859-15</title> + <tooltip>convert characterset</tooltip> + <icon>editcopy</icon> + <category>Selection</category> + <description>Converts content of selected text-files from UTF8 to ISO-8859-15</description> + <command>sh -c 'cd %aPath%; for i in %aList("Selected", " ", "Yes")% ; do iconv -f utf-8 -t iso8859-15 "$i" -o %oPath%"$i"; done '</command> + </action> +</KrusaderUserActions> + + + + + diff --git a/doc/ru/using-krusader.docbook b/doc/ru/using-krusader.docbook new file mode 100644 index 0000000..d336b61 --- /dev/null +++ b/doc/ru/using-krusader.docbook @@ -0,0 +1,977 @@ + + + + +Using &krusader; + + +Controls + + +General + +This is a rather short but important section that will go into the details of controlling &krusader;. This section doesn't try to cover all the various key combinations for two reasons: there are just too many of them most of &krusader;'s actions are configurable in the &konfiglookandfeel_lnk; We will only mention the most important keyboard shortcuts with the default configuration but keep in mind that most of the &keybindigs_lnk; are configurable. If you find that you use a certain command a lot and want to know the shortcut for this command, or you want to change this command shortcut, then check out the &keybindigs_lnk; tab at the &konfiglookandfeel_lnk;. + + + +Moving Around +By Moving Around we mean the transfer of the keyboard and mouse focus between the different parts of the &krusader; main window. The focus can be in one of five places: the Left or Right Panel, the Menu Bar, the Command Line or the Terminal Emulator. The panel that has the focus is called the Active Panel. An Active Panel will remain active until the other panel receives the focus (&ie;: if the Left Panel was active and you clicked on the Command Line - then the Left Panel remains the Active Panel). You must deliberately change which panel is active. + +The most common way to transfer the focus to a specific panel is to use the mouse to click on that panel. But you should be aware of the following: + + Clicking on the Toolbar, the FN keys bar or the Status Bar does *not* change the focus. + + + + + + Pushing the "History" or the "Run in Terminal" buttons in the Command Line will not transfer the focus so you have click inside the Input Line. + + + + The Menu Bar can get the focus by choosing a menu but it keeps the focus until you choose a command, and then the focus returns to the previous owner. + + + + +There are, of course, ways to use the keyboard to change the focus + The Key will switch panels if one of the panel has the focus, or rotate between all the commands in a menu if the Menu Bar is active. + + The &Ctrl;Down Arrow will take you from the Active Panel to the Command Line or Terminal Emulator, and the &Ctrl;Up Arrow will take you back from the Command Line to the Active Panel. + + The &Esc; Key will make the Menu Bar return the focus, if it has it, to the previous Active Panel. + + If you happen to be inside the Terminal Emulator, you can use the Key, or the mouse, to navigate to an Active Panel. + + Pressing &Alt;"Underlined Letter" from the Menu Bar will open that menu (unless this key combination is a "Reserved Key", used by one of &krusader;'s actions). + + + + + + + +Marking (Selecting) + +&krusader; offers 4 &mouse_selection_modes_lnk;, only &krusader;'s Mouse Selection Mode is explained here. + +Marking is a skill you need to master in order to get the most out of &krusader;. Since you can't select files in the Quick View Panel, and the Tree Panel only lets you select one directory at a time, this paragraph mainly explains how to select files in the List Panel filelist. + +Moving the cursor is easy. Left-clicking on a file or directory (referred to herein as "elements" meaning, files AND directories) will select it. Here are some useful pointers that will make Krusader even easier to use: (assuming you're using &krusader;'s Mouse Selection Mode) + The SPACE and Insert key will toggle the marking of the file under the cursor without affecting the marking of other files/directories, the cussor will go one position down. + + + Pressing the SPACE on a Directory under the cursor will calculate occupied space without affecting the marking of other files/directories. + + + Left Clicking on a file will select, or unselect, all previously marked files. + + + &Ctrl;Left Clicking will toggle the marking of the file under the cursor without affecting the marking of other files/directories. + + + &Shift;Left Clicking will select all the elements between the previous cursor location and the new one. + + + &Shift;Home selects everything above the cursor (and unselect everthing below the cusror if marked). + + + &Shift;End selects everything below the cursor (and unselect everthing above the cusror if marked). + + + The ".." entry is not markable. + + + The &editmenu_lnk; can offer more ways to select your files. + + + + + + + + +Executing Commands +There isn't a lot to say here, all you need to do is select some files (if you don't &krusader; will operate on the file(s) or directory(s) that have the focus), choose a Command from the Menu Bar or use a Keyboard Shortcut (or the Right Click Menu) and the selected Command executes. See also Executing Files. + + + + +Quicksearch + + +This feature will do a quick search for the file name in the Active List Panel. + +There are two quick search methods: + "Old Quicksearch": type foo (one character) to do a quick search in the Active List Panel for a file beginning with "foo". + + "New Quicksearch": type foo to open the small quick search dialog box below the Active List Panel. Type the first few characters of the desired filename (more than one character allowed), the cursor will jump to that filename (if it exists), ⪚ type "ab" to search for a file which begins with "ab". The Up/Down Arrow will jump to the next or previous match. &Esc; will close the quicksearch line. The cursor will stay on the last Quicksearch file found. + + + +If you press &Alt;foo, the key binding shortcut will be executed. If there is no configured key binding, the remaining letter foo will used for the quick search. + +Use &konfiglookandfeel_lnk; to change from the default configuration. + + + +Context Menu + +&krusader; has many Context menus that allow you to do fast operations with the mouse, usually a Right-Click will open the Context menu (depending on your &mouse_selection_modes_lnk; settings). This list gives an overview of the most important Context menus, use them to discover the available commands. + &main_toolbar_lnk; (orientation, text position , icon size) + &list_panel_lnk; on a file or directory + &cmdline_lnk; (undo, paste, text completion, ...) + &termemu_lnk; (send signal, font, history, ...) + &foldertabs_lnk; (new, duplicate, close) + KruSearcher Search results file list (F3 View, F4 Edit) + &mountman_lnk; (unmount, format, ...) + &syncdirs_lnk; File List + &useractions_lnk; + &konqueror; Right-Click actions are shown in &krusader; + Show/hide Column Headers + ... + + + + + + + +Basic File Management + + +Executing Files +You can only execute files in the Active List Panel. To execute a file just (double-)click on it or press Enter when it is under the list cursor. &krusader; will open it in the default application for this file type (picture, textfile, ...) or the file will be executed (script, binary, ...). If you want to use another application to open the file, then Right-Click on the file and go to the "open with" sub-menu which will offer more options. &krusader; is compatible with &kde; default file-manager for all file types except archives that are opened inside the &krusader; panel and not in an external application. See the archives page in Konfigurator for details. + + + + +Copying and Moving +To copy or move files/directories just select them and press F5 to copy or F6 to move them. If checked the Preserve attributes (only on local targets) option, &krusader; will try to preserve all attributes (time, owner, group) of the local files according to the source depending on your permissions: User preserving if you are root Group preserving if you are root or member of the group Preserving the timestamp Using this option might slow down the copy/move process. A dialog will appear and allow you to choose the operation destination, the default destination is the other-panel browsed directory. If you enter a partial &URL; &krusader; will use the current panel directory as the &URL; base. + + + + +Deleting +Deleting files/directories is done by marking them and pressing F8 or Delete. By default it will be moved to &kde;'s Trash, &Shift;Delete will delete the file permanently. A dialog will ask for your confirmation and will warn you when deleting non-empty directories. Of course only operations that you are permitted to do by the Operating System will be performed - you will be notified otherwise. If you don't wish to see the confirmation dialogs, you can disable them in the Konfigurator advanced tab. + + + + +Renaming files, Creating Directories, and Link Handling +Rename the file under the cursor with the F9 key or with two single mouseclicks. If only the filename needs to be renamed and not the extension you can configure this in the &konfiglookandfeel_lnk;. Create a new directory with the F7 key. Right-clicking on a regular file will give you the option "New Symlink", a dialog will prompt you to enter a symlink name. That name will point to the file/directory you Right-Clicked on. If the file you Right-Clicked on is a symlink you will also be presented with the "redirect link" option that will allow you change the link target. + + + + +Viewing and Editing files +KrViewer has a chapter of its own. + + + + + +Archive Handling + + +Browsing Archives +The &vfs_lnk; allows to browse archives as it was a directory. &krusader; supports currently the following archives types: ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip and 7-zip and supports the next passworded archives: arj, ace, rar and zip. Passwords can be stored in &kwallet;. Please note that the archive support first needs to be properly configured in Konfigurator. To open the archive use &Enter;, (double-)click or the Right Arrow. &krusader; supports also hidden archives, these are renamed archives with a *wrong* extension. ⪚ &openoffice; uses zip archives with the next extensions: odt, sxw and odw. &Enter; will open the &openoffice; document and the Right Arrow will open the archive. An other example is J2EE where the rar extension means a zip archive. &krusader; will open with Right Arrow the archive even if it has an other mime type, since &krusader; autodetects the supported archive types. Please note that browsing archives has a few limitations: + Not all functions are supported by all archive types. (&ie;: you can't delete files in ace or rar archives) + + The permissions you have inside the archive are the same as the permissions you have for the archive. + + The command line (if visible) will not follow you inside the archive but will point to the archive directory. + + Before any action is performed on files/directories inside the archive they must be extracted. The archive will be repacked when you leave it or when &krusader; detects that extracted files have changed. + + Packing and un-packing are "blocking operations" that display a Progress Dialog. Though, this might change in the future since we are planning to create more background operations. + + + + + + + +Unpack Files +There are 2 ways to extract files from archives: + +If you want to unpack a whole archive(s), browse to the archive location, select the archive(s) and select File Unpack or &Alt;U. &krusader; will ask you where to put the extracted files, the default location is the inactive panel directory. If you don't cancel the operation, &krusader; will try to unpack all the selected files in the inactive panel. + +If you only want to extract part of the archive, then browse the archive and copy the files you want to extract to their new location just as you would copy "normal" files. Note that unpacking from a browsed archive takes more time (file by file unpack) compared to unpacking a whole archive with the first method. + + + + +Packing Files +If you want to create a new archive, begin by marking the elements you want to pack in the active panel and select File Pack or &Alt;P. A dialog will pop-up, prompting you to select the archive name and location, you select the packer by selecting one of the supported filename extensions. + +To add files to an existing archives, open the archive in one panel and the files to be copied in the other panel, then simply copy the files into the archive in exactly the same way you copy files into a "normal" directory. + + + + +Testing Archives +Krusader will not handle corrupted archives since it may result in data loss. If you receive an error message when opening an archive, or if you suspect that there something wrong with the archive you should test it before use. To test an archive, browse (navigate) to the archive location, select the archive. Next select File Test Archive or &Alt;E. &krusader; will test the archive file and inform you if the archive passed or failed the file integrity test. + + + + + + + +More features + + +Virtual file systems (VFS) +VFS + +A basic OFM feature is VFS, this an abstracted layer over all kinds of archived information (ZIP files, FTP servers, TAR archives, NFS filesystems, SAMBA shares, ISO cd/dvd images, RPM catalogs, etc.), which allows the user to access all the information in these divergent types of filesystems transparently - just like entering an ordinary sub-directory! &krusader; supports several VFS: Remote connections VFS: provides the capability of working with a remote connection session (FTP, NFS, Samba, FISH, SFTP) like with local filesystems. It's perfect for complex remote operations and almost as powerful as most standalone GUI remote clients. Archive VFS: allows to browse archives in VFS as it was a directory (ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, zip and 7-zip). Search VFS: Feed to listbox will place the search results in VFS. Synchronizer VFS: places the synchronizer results in VFS. Actions you perform on the files in VFS are performed on the 'real' files. You don't just delete files from the VFS - you delete them from your hard drive. Limitations: you can't create directories inside in a VFS. + + + + + +Compare +&krusader; contains several compare functions: Compare by content, Compare Directories and the Synchronizer compare function. + + + +Compare by Content +Select in each panel one file, and use File Compare by content. &krusader; will open a external graphical difference tool that is configured, right now &kompare;, &kdiff3_url; and &xxdiff_url; are supported. + + + + +Compare Directories +Compare the files of each panel by using Mark Compare Directories. By default newer and single files will be selected in each panel, this behaviour can be changed in the Compare Setup menu. The files are not compared by content but by their names and dates only. + + + + + Mark Compare Setup + Configures the Compare Directories function. + + Mark Newer and Single (default) + Mark Single + + Mark Newer + + Mark Different and Single + + Mark Different + + + + + + + + + + + +Calculate Occupied Space + + +There are two ways to calculate the occupied space of files/directories. Pressing the SPACE on a directory under the cursor instantly calculates the occupied size. Pressing SPACE a second time will toggle the marking of the directory without affecting the selection status of other files/directories. To calculate how much disk space is occupied by the marked files and directories in the active panel select File Calculate Occupied Space. After a (hopefully) small delay, a dialog box will be displayed with total occupied space and the number of files and directories you selected. The space occupied by every selected directory will be shown as if the user just pressed SPACE on that directories. If the active panel is browsing an archive, the numbers will apply to the *unpacked* size of the selected files and directories, not their compressed size. After the calculation the marking state will toggle and the cusor will move one position down. Calculating the occupied space on remote filesystems is supported. Performing this operation on a very large filesystem (thousands of files) may be time consuming. You can always cancel the calculation process at any time by clicking on the Cancel button. + + + + + +File Splitter + +This function splits one (big) file up into multiple smaller files so that they can be placed on several smaller media (⪚ zip-drives, ...) or sent by e-mail. The multiple files can be combined again to recreate the original file. &krusader; and &tcmd; split/combine functions are compatible. To split a file choose FileSplit or &Ctrl;P A Split dialog will open to confirm the operation. + +If the name of the original file is foo, then the name of the smaller files will be foo.000 foo.001 foo.002 &etc; There is no theoretical limit in the number of smaller files, but it is recommended to limit the number to a max of 1023 files. &krusader; creates a foo.crc file. This file contains the name, size and the crc checksum of the original file. It's possible to combine the file without the foo.crc file but in this case &krusader; can't check if the the original file was recreated correctly. + +An example of a foo.crc file: filename=foo + size=432998467868 + crc32=21EB719A + + + +To combine the multiple files choose, select a partial file foo.xxx and choose File Combine files or &Ctrl;B. The target directory is the unactive panel and can be changed. The file names must be numbered in ascending order: foo.001, foo.002, foo.003 &etc; or have letters in ascending order: ("split letter method") fileaa, fileab, fileac &etc; If the file foo.crc is found in the same directory as the partial files, &krusader; will use this file to check the combined file for errors. + + + + + + +Checksum creation-verification + +File Create Checksum : &krusader; checks which tools you have and if those tools allow recursive operation (in case you selected folders), you choose the type of checksum (md5, sha...) and it is generated. You can then save the checksum to a file, usually called checksum.md5 (or .sha1 or whatever). + +File Verify Checksum : &krusader; checks if you have a tool that supports the type of checksum you need (from your specified checksum file) and displays the files that failed the checksum (if any). + +The nice thing is that the system abstracts over different checksum mechanisms and different binaries. Right now, it supports md5, sha1, sha256, tiger, whirlpool and cfv. You probably have md5sum and sha1sum already, external supported tools are md5deep (sha256, tiger, whirlpool) and cfv. + + + + +Send Files by e-mail +Select a file and use Right-Click menu Send by Email. Selecting this option will open a new &kmail; window with the file already attached. Just fill in the subject and recipient(s) and send it. Of course, &kmail; must be properly configured. + + + + +Shred Files +When you delete files in your local system they are not completely erased and the information stored in them can be recovered using special software and hardware tools. If you want to erase a file without recoverable traces, select the file and use Right-Click menu Shred. + + + + + + + + + + + + + + + +Profiles +Profiles + +With profiles you can save and restore your favorite settings. Several features supports profiles, you can have ⪚ different panel profiles (work, home, remote connectios, &etc;), search profiles, synchroniser profiles, &etc; + + + +Panel Profiles +A panel profile contains: all the tabs paths (left/right), the current tab (left/right), the active panel (left or right), all this information is stored in the &krusaderrc_lnk; file. You can have several Panel profiles ⪚ file-managment, ftp-managment, home, work, etc. The panel profile can be saved and restored in the Commands menu. The default startup profile will be used when starting krusader, with a commandline option you override the default startup profile. + + + + + +Color Profiles +Colormaps can be saved and restored with Color Profiles. &krusader; Colormaps are available at &kde_files_url;. + + + + +Key-binding Profiles +Keymaps can be saved and restored with Key-binding Profiles. &krusader; Keymaps are available at &kde_files_url;. + + + + +Search Profiles +When you regularly perform the same search operation, than you can save the search settings (⪚ include files, exclude files, &etc;) in a Search Profile. + + + + +Synchroniser Profiles +When you regularly perform the same synchronise operation, than you can save the synchronise settings in a Synchroniser Profile. + + + + + + + + + + diff --git a/doc/update_docbook b/doc/update_docbook new file mode 100755 index 0000000..5a3e507 --- /dev/null +++ b/doc/update_docbook @@ -0,0 +1,73 @@ +#!/bin/sh + +# *************************************************************************** +# update_docbook +# ++++++++++++++++++++ +# copyright : (C) 2006 +# Frank Schoolmeesters +# & the Krusader Krew +# e-mail : krusader@users.sourceforge.net +# web site : http://www.krusader.org +# description : update translated docbook files +# +# *************************************************************************** +# * Permission is granted to copy, distribute and/or modify this * +# * document under the terms of the GNU Free Documentation License, * +# * Version 1.1 or any later version published by the Free Software * +# * Foundation; with no Invariant Sections, no Front-Cover Texts and * +# * no Back-Cover Texts. A copy of the license is available on the * +# * GNU site http://www.gnu.org/licenses/fdl.html or by writing to: * +# * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +# * MA 02110-1301, USA. * +# *************************************************************************** +# +# This script creates the translated docbook files by inserting the translated po text into the original +# english docbook files in the language folder ../doc/i18n/$lang +# with po2xml *.docbook.po > *.docbook +# Before running this script the according english docbook files need to be copied in the language folder ../doc/i18n/$lang +# for a 100% merge the po and the english docbook files need to have the same date +# The created docbook files needs to be copied into the proper language dir ../doc/$lang + + +# Requirements: bash, po2xml +# usage: run ./update_docbook ru Russian + + +# --help +if test $# -eq 0 || test "$1" = "--help" ; then + echo "update_docbook " + exit +fi + +# test if $2 is used +if test $# -eq 0 || test "$2" = "" ; then + echo "update_docbook " + exit +fi + +# read first parameter +lang=$1 + +# read second parameter +newlanguage=$2 + +# jump into the lang folder +cd ../doc/i18n/$lang + + +# update +for FILENAME in $(ls *.docbook);do + #display the '*.docbook' filename + echo updating ${FILENAME} ... + # po2xml index_en.docbook index_ru_new.docbook.po > index_ru.docbook + po2xml ${FILENAME} $FILENAME.po > ${FILENAME}.new + # rename docbook.new into docbook + mv $FILENAME.new $FILENAME +done + +# change "English" in to "$newlanguage" in the translated index.docbook file +perl -p -i -e 's/English "INCLUDE"/'$newlanguage' "INCLUDE"/g' index.docbook + +echo NOTE: This script sould only be used by the Documentation i18n coordinator or the Krusader Krew +echo Please contact the Documentation i18n coordinator if you want to translate the Krusader documentation +echo Wrong usage of this script might result in outdated documentation files diff --git a/doc/update_po b/doc/update_po new file mode 100755 index 0000000..af5625c --- /dev/null +++ b/doc/update_po @@ -0,0 +1,68 @@ +#!/bin/sh + +# *************************************************************************** +# merge_po +# ++++++++++++++++++++ +# copyright : (C) 2006 +# Frank Schoolmeesters +# & the Krusader Krew +# e-mail : krusader@users.sourceforge.net +# web site : http://www.krusader.org +# description : update translated docbook files +# +# *************************************************************************** +# * Permission is granted to copy, distribute and/or modify this * +# * document under the terms of the GNU Free Documentation License, * +# * Version 1.1 or any later version published by the Free Software * +# * Foundation; with no Invariant Sections, no Front-Cover Texts and * +# * no Back-Cover Texts. A copy of the license is available on the * +# * GNU site http://www.gnu.org/licenses/fdl.html or by writing to: * +# * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +# * MA 02110-1301, USA. * +# *************************************************************************** +# +# This script merges po files with the latest version of the english pot files in the language folder ../doc/i18n/$lang +# with po2xml *.docbook.po > *.docbook +# Use this script to created the latest version for the po files + + +# Requirements: bash, ./update_pot, msgmerge, msgfmt +# usage: run ./merge_po ru + + +# --help +if test $# -eq 0 || test "$1" = "--help" ; then + echo "update_po " + exit +fi + +# create the latest pot templates +./update_pot + +# read first parameter +lang=$1 + +# jump into the lang folder +cd ../doc/i18n/$lang + +# merge po files with the updated english pot files +for FILENAME in $(ls *.po);do + # display the '*.po' filename + echo merging ${FILENAME} ... + FILENAME=`echo ${FILENAME} | perl -p -i -e 's/.po/''/g'` + # make backup copy of the *.po files + cp $FILENAME.po $FILENAME.po.bak + # merge po files with the updated english pot files + msgmerge $FILENAME.po ../pot/${FILENAME}.pot -q --force-po --output-file=${FILENAME}.po.new + # rename po.new into po + mv $FILENAME.po.new $FILENAME.po + # show translation statistics + msgfmt $FILENAME.po --statistics -c -v --output-file=$FILENAME.tmp + echo "" + # delete temporary files 'foo.po.tmp' + rm -f $FILENAME.tmp +done + +echo NOTE: This script sould only be used by the Documentation i18n coordinator or the Krusader Krew +echo Please contact the Documentation i18n coordinator if you want to translate the Krusader documentation +echo Wrong usage of this script might result in outdated documentation files diff --git a/doc/update_pot b/doc/update_pot new file mode 100755 index 0000000..e93e4ef --- /dev/null +++ b/doc/update_pot @@ -0,0 +1,57 @@ +#!/bin/sh + +# *************************************************************************** +# update_pot +# ++++++++++++++++++++ +# copyright : (C) 2006 +# Frank Schoolmeesters +# & the Krusader Krew +# e-mail : krusader@users.sourceforge.net +# web site : http://www.krusader.org +# description : update translation pot template files +# +# *************************************************************************** +# * Permission is granted to copy, distribute and/or modify this * +# * document under the terms of the GNU Free Documentation License, * +# * Version 1.1 or any later version published by the Free Software * +# * Foundation; with no Invariant Sections, no Front-Cover Texts and * +# * no Back-Cover Texts. A copy of the license is available on the * +# * GNU site http://www.gnu.org/licenses/fdl.html or by writing to: * +# * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +# * MA 02110-1301, USA. * +# *************************************************************************** +# +# This script creates *.pot translation template files in the krusader_kde3/doc/i18n folder +# with xml2pot *.docbook > *.docbook.pot + +# Requirements: bash, xml2pot, perl +# usage: run ./update_pot + +# jump into the english folder +cd en + +# grepping version information from index.docbook +VERSION=`grep releaseinfo index.docbook | tr -d ' ' | tr -d 'a-z' | tr -d 'A-Z' | tr -d '"'` + +# current date +DATENOW=$(date +%Y-%m-%d) + +for FILENAME in $(ls *.docbook);do + echo updating ${FILENAME}.pot ... + # create pot file in the english folder + xml2pot ${FILENAME} > ${FILENAME}.pot + # modify pot header with perl seach/replace function + perl -p -i -e 's/# SOME DESCRIPTIVE TITLE./# Translation of '${FILENAME}' to LANGUAGE +# Copyright (C) 2006, Krusader Krew +# This file is distributed under the same license as the Krusader package/g' ${FILENAME}.pot + perl -p -i -e 's/Project-Id-Version: PACKAGE VERSION/Project-Id-Version: Krusader-doc-'$VERSION' '$DATENOW'/g' ${FILENAME}.pot + perl -p -i -e 's/Report-Msgid-Bugs-To: http:\/\/bugs.kde.org/Report-Msgid-Bugs-To: /g' ${FILENAME}.pot + perl -p -i -e 's/kde-i18n-doc\@kde.org/krusader-i18n\@googlegroups.com/g' ${FILENAME}.pot +done + +# move pot files to folder krusader_kde3/doc/i18n/pot since they don't belong in the english folder +mv *.pot ../i18n/pot + +echo NOTE: This script sould only be used by the Documentation i18n coordinator or the Krusader Krew +echo Please contact the Documentation i18n coordinator if you want to translate the Krusader documentation +echo Wrong usage of this script might result in outdated documentation files diff --git a/iso/Makefile.am b/iso/Makefile.am new file mode 100644 index 0000000..a8ad6fa --- /dev/null +++ b/iso/Makefile.am @@ -0,0 +1,64 @@ +kde_module_LTLIBRARIES = kio_iso.la + + +INCLUDES = $(all_includes) + + +#LDFLAGS = + +kio_iso_la_METASOURCES=AUTO + +kio_iso_la_SOURCES = kisodirectory.cpp kisofile.cpp qfilehack.cpp kiso.cpp iso.cpp +kio_iso_la_LIBADD = libisofs/libisofs.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KIO) + +kio_iso_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) + + +SUBDIRS = libisofs + +noinst_HEADERS = iso.h kiso.h qfilehack.h kisofile.h kisodirectory.h +EXTRA_DIST = iso.protocol isoservice.desktop + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(kde_servicesdir)/ + $(INSTALL_DATA) $(srcdir)/iso.protocol $(DESTDIR)$(kde_servicesdir)/iso.protocol + $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/konqueror/servicemenus/ + $(INSTALL_DATA) $(srcdir)/isoservice.desktop $(DESTDIR)$(kde_datadir)/konqueror/servicemenus/isoservice.desktop + $(mkinstalldirs) $(DESTDIR)$(kde_confdir)/ + $(INSTALL_DATA) $(srcdir)/kio_isorc $(DESTDIR)$(kde_confdir)/kio_isorc + +uninstall-local: + -rm -f $(DESTDIR)$(kde_servicesdir)/iso.protocol + -rm -f $(DESTDIR)$(kde_datadir)/konqueror/servicemenus/isoservice.desktop + -rm -f $(DESTDIR)$(kde_confdir)/kio_isorc + +# These paths are KDE specific. Use them: +# kde_appsdir Where your application's menu entry (.desktop) should go to. +# kde_icondir Where your icon should go to - better use KDE_ICON. +# kde_sounddir Where your sounds should go to. +# kde_htmldir Where your docs should go to. (contains lang subdirs) +# kde_datadir Where you install application data. (Use a subdir) +# kde_locale Where translation files should go to. (contains lang subdirs) +# kde_cgidir Where cgi-bin executables should go to. +# kde_confdir Where config files should go to (system-wide ones with default values). +# kde_mimedir Where mimetypes .desktop files should go to. +# kde_servicesdir Where services .desktop files should go to. +# kde_servicetypesdir Where servicetypes .desktop files should go to. +# kde_toolbardir Where general toolbar icons should go to (deprecated, use KDE_ICON). +# kde_wallpaperdir Where general wallpapers should go to. +# kde_templatesdir Where templates for the "New" menu (Konqueror/KDesktop) should go to. +# kde_bindir Where executables should go to. Use bin_PROGRAMS or bin_SCRIPTS. +# kde_libdir Where shared libraries should go to. Use lib_LTLIBRARIES. +# kde_moduledir Where modules (e.g. parts) should go to. Use kde_module_LTLIBRARIES. +# kde_styledir Where Qt/KDE widget styles should go to (new in KDE 3). +# kde_designerdir Where Qt Designer plugins should go to (new in KDE 3). + + +# make messages.po. Move this one to ../po/ and "make merge" in po +# the -x is for skipping messages already translated in kdelibs +messages: + LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \ + if test -n "$$LIST"; then \ + $(XGETTEXT) -C -ki18n -x $(kde_includes)/kde.pot $$LIST -o ../po/iso.pot; \ + fi + diff --git a/iso/iso.cpp b/iso/iso.cpp new file mode 100644 index 0000000..8b7ebe6 --- /dev/null +++ b/iso/iso.cpp @@ -0,0 +1,525 @@ +/*************************************************************************** + iso.cpp + ------------------- + begin : Oct 25 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 file is heavily based on tar.cc from kdebase + * (c) David Faure + */ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include // to be removed + +#include "libisofs/iso_fs.h" + +#include "kisofile.h" +#include "kisodirectory.h" +#include "iso.h" + +typedef struct { + char magic[8]; + char uncompressed_len[4]; + unsigned char header_size; + unsigned char block_size; + char reserved[2]; /* Reserved for future use, MBZ */ +} compressed_file_header; + +static const unsigned char zisofs_magic[8] = { + 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07 +}; + +using namespace KIO; + +extern "C" { int kdemain(int argc, char **argv); } + +int kdemain( int argc, char **argv ) +{ + KInstance instance( "kio_iso" ); + + kdDebug() << "Starting " << getpid() << endl; + + if (argc != 4) + { + fprintf(stderr, "Usage: kio_iso protocol domain-socket1 domain-socket2\n"); + exit(-1); + } + + kio_isoProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + kdDebug() << "Done" << endl; + return 0; +} + + +kio_isoProtocol::kio_isoProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "iso", pool, app ) +{ + kdDebug() << "kio_isoProtocol::kio_isoProtocol" << endl; + m_isoFile = 0L; +} + +kio_isoProtocol::~kio_isoProtocol() +{ + delete m_isoFile; +} + +bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int startsec ) +{ + kdDebug() << "kio_isoProtocol::checkNewFile " << fullPath << " startsec: " << + startsec << endl; + + // Are we already looking at that file ? + if ( m_isoFile && startsec == m_isoFile->startSec() && + m_isoFile->fileName() == fullPath.left(m_isoFile->fileName().length()) ) + { + // Has it changed ? + struct stat statbuf; + if ( ::stat( QFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 ) + { + if ( m_mtime == statbuf.st_mtime ) + { + path = fullPath.mid( m_isoFile->fileName().length() ); + kdDebug() << "kio_isoProtocol::checkNewFile returning " << path << endl; + return true; + } + } + } + kdDebug() << "Need to open a new file" << endl; + + // Close previous file + if ( m_isoFile ) + { + m_isoFile->close(); + delete m_isoFile; + m_isoFile = 0L; + } + + // Find where the iso file is in the full path + int pos = 0; + QString isoFile; + path = QString::null; + + int len = fullPath.length(); + if ( len != 0 && fullPath[ len - 1 ] != '/' ) + fullPath += '/'; + + kdDebug() << "the full path is " << fullPath << endl; + while ( (pos=fullPath.find( '/', pos+1 )) != -1 ) + { + QString tryPath = fullPath.left( pos ); + kdDebug() << fullPath << " trying " << tryPath << endl; + + KDE_struct_stat statbuf; + if ( KDE_lstat( QFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) ) + { + isoFile = tryPath; + m_mtime = statbuf.st_mtime; + m_mode = statbuf.st_mode; + path = fullPath.mid( pos + 1 ); + kdDebug() << "fullPath=" << fullPath << " path=" << path << endl; + len = path.length(); + if ( len > 1 ) + { + if ( path[ len - 1 ] == '/' ) + path.truncate( len - 1 ); + } + else + path = QString::fromLatin1("/"); + kdDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl; + break; + } + } + if ( isoFile.isEmpty() ) + { + kdDebug() << "kio_isoProtocol::checkNewFile: not found" << endl; + return false; + } + + // Open new file + kdDebug() << "Opening KIso on " << isoFile << endl; + m_isoFile = new KIso( isoFile ); + m_isoFile->setStartSec(startsec); + if ( !m_isoFile->open( IO_ReadOnly ) ) + { + kdDebug() << "Opening " << isoFile << " failed." << endl; + delete m_isoFile; + m_isoFile = 0L; + return false; + } + + return true; +} + + +void kio_isoProtocol::createUDSEntry( const KArchiveEntry * isoEntry, UDSEntry & entry ) +{ + UDSAtom atom; + + entry.clear(); + atom.m_uds = UDS_NAME; + atom.m_str = isoEntry->name(); + entry.append(atom); + + atom.m_uds = UDS_FILE_TYPE; + atom.m_long = isoEntry->permissions() & S_IFMT; // keep file type only + entry.append( atom ); + + atom.m_uds = UDS_ACCESS; + atom.m_long = isoEntry->permissions() & 07777; // keep permissions only + entry.append( atom ); + + atom.m_uds = UDS_SIZE; + if (isoEntry->isFile()) { + atom.m_long = ((KIsoFile *)isoEntry)->realsize(); + if (!atom.m_long) atom.m_long = ((KIsoFile *)isoEntry)->size(); + } else { + atom.m_long = 0L; + } + entry.append( atom ); + + atom.m_uds = UDS_USER; + atom.m_str = isoEntry->user(); + entry.append( atom ); + + atom.m_uds = UDS_GROUP; + atom.m_str = isoEntry->group(); + entry.append( atom ); + + atom.m_uds = UDS_MODIFICATION_TIME; + atom.m_long = isoEntry->date(); + entry.append( atom ); + + atom.m_uds = UDS_ACCESS_TIME; + atom.m_long = isoEntry->isFile() ? ((KIsoFile *)isoEntry)->adate() : + ((KIsoDirectory *)isoEntry)->adate(); + entry.append( atom ); + + atom.m_uds = UDS_CREATION_TIME; + atom.m_long = isoEntry->isFile() ? ((KIsoFile *)isoEntry)->cdate() : + ((KIsoDirectory *)isoEntry)->cdate(); + entry.append( atom ); + + atom.m_uds = UDS_LINK_DEST; + atom.m_str = isoEntry->symlink(); + entry.append( atom ); +} + +void kio_isoProtocol::listDir( const KURL & url ) +{ + kdDebug() << "kio_isoProtocol::listDir " << url.url() << endl; + + QString path; + if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) + { + QCString _path( QFile::encodeName(url.path())); + kdDebug() << "Checking (stat) on " << _path << endl; + struct stat buff; + if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { + error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + return; + } + // It's a real dir -> redirect + KURL redir; + redir.setPath( url.path() ); + if (url.hasRef()) redir.setRef(url.htmlRef()); + kdDebug() << "Ok, redirection to " << redir.url() << endl; + redirection( redir ); + finished(); + // And let go of the iso file - for people who want to unmount a cdrom after that + delete m_isoFile; + m_isoFile = 0L; + return; + } + + if ( path.isEmpty() ) + { + KURL redir( QString::fromLatin1( "iso:/") ); + kdDebug() << "url.path()==" << url.path() << endl; + if (url.hasRef()) redir.setRef(url.htmlRef()); + redir.setPath( url.path() + QString::fromLatin1("/") ); + kdDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl; + redirection( redir ); + finished(); + return; + } + + kdDebug() << "checkNewFile done" << endl; + const KArchiveDirectory* root = m_isoFile->directory(); + const KArchiveDirectory* dir; + if (!path.isEmpty() && path != "/") + { + kdDebug() << QString("Looking for entry %1").arg(path) << endl; + const KArchiveEntry* e = root->entry( path ); + if ( !e ) + { + error( KIO::ERR_DOES_NOT_EXIST, path ); + return; + } + if ( ! e->isDirectory() ) + { + error( KIO::ERR_IS_FILE, path ); + return; + } + dir = (KArchiveDirectory*)e; + } else { + dir = root; + } + + QStringList l = dir->entries(); + totalSize( l.count() ); + + UDSEntry entry; + QStringList::Iterator it = l.begin(); + for( ; it != l.end(); ++it ) + { + kdDebug() << (*it) << endl; + const KArchiveEntry* isoEntry = dir->entry( (*it) ); + + createUDSEntry( isoEntry, entry ); + + listEntry( entry, false ); + } + + listEntry( entry, true ); // ready + + finished(); + + kdDebug() << "kio_isoProtocol::listDir done" << endl; +} + +void kio_isoProtocol::stat( const KURL & url ) +{ + QString path; + UDSEntry entry; + + kdDebug() << "kio_isoProtocol::stat " << url.url() << endl; + if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) + { + // We may be looking at a real directory - this happens + // when pressing up after being in the root of an archive + QCString _path( QFile::encodeName(url.path())); + kdDebug() << "kio_isoProtocol::stat (stat) on " << _path << endl; + struct stat buff; + if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { + kdDebug() << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror(errno) << endl; + error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + return; + } + // Real directory. Return just enough information for KRun to work + UDSAtom atom; + atom.m_uds = KIO::UDS_NAME; + atom.m_str = url.fileName(); + entry.append( atom ); + kdDebug() << "kio_isoProtocol::stat returning name=" << url.fileName() << endl; + + atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_long = buff.st_mode & S_IFMT; + entry.append( atom ); + + statEntry( entry ); + + finished(); + + // And let go of the iso file - for people who want to unmount a cdrom after that + delete m_isoFile; + m_isoFile = 0L; + return; + } + + const KArchiveDirectory* root = m_isoFile->directory(); + const KArchiveEntry* isoEntry; + if ( path.isEmpty() ) + { + path = QString::fromLatin1( "/" ); + isoEntry = root; + } else { + isoEntry = root->entry( path ); + } + if ( !isoEntry ) + { + error( KIO::ERR_DOES_NOT_EXIST, path ); + return; + } + createUDSEntry( isoEntry, entry ); + statEntry( entry ); + finished(); +} + +void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const QString &path ) +{ + unsigned long long size, pos = 0; + bool mime=false,zlib=false; + QByteArray fileData, pointer_block, inbuf, outbuf; + char *pptr = 0; + compressed_file_header *hdr; + int block_shift; + unsigned long nblocks; + unsigned long fullsize = 0, block_size = 0, block_size2 = 0; + size_t ptrblock_bytes; + unsigned long cstart, cend, csize; + uLong bytes; + + size = isoFileEntry->realsize(); + if (size >= sizeof(sizeof(compressed_file_header))) zlib=true; + if (!size) size = isoFileEntry->size(); + totalSize( size ); + if (!size) mimeType("application/x-zerosize"); + + if (size && !m_isoFile->device()->isOpen()) m_isoFile->device()->open(IO_ReadOnly); + + if (zlib) { + fileData=isoFileEntry->data(0, sizeof(compressed_file_header)); + if ( fileData.size() == sizeof(compressed_file_header) && + !memcmp(fileData.data(), zisofs_magic, sizeof (zisofs_magic)) ) { + + hdr=(compressed_file_header*) fileData.data(); + block_shift = hdr->block_size; + block_size = 1UL << block_shift; + block_size2 = block_size << 1; + fullsize = isonum_731(hdr->uncompressed_len); + nblocks = (fullsize + block_size - 1) >> block_shift; + ptrblock_bytes = (nblocks+1) * 4; + pointer_block=isoFileEntry->data( hdr->header_size << 2, ptrblock_bytes ); + if (pointer_block.size() == ptrblock_bytes && + inbuf.resize(block_size2) && + outbuf.resize(block_size)) { + + pptr = pointer_block.data(); + } else { + error(KIO::ERR_COULD_NOT_READ, path); + return; + } + } else { + zlib=false; + } + } + + while (pos block_size2 ) { + //err = EX_DATAERR; + break; + } + + inbuf=isoFileEntry->data(cstart, csize); + if (inbuf.size() != csize) { + break; + } + + bytes = block_size; // Max output buffer size + if ( (uncompress((Bytef*) outbuf.data(), &bytes, (Bytef*) inbuf.data(), csize)) != Z_OK ) { + break; + } + } + + if ( ((fullsize > block_size) && (bytes != block_size)) + || ((fullsize <= block_size) && (bytes < fullsize)) ) { + + break; + } + + if ( bytes > fullsize ) + bytes = fullsize; + fileData.assign(outbuf); + fileData.resize(bytes); + fullsize -= bytes; + } else { + fileData=isoFileEntry->data(pos,65536); + if (fileData.size()==0) break; + } + if (!mime) { + KMimeMagicResult * result = KMimeMagic::self()->findBufferFileType( fileData, path ); + kdDebug() << "Emitting mimetype " << result->mimeType() << endl; + mimeType( result->mimeType() ); + mime=true; + } + data(fileData); + pos+=fileData.size(); + processedSize(pos); + } + + if (pos!=size) { + error(KIO::ERR_COULD_NOT_READ, path); + return; + } + + fileData.resize(0); + data(fileData); + processedSize(pos); + finished(); + +} + +void kio_isoProtocol::get( const KURL & url ) +{ + kdDebug() << "kio_isoProtocol::get" << url.url() << endl; + + QString path; + if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) + { + error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + return; + } + + const KArchiveDirectory* root = m_isoFile->directory(); + const KArchiveEntry* isoEntry = root->entry( path ); + + if ( !isoEntry ) + { + error( KIO::ERR_DOES_NOT_EXIST, path ); + return; + } + if ( isoEntry->isDirectory() ) + { + error( KIO::ERR_IS_DIRECTORY, path ); + return; + } + + const KIsoFile* isoFileEntry = static_cast(isoEntry); + if ( !isoEntry->symlink().isEmpty() ) + { + kdDebug() << "Redirection to " << isoEntry->symlink() << endl; + KURL realURL( url, isoEntry->symlink() ); + kdDebug() << "realURL= " << realURL.url() << endl; + redirection( realURL.url() ); + finished(); + return; + } + getFile(isoFileEntry, path); + if (m_isoFile->device()->isOpen()) m_isoFile->device()->close(); +} diff --git a/iso/iso.h b/iso/iso.h new file mode 100644 index 0000000..079f68e --- /dev/null +++ b/iso/iso.h @@ -0,0 +1,51 @@ +/*************************************************************************** + iso.h + ------------------- + begin : Oct 25 2002 + copyright : (C) 2002 by Szombathelyi Gyrgy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 file is heavily based on tar.h from kdebase + * (c) David Faure + */ + +#ifndef _ISO_H +#define _ISO_H + +#include +#include +#include "kisofile.h" + +class KIso; + +class kio_isoProtocol : public KIO::SlaveBase +{ +public: + kio_isoProtocol( const QCString &pool, const QCString &app ); + virtual ~kio_isoProtocol(); + + virtual void listDir( const KURL & url ); + virtual void stat( const KURL & url ); + virtual void get( const KURL & url ); + +protected: + void getFile( const KIsoFile *isoFileEntry, const QString &path ); + void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry ); + bool checkNewFile( QString fullPath, QString & path, int startsec ); + + KIso * m_isoFile; + time_t m_mtime; + int m_mode; +}; + +#endif diff --git a/iso/iso.protocol b/iso/iso.protocol new file mode 100644 index 0000000..0e7d71b --- /dev/null +++ b/iso/iso.protocol @@ -0,0 +1,11 @@ +[Protocol] +exec=kio_iso +protocol=iso +listing=Name,Type,Size,Date,AccessDate,CreationDate,Access,Owner,Group,Link +input=filesystem +output=filesystem +reading=true +source=true +Icon=cd +Description=A kioslave for ISO9660 filesystems +MimeType=application/x-iso diff --git a/iso/isoservice.desktop b/iso/isoservice.desktop new file mode 100644 index 0000000..0009370 --- /dev/null +++ b/iso/isoservice.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Encoding=UTF-8 +Actions=OpenISO +ServiceTypes=inode/blockdevice,application/x-iso + +[Desktop Action OpenISO] +Comment=ISO9660 View +Comment[hu]=ISO9660 Nézet +Comment[fr]=Lecteur ISO9660 +Icon=cd +Name=ISO9660 View +Name[hu]=ISO9660 Nézet +Name[fr]=Lecteur ISO9660 +Exec=kfmclient exec iso:%f diff --git a/iso/kio_isorc b/iso/kio_isorc new file mode 100644 index 0000000..3a87417 --- /dev/null +++ b/iso/kio_isorc @@ -0,0 +1,2 @@ +showhidden=false +showrr=true diff --git a/iso/kiso.cpp b/iso/kiso.cpp new file mode 100644 index 0000000..6bc4241 --- /dev/null +++ b/iso/kiso.cpp @@ -0,0 +1,459 @@ +/*************************************************************************** + kiso.cpp + ------------------- + begin : Oct 25 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 file is heavily based on ktar.cpp from kdelibs (c) David Faure */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "kiso.h" +#include "libisofs/isofs.h" +#include "qfilehack.h" + + +#ifdef __linux__ +#undef __STRICT_ANSI__ +#include +#define __STRICT_ANSI__ +#include +#include +#endif + +//////////////////////////////////////////////////////////////////////// +/////////////////////////// KIso /////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +/** + * puts the track layout of the device 'fname' into 'tracks' + * tracks structure: start sector, track number, ... + * tracks should be 100*2 entry long (this is the maximum in the CD-ROM standard) + * currently it's linux only, porters are welcome + */ +static int getTracks(const char *fname,int *tracks) { + int ret=0; + memset(tracks,0,200*sizeof(int)); + +#ifdef __linux__ + int fd,i; + struct cdrom_tochdr tochead; + struct cdrom_tocentry tocentry; + + kdDebug() << "getTracks open:" << fname << endl; + fd=open(fname, O_RDONLY | O_NONBLOCK); + if (fd > 0) { + if (ioctl(fd,CDROMREADTOCHDR,&tochead)!=-1) { + kdDebug() << "getTracks first track:" << tochead.cdth_trk0 + << " last track " << tochead.cdth_trk1 << endl; + for (i=tochead.cdth_trk0;i<=tochead.cdth_trk1;i++) { + if (ret>99) break; + memset(&tocentry,0,sizeof(struct cdrom_tocentry)); + tocentry.cdte_track=i; + tocentry.cdte_format=CDROM_LBA; + if (ioctl(fd,CDROMREADTOCENTRY,&tocentry)<0) break; + kdDebug() << "getTracks got track " << i << " starting at: " << + tocentry.cdte_addr.lba << endl; + if ((tocentry.cdte_ctrl & 0x4) == 0x4) { + tracks[ret<<1]=tocentry.cdte_addr.lba; + tracks[(ret<<1)+1]=i; + ret++; + } + } + } + close(fd); + } + +#endif + + return ret; +} + +class KIso::KIsoPrivate +{ +public: + KIsoPrivate() {} + QStringList dirList; +}; + +KIso::KIso( const QString& filename, const QString & _mimetype ) + : KArchive( 0L ) +{ + m_startsec = -1; + m_filename = filename; + d = new KIsoPrivate; + QString mimetype( _mimetype ); + bool forced = true; + if ( mimetype.isEmpty() ) + { + mimetype = KMimeType::findByFileContent( filename )->name(); + kdDebug() << "KIso::KIso mimetype=" << mimetype << endl; + + // Don't move to prepareDevice - the other constructor theoretically allows ANY filter + if ( mimetype == "application/x-tgz" || mimetype == "application/x-targz" || // the latter is deprecated but might still be around + mimetype == "application/x-webarchive" ) + // that's a gzipped tar file, so ask for gzip filter + mimetype = "application/x-gzip"; + else if ( mimetype == "application/x-tbz" ) // that's a bzipped2 tar file, so ask for bz2 filter + mimetype = "application/x-bzip2"; + else + { + // Something else. Check if it's not really gzip though (e.g. for KOffice docs) + QFile file( filename ); + if ( file.open( IO_ReadOnly ) ) + { + unsigned char firstByte = file.getch(); + unsigned char secondByte = file.getch(); + unsigned char thirdByte = file.getch(); + if ( firstByte == 0037 && secondByte == 0213 ) + mimetype = "application/x-gzip"; + else if ( firstByte == 'B' && secondByte == 'Z' && thirdByte == 'h' ) + mimetype = "application/x-bzip2"; + else if ( firstByte == 'P' && secondByte == 'K' && thirdByte == 3 ) + { + unsigned char fourthByte = file.getch(); + if ( fourthByte == 4 ) + mimetype = "application/x-zip"; + } + } + } + forced = false; + } + + prepareDevice( filename, mimetype, forced ); +} + +void KIso::prepareDevice( const QString & filename, + const QString & mimetype, bool forced ) +{ + /* 'hack' for Qt's false assumption that only S_ISREG is seekable */ + if( "inode/blockdevice" == mimetype ) + setDevice( new QFileHack( filename ) ); + else + { + if( "application/x-gzip" == mimetype + || "application/x-bzip2" == mimetype) + forced = true; + + QIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced ); + if( dev ) + setDevice( dev ); + } + +} + +KIso::KIso( QIODevice * dev ) + : KArchive( dev ) +{ + d = new KIsoPrivate; +} + +KIso::~KIso() +{ + // mjarrett: Closes to prevent ~KArchive from aborting w/o device + if( isOpened() ) + close(); + if ( !m_filename.isEmpty() ) + delete device(); // we created it ourselves + delete d; +} + +/* callback function for libisofs */ +static int readf(char *buf, int start, int len,void *udata) { + + QIODevice* dev = ( static_cast (udata) )->device(); + + if (dev->at(start<<11)) { + if ((dev->readBlock(buf, len<<11)) != -1) return (len); + } + kdDebug() << "KIso::ReadRequest failed start: " << start << " len: " << len << endl; + + return -1; +} + +/* callback function for libisofs */ +static int mycallb(struct iso_directory_record *idr,void *udata) { + + KIso *iso = static_cast (udata); + QString path,user,group,symlink; + int i; + int access; + int time,cdate,adate; + rr_entry rr; + bool special=false; + KArchiveEntry *entry=NULL,*oldentry=NULL; + char z_algo[2],z_params[2]; + int z_size=0; + + if ((idr->flags[0] & 1) && !iso->showhidden) return 0; + if (iso->level) { + if (isonum_711(idr->name_len)==1) { + switch (idr->name[0]) { + case 0: + path+=("."); + special=true; + break; + case 1: + path+=(".."); + special=true; + break; + } + } + if (iso->showrr && ParseRR(idr,&rr)>0) { + if (!special) path=rr.name; + symlink=rr.sl; + access=rr.mode; + time=rr.t_mtime; + adate=rr.t_atime; + cdate=rr.t_ctime; + user.setNum(rr.uid); + group.setNum(rr.gid); + z_algo[0]=rr.z_algo[0];z_algo[1]=rr.z_algo[1]; + z_params[0]=rr.z_params[0];z_params[1]=rr.z_params[1]; + z_size=rr.z_size; + } else { + access=iso->dirent->permissions() & ~S_IFMT; + adate=cdate=time=isodate_915(idr->date,0); + user=iso->dirent->user(); + group=iso->dirent->group(); + if (idr->flags[0] & 2) access |= S_IFDIR; else access |= S_IFREG; + if (!special) { + if (iso->joliet) { + for (i=0;i<(isonum_711(idr->name_len)-1);i+=2) { + QChar ch( be2me_16(*((ushort*)&(idr->name[i]))) ); + if (ch==';') break; + path+=ch; + } + } else { + for (i=0;iname_len);i++) { + if (idr->name[i]==';') break; + if (idr->name[i]) path+=(idr->name[i]); + } + } + if (path.endsWith(".")) path.setLength(path.length()-1); + } + } + if (iso->showrr) FreeRR(&rr); + if (idr->flags[0] & 2) { + entry = new KIsoDirectory( iso, path, access | S_IFDIR, time, adate, cdate, + user, group, symlink ); + } else { + entry = new KIsoFile( iso, path, access, time, adate, cdate, + user, group, symlink, isonum_733(idr->extent)<<11,isonum_733(idr->size) ); + if (z_size) (static_cast (entry))->setZF(z_algo,z_params,z_size); + + } + iso->dirent->addEntry(entry); + } + if ( (idr->flags[0] & 2) && (iso->level==0 || !special) ) { + if (iso->level) { + oldentry=iso->dirent; + iso->dirent=static_cast (entry); + } + iso->level++; + ProcessDir(&readf,isonum_733(idr->extent),isonum_733(idr->size),&mycallb,udata); + iso->level--; + if (iso->level) iso->dirent=static_cast (oldentry); + } + return 0; +} + +void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) { + + int i,size; + boot_head boot; + boot_entry *be; + QString path; + KIsoFile *entry; + + entry=new KIsoFile( this, "Catalog", dirent->permissions() & ~S_IFDIR, + dirent->date(), dirent->adate(), dirent->cdate(), + dirent->user(), dirent->group(), QString::null, + isonum_731(bootdesc->boot_catalog)<<11, 2048 ); + dirent->addEntry(entry); + if (!ReadBootTable(&readf,isonum_731(bootdesc->boot_catalog),&boot,this)) { + i=1; + be=boot.defentry; + while (be) { + size=BootImageSize( isonum_711(((struct default_entry*) be->data)->media), + isonum_721(((struct default_entry*) be->data)->seccount)); + path="Default Image"; + if (i>1) path += " (" + QString::number(i) + ")"; + entry=new KIsoFile( this, path, dirent->permissions() & ~S_IFDIR, + dirent->date(), dirent->adate(), dirent->cdate(), + dirent->user(), dirent->group(), QString::null, + isonum_731(((struct default_entry*) be->data)->start)<<11, size<<9 ); + dirent->addEntry(entry); + be=be->next; + i++; + } + + FreeBootTable(&boot); + } +} + +void KIso::readParams() +{ + KConfig *config; + + config = new KConfig("kio_isorc"); + + showhidden=config->readBoolEntry("showhidden",false); + showrr=config->readBoolEntry("showrr",true); + delete config; +} + +bool KIso::openArchive( int mode ) +{ + iso_vol_desc *desc; + QString path,tmp,uid,gid; + struct stat buf; + int tracks[2*100],trackno=0,i,access,c_b,c_i,c_j; + KArchiveDirectory *root; + struct iso_directory_record* idr; + struct el_torito_boot_descriptor* bootdesc; + + if ( mode == IO_WriteOnly ) + return false; + + readParams(); + d->dirList.clear(); + + tracks[0]=0; + if (m_startsec>0) tracks[0]=m_startsec; + kdDebug() << " m_startsec: " << m_startsec << endl; + /* We'll use the permission and user/group of the 'host' file except + * in Rock Ridge, where the permissions are stored on the file system + */ + if (::stat( m_filename.local8Bit(), &buf )<0) { + /* defaults, if stat fails */ + memset(&buf,0,sizeof(struct stat)); + buf.st_mode=0777; + } else { + /* If it's a block device, try to query the track layout (for multisession) */ + if (m_startsec == -1 && S_ISBLK(buf.st_mode)) + trackno=getTracks(m_filename.latin1(),(int*) &tracks); + } + uid.setNum(buf.st_uid); + gid.setNum(buf.st_gid); + access = buf.st_mode & ~S_IFMT; + + kdDebug() << "KIso::openArchive number of tracks: " << trackno << endl; + + if (trackno==0) trackno=1; + for (i=0;i1) { + path=QString::null; + QTextOStream(&path) << "Track " << tracks[(i<<1)+1]; + root = new KIsoDirectory( this, path, access | S_IFDIR, + buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null ); + rootDir()->addEntry(root); + } + + desc=ReadISO9660(&readf,tracks[i<<1],this); + if (!desc) { + kdDebug() << "KIso::openArchive no volume descriptors" << endl; + continue; + } + + while (desc) { + switch (isonum_711(desc->data.type)) { + case ISO_VD_BOOT: + + bootdesc=(struct el_torito_boot_descriptor*) &(desc->data); + if ( !memcmp(EL_TORITO_ID,bootdesc->system_id,ISODCL(8,39)) ) { + path="El Torito Boot"; + if (c_b>1) path += " (" + QString::number(c_b) + ")"; + + dirent = new KIsoDirectory( this, path, access | S_IFDIR, + buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null ); + root->addEntry(dirent); + + addBoot(bootdesc); + c_b++; + } + break; + + case ISO_VD_PRIMARY: + case ISO_VD_SUPPLEMENTARY: + idr=(struct iso_directory_record*) &( ((struct iso_primary_descriptor*) &desc->data)->root_directory_record); + joliet = JolietLevel(&desc->data); + if (joliet) { + QTextOStream(&path) << "Joliet level " << joliet; + if (c_j>1) path += " (" + QString::number(c_j) + ")"; + } else { + path = "ISO9660"; + if (c_i>1) path += " (" + QString::number(c_i) + ")"; + } + dirent = new KIsoDirectory( this, path, access | S_IFDIR, + buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null ); + root->addEntry(dirent); + level=0; + mycallb(idr, this ); + if (joliet) c_j++; else c_i++; + break; + } + desc=desc->next; + } + free(desc); + } + device()->close(); + return true; +} + +bool KIso::closeArchive() +{ + d->dirList.clear(); + return true; +} + +bool KIso::writeDir( const QString&, const QString&, const QString& ) +{ + return false; +} + +bool KIso::prepareWriting( const QString&, const QString&, const QString&, uint) +{ + return false; +} + +bool KIso::doneWriting( uint ) +{ + return false; +} + +void KIso::virtual_hook( int id, void* data ) +{ KArchive::virtual_hook( id, data ); } + diff --git a/iso/kiso.h b/iso/kiso.h new file mode 100644 index 0000000..ceddb4a --- /dev/null +++ b/iso/kiso.h @@ -0,0 +1,112 @@ +/*************************************************************************** + kiso.h + ------------------- + begin : Oct 25 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 file is heavily based on ktar.h from kdelibs + * (c) Torben Weis , David Faure + */ + +#ifndef KISO_H +#define KISO_H + +#include +#include + +#include +#include +#include +#include + +#include "kisofile.h" +#include "kisodirectory.h" + +/** + * @short A class for reading (optionnally compressed) iso9660 files. + * @author Gy�gy Szombathelyi , + * Torben Weis , David Faure + */ +class KIso : public KArchive +{ +public: + /** + * Creates an instance that operates on the given filename. + * using the compression filter associated to given mimetype. + * + * @param filename is a local path (e.g. "/home/weis/myfile.tgz") + * @param mimetype "application/x-gzip" or "application/x-bzip2" + * Do not use application/x-tgz or so. Only the compression layer ! + * If the mimetype is ommitted, it will be determined from the filename. + */ + KIso( const QString& filename, const QString & mimetype = QString::null ); + + /** + * Creates an instance that operates on the given device. + * The device can be compressed (KFilterDev) or not (QFile, etc.). + * WARNING: don't assume that giving a QFile here will decompress the file, + * in case it's compressed! + */ + KIso( QIODevice * dev ); + + /** + * If the .iso is still opened, then it will be + * closed automatically by the destructor. + */ + virtual ~KIso(); + + /** + * The name of the os file, as passed to the constructor + * Null if you used the QIODevice constructor. + */ + QString fileName() { return m_filename; } + + bool writeDir( const QString& , const QString& , const QString& ); + bool prepareWriting( const QString& , const QString& , const QString& , uint ); + bool doneWriting( uint ); + + void setStartSec(int startsec) { m_startsec = startsec; } + int startSec() { return m_startsec; } + + bool showhidden,showrr; + int level,joliet; + KIsoDirectory *dirent; +protected: + /** + * Opens the archive for reading. + * Parses the directory listing of the archive + * and creates the KArchiveDirectory/KArchiveFile entries. + * + */ + void readParams(); + virtual bool openArchive( int mode ); + virtual bool closeArchive(); + +private: + /** + * @internal + */ + void addBoot(struct el_torito_boot_descriptor* bootdesc); + void prepareDevice( const QString & filename, const QString & mimetype, bool forced = false ); + int m_startsec; + + QString m_filename; +protected: + virtual void virtual_hook( int id, void* data ); +private: + class KIsoPrivate; + KIsoPrivate * d; +}; + +#endif diff --git a/iso/kisodirectory.cpp b/iso/kisodirectory.cpp new file mode 100644 index 0000000..f354383 --- /dev/null +++ b/iso/kisodirectory.cpp @@ -0,0 +1,31 @@ +/*************************************************************************** + kisodirectory.cpp - description + ------------------- + begin : Wed Oct 30 2002 + copyright : (C) 2002 by Szombathelyi Gyrgy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "kisodirectory.h" + +KIsoDirectory::KIsoDirectory( KArchive* archive, const QString& name, int access, + int date, int adate, int cdate, const QString& user, const QString& group, + const QString& symlink) : + KArchiveDirectory(archive, name, access, date, user, group, symlink) { + + + m_adate=adate; + m_cdate=cdate; +} + +KIsoDirectory::~KIsoDirectory(){ +} diff --git a/iso/kisodirectory.h b/iso/kisodirectory.h new file mode 100644 index 0000000..0b59719 --- /dev/null +++ b/iso/kisodirectory.h @@ -0,0 +1,40 @@ +/*************************************************************************** + kisodirectory.h - description + ------------------- + begin : Wed Oct 30 2002 + copyright : (C) 2002 by Szombathelyi Gyrgy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef KISODIRECTORY_H +#define KISODIRECTORY_H + +#include +#include + +/** + *@author Szombathelyi Gyrgy + */ + +class KIsoDirectory : public KArchiveDirectory { +public: + KIsoDirectory( KArchive* archive, const QString& name, int access, int date, + int adate,int cdate, const QString& user, const QString& group, + const QString& symlink); + ~KIsoDirectory(); + int adate() const { return m_adate; } + int cdate() const { return m_cdate; } +private: + int m_adate, m_cdate; +}; + +#endif diff --git a/iso/kisofile.cpp b/iso/kisofile.cpp new file mode 100644 index 0000000..1d23b9c --- /dev/null +++ b/iso/kisofile.cpp @@ -0,0 +1,53 @@ +/*************************************************************************** + kisofile.cpp - description + ------------------- + begin : Wed Oct 30 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "kisofile.h" +#include + +KIsoFile::KIsoFile( KArchive* archive, const QString& name, int access, + int date, int adate,int cdate, const QString& user, const QString& group, + const QString& symlink,int pos, int size) : + KArchiveFile(archive, name, access, date, user, group, symlink, pos, size) { + + + m_adate=adate; + m_cdate=cdate; + m_algo[0]=0;m_algo[1]=0;m_parms[0]=0;m_parms[1]=0;m_realsize=0; +} + +KIsoFile::~KIsoFile(){ +} + +void KIsoFile::setZF(char algo[2],char parms[2],int realsize) { + m_algo[0]=algo[0];m_algo[1]=algo[1]; + m_parms[0]=parms[0];m_parms[1]=parms[1]; + m_realsize=realsize; +} + +QByteArray KIsoFile::data(long long pos, int count) const { + QByteArray r; + int rlen; + + if ( archive()->device()->at(position()+pos) && + r.resize( ((pos+count) < size()) ? count : size()-pos) ) { + rlen=archive()->device()->readBlock( r.data(), r.size() ); + if (rlen ==- 1) r.resize(0); + else if (rlen != (int)r.size()) r.resize(rlen); + } + + return r; +} diff --git a/iso/kisofile.h b/iso/kisofile.h new file mode 100644 index 0000000..a30fc75 --- /dev/null +++ b/iso/kisofile.h @@ -0,0 +1,49 @@ +/*************************************************************************** + kisofile.h - description + ------------------- + begin : Wed Oct 30 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef KISOFILE_H +#define KISOFILE_H + +#include +#include + +/** + *@author Szombathelyi Gy�gy + */ + +class KIsoFile : public KArchiveFile { +public: + KIsoFile( KArchive* archive, const QString& name, int access, int date, + int adate,int cdate, const QString& user, const QString& group, + const QString& symlink, int pos, int size); + ~KIsoFile(); + void setZF(char algo[2],char parms[2],int realsize); + int adate() const { return m_adate; } + int cdate() const { return m_cdate; } + long long realsize() const { return m_realsize; } + + virtual QByteArray data(long long pos, int count) const; +private: + /* hide this member function, it's broken by design, because the full + data often requires too much memory */ + char m_algo[2],m_parms[2]; + long long m_realsize; + int m_adate, m_cdate; + long long m_curpos; +}; + +#endif diff --git a/iso/libisofs/COPYING b/iso/libisofs/COPYING new file mode 100644 index 0000000..c7aea18 --- /dev/null +++ b/iso/libisofs/COPYING @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/iso/libisofs/ChangeLog b/iso/libisofs/ChangeLog new file mode 100644 index 0000000..fb46b80 --- /dev/null +++ b/iso/libisofs/ChangeLog @@ -0,0 +1,6 @@ +0.1 -> 0.2 + +- Critical directory parsing bug fixed +- Call backs only if some sanity checks on the directory entry succeeds + (length checks to avoid buffer overrun if received corrupt data) +- Preliminary El Torito boot specification support (No multiple boot entries yet) diff --git a/iso/libisofs/Makefile.am b/iso/libisofs/Makefile.am new file mode 100644 index 0000000..a1278ff --- /dev/null +++ b/iso/libisofs/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libisofs.la + + +INCLUDES = $(all_includes) + + +#LDFLAGS = + +libisofs_la_METASOURCES=AUTO + +libisofs_la_SOURCES = isofs.c +#libisofs_la_LIBADD = $(LIB_KIO) + +#libisofs_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) + + + +noinst_HEADERS = bswap.h el_torito.h iso_fs.h isofs.h rock.h diff --git a/iso/libisofs/README b/iso/libisofs/README new file mode 100644 index 0000000..45d3bff --- /dev/null +++ b/iso/libisofs/README @@ -0,0 +1,24 @@ +This is the 0.2 release of libisofs. For changes, see the ChangeLog. + +Libisofs implements the reading of the famous ISO-9660 (ECMA-119) file system, +found on CD-ROM media. It also supports the Rock Ridge Interchange Protocol and +Microsoft Joliet extensions. It allows user-mode programs to query the +filesystem volume descriptors and traverse through the directory structure. +Preliminary support for El-Torito boot CDs are added in version 0.2. + +To use it in your project, I recommend to copy bswap.h, isofs.h, iso_fs.h, +el_torito.h rock.h and isofs.c to your sources, and include isofs.h in the +appropriate places. + +Currently only the directory tables are parsed, the path tables are not. +(The path tables contain redundant information.) + +Also a sample program can be compiled with the supplied Makefile. Simply +execute 'make', it should create the executable file isofs. + +On big-endian systems, you need to define WORDS_BIGENDIAN (either in the +compiler command-line, or if you defined HAVE_CONFIG_H, in config.h) + + +Gyrgy Szombathelyi +http://libcdrom.sourceforge.net/libisofs.html diff --git a/iso/libisofs/bswap.h b/iso/libisofs/bswap.h new file mode 100644 index 0000000..95520c6 --- /dev/null +++ b/iso/libisofs/bswap.h @@ -0,0 +1,94 @@ +/* From the mplayer project (www.mplayerhq.hu) */ + +#ifndef __BSWAP_H__ +#define __BSWAP_H__ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_BYTESWAP_H +#include +#else + +#ifdef ARCH_X86 +inline static unsigned short ByteSwap16(unsigned short x) +{ + __asm("xchgb %b0,%h0" : + "=q" (x) : + "0" (x)); + return x; +} +#define bswap_16(x) ByteSwap16(x) + +inline static unsigned int ByteSwap32(unsigned int x) +{ +#if __CPU__ > 386 + __asm("bswap %0": + "=r" (x) : +#else + __asm("xchgb %b0,%h0\n" + " rorl $16,%0\n" + " xchgb %b0,%h0": + "=q" (x) : +#endif + "0" (x)); + return x; +} +#define bswap_32(x) ByteSwap32(x) + +inline static unsigned long long int ByteSwap64(unsigned long long int x) +{ + register union { __extension__ unsigned long long int __ll; + unsigned int __l[2]; } __x; + asm("xchgl %0,%1": + "=r"(__x.__l[0]),"=r"(__x.__l[1]): + "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32)))); + return __x.__ll; +} +#define bswap_64(x) ByteSwap64(x) + +#else + +#define bswap_16(x) (((x) & 0x00ff) << 8 | ((x) & 0xff00) >> 8) + + +/* code from bits/byteswap.h (C) 1997, 1998 Free Software Foundation, Inc. */ +#define bswap_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + +#define bswap_64(x) \ + (__extension__ \ + ({ union { __extension__ unsigned long long int __ll; \ + unsigned int __l[2]; } __w, __r; \ + __w.__ll = (x); \ + __r.__l[0] = bswap_32 (__w.__l[1]); \ + __r.__l[1] = bswap_32 (__w.__l[0]); \ + __r.__ll; })) +#endif /* !ARCH_X86 */ + +#endif /* !HAVE_BYTESWAP_H */ + +/* + be2me ... BigEndian to MachineEndian + le2me ... LittleEndian to MachineEndian +*/ + +#ifdef WORDS_BIGENDIAN +#define be2me_16(x) (x) +#define be2me_32(x) (x) +#define be2me_64(x) (x) +#define le2me_16(x) bswap_16(x) +#define le2me_32(x) bswap_32(x) +#define le2me_64(x) bswap_64(x) +#else +#define be2me_16(x) bswap_16(x) +#define be2me_32(x) bswap_32(x) +#define be2me_64(x) bswap_64(x) +#define le2me_16(x) (x) +#define le2me_32(x) (x) +#define le2me_64(x) (x) +#endif + +#endif diff --git a/iso/libisofs/el_torito.h b/iso/libisofs/el_torito.h new file mode 100644 index 0000000..cba83f7 --- /dev/null +++ b/iso/libisofs/el_torito.h @@ -0,0 +1,63 @@ +#ifndef ELTORITO_H +#define ELTORITO_H 1 + +#include "iso_fs.h" + +#define EL_TORITO_ID "EL TORITO SPECIFICATION\0\0\0\0\0\0\0\0\0" + +struct el_torito_boot_descriptor { + char type [ISODCL ( 1, 1)]; /* 711 */ + char id [ISODCL ( 2, 6)]; + char version [ISODCL ( 7, 7)]; /* 711 */ + char system_id [ISODCL ( 8, 39)]; /* achars */ + char unused [ISODCL ( 40, 71)]; + char boot_catalog [ISODCL ( 72, 75)]; /* 731 */ +}; + +struct validation_entry { + char type [ISODCL ( 1, 1)]; /* 1 */ + char platform [ISODCL ( 2, 2)]; + char unused [ISODCL ( 3, 4)]; + char id [ISODCL ( 5, 28)]; + char cheksum [ISODCL ( 29, 30)]; + char key [ISODCL ( 31, 31)]; /* 0x55 */ + char key2 [ISODCL ( 32, 32)]; /* 0xaa */ +}; + +struct default_entry { + char bootid [ISODCL ( 1, 1)]; + char media [ISODCL ( 2, 2)]; + char loadseg [ISODCL ( 3, 4)]; + char systype [ISODCL ( 5, 5)]; + char unused [ISODCL ( 6, 6)]; + char seccount [ISODCL ( 7, 8)]; + char start [ISODCL ( 9, 12)]; + char unused2 [ISODCL ( 13, 32)]; +}; + +struct section_header { + char headerid [ISODCL ( 1, 1)]; + char platform [ISODCL ( 2, 2)]; + char entries [ISODCL ( 3, 4)]; + char id [ISODCL ( 5, 32)]; +}; + +struct section_entry { + char bootid [ISODCL ( 1, 1)]; + char media [ISODCL ( 2, 2)]; + char loadseg [ISODCL ( 3, 4)]; + char systype [ISODCL ( 5, 5)]; + char unused [ISODCL ( 6, 6)]; + char seccount [ISODCL ( 7, 8)]; + char start [ISODCL ( 9, 12)]; + char selcrit [ISODCL ( 13, 13)]; + char vendor_selcrit [ISODCL ( 14, 32)]; +}; + +struct section_entry_ext { + char extid [ISODCL ( 1, 1)]; + char extrec [ISODCL ( 2, 2)]; + char vendor_selcrit [ISODCL ( 3, 32)]; +}; + +#endif diff --git a/iso/libisofs/iso_fs.h b/iso/libisofs/iso_fs.h new file mode 100644 index 0000000..43353b0 --- /dev/null +++ b/iso/libisofs/iso_fs.h @@ -0,0 +1,219 @@ +/* From the linux kernel */ + +#ifndef _ISO_FS_H +#define _ISO_FS_H 1 + +#include "bswap.h" + +/* + * The isofs filesystem constants/structures + */ + +/* This part borrowed from the bsd386 isofs */ +#define ISODCL(from, to) (to - from + 1) + +struct iso_volume_descriptor { + char type[ISODCL(1,1)]; /* 711 */ + char id[ISODCL(2,6)]; + char version[ISODCL(7,7)]; + char data[ISODCL(8,2048)]; +}; + +/* volume descriptor types */ +#define ISO_VD_BOOT 0 +#define ISO_VD_PRIMARY 1 +#define ISO_VD_SUPPLEMENTARY 2 +#define ISO_VD_END 255 + +#define ISO_STANDARD_ID "CD001" + +struct iso_primary_descriptor { + char type [ISODCL ( 1, 1)]; /* 711 */ + char id [ISODCL ( 2, 6)]; + char version [ISODCL ( 7, 7)]; /* 711 */ + char unused1 [ISODCL ( 8, 8)]; + char system_id [ISODCL ( 9, 40)]; /* achars */ + char volume_id [ISODCL ( 41, 72)]; /* dchars */ + char unused2 [ISODCL ( 73, 80)]; + char volume_space_size [ISODCL ( 81, 88)]; /* 733 */ + char unused3 [ISODCL ( 89, 120)]; + char volume_set_size [ISODCL (121, 124)]; /* 723 */ + char volume_sequence_number [ISODCL (125, 128)]; /* 723 */ + char logical_block_size [ISODCL (129, 132)]; /* 723 */ + char path_table_size [ISODCL (133, 140)]; /* 733 */ + char type_l_path_table [ISODCL (141, 144)]; /* 731 */ + char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */ + char type_m_path_table [ISODCL (149, 152)]; /* 732 */ + char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */ + char root_directory_record [ISODCL (157, 190)]; /* 9.1 */ + char volume_set_id [ISODCL (191, 318)]; /* dchars */ + char publisher_id [ISODCL (319, 446)]; /* achars */ + char preparer_id [ISODCL (447, 574)]; /* achars */ + char application_id [ISODCL (575, 702)]; /* achars */ + char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */ + char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */ + char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */ + char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */ + char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */ + char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */ + char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */ + char file_structure_version [ISODCL (882, 882)]; /* 711 */ + char unused4 [ISODCL (883, 883)]; + char application_data [ISODCL (884, 1395)]; + char unused5 [ISODCL (1396, 2048)]; +}; + +/* Almost the same as the primary descriptor but two fields are specified */ +struct iso_supplementary_descriptor { + char type [ISODCL ( 1, 1)]; /* 711 */ + char id [ISODCL ( 2, 6)]; + char version [ISODCL ( 7, 7)]; /* 711 */ + char flags [ISODCL ( 8, 8)]; /* 853 */ + char system_id [ISODCL ( 9, 40)]; /* achars */ + char volume_id [ISODCL ( 41, 72)]; /* dchars */ + char unused2 [ISODCL ( 73, 80)]; + char volume_space_size [ISODCL ( 81, 88)]; /* 733 */ + char escape [ISODCL ( 89, 120)]; /* 856 */ + char volume_set_size [ISODCL (121, 124)]; /* 723 */ + char volume_sequence_number [ISODCL (125, 128)]; /* 723 */ + char logical_block_size [ISODCL (129, 132)]; /* 723 */ + char path_table_size [ISODCL (133, 140)]; /* 733 */ + char type_l_path_table [ISODCL (141, 144)]; /* 731 */ + char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */ + char type_m_path_table [ISODCL (149, 152)]; /* 732 */ + char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */ + char root_directory_record [ISODCL (157, 190)]; /* 9.1 */ + char volume_set_id [ISODCL (191, 318)]; /* dchars */ + char publisher_id [ISODCL (319, 446)]; /* achars */ + char preparer_id [ISODCL (447, 574)]; /* achars */ + char application_id [ISODCL (575, 702)]; /* achars */ + char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */ + char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */ + char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */ + char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */ + char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */ + char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */ + char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */ + char file_structure_version [ISODCL (882, 882)]; /* 711 */ + char unused4 [ISODCL (883, 883)]; + char application_data [ISODCL (884, 1395)]; + char unused5 [ISODCL (1396, 2048)]; +}; + +#define HS_STANDARD_ID "CDROM" + +struct hs_volume_descriptor { + char foo [ISODCL ( 1, 8)]; /* 733 */ + char type [ISODCL ( 9, 9)]; /* 711 */ + char id [ISODCL ( 10, 14)]; + char version [ISODCL ( 15, 15)]; /* 711 */ + char data[ISODCL(16,2048)]; +}; + + +struct hs_primary_descriptor { + char foo [ISODCL ( 1, 8)]; /* 733 */ + char type [ISODCL ( 9, 9)]; /* 711 */ + char id [ISODCL ( 10, 14)]; + char version [ISODCL ( 15, 15)]; /* 711 */ + char unused1 [ISODCL ( 16, 16)]; /* 711 */ + char system_id [ISODCL ( 17, 48)]; /* achars */ + char volume_id [ISODCL ( 49, 80)]; /* dchars */ + char unused2 [ISODCL ( 81, 88)]; /* 733 */ + char volume_space_size [ISODCL ( 89, 96)]; /* 733 */ + char unused3 [ISODCL ( 97, 128)]; /* 733 */ + char volume_set_size [ISODCL (129, 132)]; /* 723 */ + char volume_sequence_number [ISODCL (133, 136)]; /* 723 */ + char logical_block_size [ISODCL (137, 140)]; /* 723 */ + char path_table_size [ISODCL (141, 148)]; /* 733 */ + char type_l_path_table [ISODCL (149, 152)]; /* 731 */ + char unused4 [ISODCL (153, 180)]; /* 733 */ + char root_directory_record [ISODCL (181, 214)]; /* 9.1 */ +}; + +/* We use this to help us look up the parent inode numbers. */ + +struct iso_path_table{ + char name_len[1]; /* 711 */ + char ext_attr_length[1]; /* 711 */ + char extent[4]; /* 731 */ + char parent[2]; /* 721 */ + char name[1]; +}; + +/* high sierra is identical to iso, except that the date is only 6 bytes, and + there is an extra reserved byte after the flags */ + +struct iso_directory_record { + char length [ISODCL (1, 1)]; /* 711 */ + char ext_attr_length [ISODCL (2, 2)]; /* 711 */ + char extent [ISODCL (3, 10)]; /* 733 */ + char size [ISODCL (11, 18)]; /* 733 */ + char date [ISODCL (19, 25)]; /* 7 by 711 */ + char flags [ISODCL (26, 26)]; + char file_unit_size [ISODCL (27, 27)]; /* 711 */ + char interleave [ISODCL (28, 28)]; /* 711 */ + char volume_sequence_number [ISODCL (29, 32)]; /* 723 */ + char name_len [ISODCL (33, 33)]; /* 711 */ + char name [1]; +}; + +/* 8 bit numbers */ +__inline unsigned char isonum_711(char *p); +__inline char isonum_712(char *p); + +/* 16 bit numbers */ +__inline unsigned short isonum_721(char *p); +__inline unsigned short isonum_722(char *p); +__inline unsigned short isonum_723(char *p); + +/* 32 bit numbers */ +__inline unsigned int isonum_731(char *p); +__inline unsigned int isonum_732(char *p); +__inline unsigned int isonum_733(char *p); + + +/* 8 bit numbers */ +__inline unsigned char isonum_711(char *p) +{ + return *(unsigned char *)p; +} +__inline char isonum_712(char *p) +{ + return *p; +} + +/* 16 bit numbers */ +__inline unsigned short isonum_721(char *p) +{ + return le2me_16(*(unsigned short *)p); +} +__inline unsigned short isonum_722(char *p) +{ + return be2me_16(*(unsigned short *)p); +} +__inline unsigned short isonum_723(char *p) +{ + /* Ignore bigendian datum due to broken mastering programs */ + return le2me_16(*(unsigned short *)p); +} + +/* 32 bit numbers */ +__inline unsigned int isonum_731(char *p) +{ + return le2me_32(*(unsigned int *)p); +} + +__inline unsigned int isonum_732(char *p) +{ + return be2me_32(*(unsigned int *)p); +} + +__inline unsigned int isonum_733(char *p) +{ + /* Ignore bigendian datum due to broken mastering programs */ + return le2me_32(*(unsigned int *)p); +} + +#endif /*_ISOFS_H*/ + diff --git a/iso/libisofs/isofs.c b/iso/libisofs/isofs.c new file mode 100644 index 0000000..ab13d9e --- /dev/null +++ b/iso/libisofs/isofs.c @@ -0,0 +1,876 @@ +/*************************************************************************** + isofs.c - libisofs + implementation + ------------------- + begin : Oct 25 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include + +#include "isofs.h" + +/**************************************************************/ + + +/* internal function from the linux kernel (isofs fs) */ +static time_t getisotime(int year,int month,int day,int hour, + int minute,int second,int tz) { + + int days, i; + time_t crtime; + + year-=1970; + + if (year < 0) { + crtime = 0; + } else { + int monlen[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; + + days = year * 365; + if (year > 2) + days += (year+1) / 4; + for (i = 1; i < month; i++) + days += monlen[i-1]; + if (((year+2) % 4) == 0 && month > 2) + days++; + days += day - 1; + crtime = ((((days * 24) + hour) * 60 + minute) * 60) + + second; + + /* sign extend */ + if (tz & 0x80) + tz |= (-1 << 8); + + /* + * The timezone offset is unreliable on some disks, + * so we make a sanity check. In no case is it ever + * more than 13 hours from GMT, which is 52*15min. + * The time is always stored in localtime with the + * timezone offset being what get added to GMT to + * get to localtime. Thus we need to subtract the offset + * to get to true GMT, which is what we store the time + * as internally. On the local system, the user may set + * their timezone any way they wish, of course, so GMT + * gets converted back to localtime on the receiving + * system. + * + * NOTE: mkisofs in versions prior to mkisofs-1.10 had + * the sign wrong on the timezone offset. This has now + * been corrected there too, but if you are getting screwy + * results this may be the explanation. If enough people + * complain, a user configuration option could be added + * to add the timezone offset in with the wrong sign + * for 'compatibility' with older discs, but I cannot see how + * it will matter that much. + * + * Thanks to kuhlmav@elec.canterbury.ac.nz (Volker Kuhlmann) + * for pointing out the sign error. + */ + if (-52 <= tz && tz <= 52) + crtime -= tz * 15 * 60; + } + return crtime; + +} + +/** + * Returns the Unix from the ISO9660 9.1.5 time format + */ +time_t isodate_915(char * p, int hs) { + + return getisotime(1900+p[0],p[1],p[2],p[3],p[4],p[5],hs==0 ? p[6] : 0); +} + +/** + * Returns the Unix from the ISO9660 8.4.26.1 time format + * BUG: hundredth of seconds are ignored, because Unix time_t has one second + * resolution (I think it's no problem at all) + */ +time_t isodate_84261(char * p, int hs) { + int year,month,day,hour,minute,second; + year=(p[0]-'0')*1000 + (p[1]-'0')*100 + (p[2]-'0')*10 + p[3]-'0'; + month=(p[4]-'0')*10 + (p[5]-'0'); + day=(p[6]-'0')*10 + (p[7]-'0'); + hour=(p[8]-'0')*10 + (p[9]-'0'); + minute=(p[10]-'0')*10 + (p[11]-'0'); + second=(p[12]-'0')*10 + (p[13]-'0'); + return getisotime(year,month,day,hour,minute,second,hs==0 ? p[16] : 0); +} + +void FreeBootTable(boot_head *boot) { + boot_entry *be,*next; + + be=boot->defentry; + while (be) { + next=be->next; + free(be); + be=next; + } + boot->defentry=NULL; +} + +int BootImageSize(int media,int len) { + int ret; + + switch(media & 0xf) { + case 0: + ret=len; /* No emulation */ + break; + case 1: + ret=80*2*15; /* 1.2 MB */ + break; + case 2: + ret=80*2*18; /* 1.44 MB */ + break; + case 3: + ret=80*2*36; /* 2.88 MB */ + break; + case 4: + /* FIXME!!! */ + ret=len; /* Hard Disk */ + break; + default: + ret=len; + } + return ret; +} + +static boot_entry *CreateBootEntry(char *be) { + boot_entry *entry; + + entry = (boot_entry*) malloc(sizeof(boot_entry)); + if (!entry) return NULL; + memset(entry, 0, sizeof(boot_entry)); + memcpy(entry->data,be,0x20); + return entry; +} + +int ReadBootTable(readfunc *read,int sector, boot_head *head, void *udata) { + + char buf[2048], *c, *be; + int i,end=0; + unsigned short sum; + boot_entry *defcur=NULL,*deflast=NULL; + register struct validation_entry *ventry=NULL; + + head->sections=NULL; + head->defentry=NULL; + while (1) { + be = (char*) &buf; + if ( read(be, sector, 1, udata) != 1 ) goto err; + + /* first entry needs to be a validation entry */ + if (!ventry) { + ventry=(struct validation_entry *) be; + if ( isonum_711(ventry->type) !=1 ) goto err; + sum=0; + c = (char*) ventry; + for (i=0;i<16;i++) { sum += isonum_721(c); c+=2; } + if (sum) goto err; + memcpy(&head->ventry,be,0x20); + be += 0x20; + } + + while (!end && (be < (char *)(&buf+1))) { + switch (isonum_711(be)) { + case 0x88: + defcur=CreateBootEntry(be); + if (!defcur) goto err; + if (deflast) + deflast->next=defcur; + else + head->defentry=defcur; + defcur->prev=deflast; + deflast=defcur; + break; + case 0x90: + case 0x91: + break; + default: + end=1; + break; + } + be += 0x20; + } + if (end) break; + + sector ++; + } + + return 0; + +err: + FreeBootTable(head); + return -1; +} + + +/** + * Creates the linked list of the volume descriptors + */ +iso_vol_desc *ReadISO9660(readfunc *read,int sector,void *udata) { + + int i; + struct iso_volume_descriptor buf; + iso_vol_desc *first=NULL,*current=NULL,*prev=NULL; + + for (i=0;i<100;i++) { + if (read( (char*) &buf, sector+i+16, 1, udata) != 1 ) { + FreeISO9660(first); + return NULL; + } + if (!memcmp(ISO_STANDARD_ID,&buf.id,5)) { + switch ( isonum_711(&buf.type[0]) ) { + + case ISO_VD_BOOT: + case ISO_VD_PRIMARY: + case ISO_VD_SUPPLEMENTARY: + current=(iso_vol_desc*) malloc(sizeof(iso_vol_desc)); + if (!current) { + FreeISO9660(first); + return NULL; + } + current->prev=prev; + current->next=NULL; + if (prev) prev->next=current; + memcpy(&(current->data),&buf,2048); + if (!first) first=current; + prev=current; + break; + + case ISO_VD_END: + return first; + break; + } + } else if (!memcmp(HS_STANDARD_ID,(struct hs_volume_descriptor*) &buf,5)) { + /* High Sierra format not supported (yet) */ + } + } + + return first; +} + +/** + * Frees the linked list of volume descriptors + */ +void FreeISO9660(iso_vol_desc *data) { + + iso_vol_desc *current; + + + while (data) { + current=data; + data=current->next; + free(current); + } +} + +/** + * Frees the strings in 'rrentry' + */ +void FreeRR(rr_entry *rrentry) { + if (rrentry->name) { + free(rrentry->name); + rrentry->name=NULL; + } + if (rrentry->sl) { + free(rrentry->sl); + rrentry->name=NULL; + } +} + +static int str_nappend(char **d,char *s,int n) { + int i=0; + char *c; + +/* i=strnlen(s,n)+1; */ + while (iname_len); + if (!(isonum_711(idr->name_len) & 1)) suspoffs++; + susplen=isonum_711(idr->length)-suspoffs; + r= & (((char*) idr)[suspoffs]); + rr = (struct rock_ridge*) r; + + memset(rrentry,0,sizeof(rr_entry)); + rrentry->len = sizeof(rr_entry); + + while (susplen > 0) { + if (isonum_711(&rr->len) > susplen || rr->len == 0) break; + if (rr->signature[0]=='N' && rr->signature[1]=='M') { + if (!(rr->u.NM.flags & 0x26) && rr->len>5 && !rrentry->name) { + + if (str_nappend(&rrentry->name,rr->u.NM.name,isonum_711(&rr->len)-5)) { + FreeRR(rrentry); return -ENOMEM; + } + ret++; + } + } else if (rr->signature[0]=='P' && rr->signature[1]=='X' && + (isonum_711(&rr->len)==44 || isonum_711(&rr->len)==36)) { + rrentry->mode=isonum_733(rr->u.PX.mode); + rrentry->nlink=isonum_733(rr->u.PX.n_links); + rrentry->uid=isonum_733(rr->u.PX.uid); + rrentry->gid=isonum_733(rr->u.PX.gid); + if (isonum_711(&rr->len)==44) rrentry->serno=isonum_733(rr->u.PX.serno); + ret++; + } else if (rr->signature[0]=='P' && rr->signature[1]=='N' && + isonum_711(&rr->len)==20) { + rrentry->dev_major=isonum_733(rr->u.PN.dev_high); + rrentry->dev_minor=isonum_733(rr->u.PN.dev_low); + ret++; + } else if (rr->signature[0]=='P' && rr->signature[1]=='L' && + isonum_711(&rr->len)==12) { + rrentry->pl=isonum_733(rr->u.PL.location); + ret++; + } else if (rr->signature[0]=='C' && rr->signature[1]=='L' && + isonum_711(&rr->len)==12) { + rrentry->cl=isonum_733(rr->u.CL.location); + ret++; + } else if (rr->signature[0]=='R' && rr->signature[1]=='E' && + isonum_711(&rr->len)==4) { + rrentry->re=1; + ret++; + } else if (rr->signature[0]=='S' && rr->signature[1]=='L' && + isonum_711(&rr->len)>7) { + i = isonum_711(&rr->len)-5; + c = (char*) rr; + c += 5; + while (i>0) { + switch(c[0] & ~1) { + case 0x2: + if (str_append(&rrentry->sl,(char *)".")) { + FreeRR(rrentry); return -ENOMEM; + } + break; + case 0x4: + if (str_append(&rrentry->sl,(char *)"..")) { + FreeRR(rrentry); return -ENOMEM; + } + break; + } + if ( (c[0] & 0x08) == 0x08 || (c[1] && rrentry->sl && + strlen(rrentry->sl)>1) ) { + if (str_append(&rrentry->sl,(char *)"/")) { + FreeRR(rrentry); return -ENOMEM; + } + } + + if ((unsigned char)c[1]>0) { + if (str_nappend(&rrentry->sl,c+2,(unsigned char)c[1])) { + FreeRR(rrentry); return -ENOMEM; + } + } + i -= ((unsigned char)c[1] + 2); + c += ((unsigned char)c[1] + 2); + } + ret++; + } else if (rr->signature[0]=='T' && rr->signature[1]=='F' && + isonum_711(&rr->len)>5) { + + i = isonum_711(&rr->len)-5; + f = rr->u.TF.flags; + c = (char*) rr; + c += 5; + + while (i >= rrtlen(f)) { + if (f & 1) { + rrentry->t_creat=rrctime(f,c); + f &= ~1; + } else if (f & 2) { + rrentry->t_mtime=rrctime(f,c); + f &= ~2; + } else if (f & 4) { + rrentry->t_atime=rrctime(f,c); + f &= ~4; + } else if (f & 8) { + rrentry->t_ctime=rrctime(f,c); + f &= ~8; + } else if (f & 16) { + rrentry->t_backup=rrctime(f,c); + f &= ~16; + } else if (f & 32) { + rrentry->t_expire=rrctime(f,c); + f &= ~32; + } else if (f & 64) { + rrentry->t_effect=rrctime(f,c); + f &= ~64; + } + + i -= rrtlen(f); + c += rrtlen(f); + } + ret++; + + } else if (rr->signature[0]=='Z' && rr->signature[1]=='F' && + isonum_711(&rr->len)==16) { + /* Linux-specific extension: transparent decompression */ + rrentry->z_algo[0]=rr->u.ZF.algorithm[0]; + rrentry->z_algo[1]=rr->u.ZF.algorithm[1]; + rrentry->z_params[0]=rr->u.ZF.parms[0]; + rrentry->z_params[1]=rr->u.ZF.parms[1]; + rrentry->z_size=isonum_733(rr->u.ZF.real_size); + ret++; + } else { +/* printf("SUSP sign: %c%c\n",rr->signature[0],rr->signature[1]); */ + } + + susplen -= isonum_711(&rr->len); + r += isonum_711(&rr->len); + rr = (struct rock_ridge*) r; + } + + return ret; +} + +/** + * Iterates over the directory entries. The directory is in 'buf', + * the size of the directory is 'size'. 'callback' is called for each + * directory entry with the parameter 'udata'. + */ +int ProcessDir(readfunc *read,int extent,int size,dircallback *callback,void *udata) { + + int pos=0,ret=0,siz; + char *buf; + struct iso_directory_record *idr; + + if (size & 2047) { + siz=((size>>11)+1)<<11; + } else { + siz=size; + } + + buf=(char*) malloc(siz); + if (!buf) return -ENOMEM; + if (read(buf,extent,siz>>11,udata)!=siz>>11) { + free(buf); + return -EIO; + } + + while (size>0) { + idr=(struct iso_directory_record*) &buf[pos]; + if (isonum_711(idr->length)==0) { + + size-=(2048 - (pos & 0x7ff)); + if (size<=2) break; + pos+=0x800; + pos&=0xfffff800; + idr=(struct iso_directory_record*) &buf[pos]; + } + pos+=isonum_711(idr->length); + pos+=isonum_711(idr->ext_attr_length); + size-=isonum_711(idr->length); + size-=isonum_711(idr->ext_attr_length); + if (size<0) break; + + if (isonum_711(idr->length) +<33 || + isonum_711(idr->length)<33+isonum_711(idr->name_len)) { + /* Invalid directory entry */ + continue; + } + if ((ret=callback(idr,udata))) break; + } + + free(buf); + return ret; +} + +/** + * returns the joliet level from the volume descriptor + */ +int JolietLevel(struct iso_volume_descriptor *ivd) { + int ret=0; + register struct iso_supplementary_descriptor *isd; + + isd = (struct iso_supplementary_descriptor *) ivd; + + if (isonum_711(ivd->type)==ISO_VD_SUPPLEMENTARY) { + if (isd->escape[0]==0x25 && + isd->escape[1]==0x2f) { + + switch (isd->escape[2]) { + case 0x40: + ret=1; + break; + case 0x43: + ret=2; + break; + case 0x45: + ret=3; + break; + } + } + } + return ret; +} + +/********************************************************************/ +#ifdef ISOFS_MAIN + +#include +#include +#include +#include +#include +#include +#include + +int level=0,joliet=0,dirs,files; +iconv_t iconv_d; +int fd; + +int readf(char *buf, int start, int len,void *udata) { + int ret; + + if ((ret=lseek(fd, start << 11, SEEK_SET))<0) return ret; + ret=read(fd, buf, len << 11); + if (ret<0) return ret; + return (ret >> 11); +} + +void dumpchars(char *c,int len) { + while (len>0) { + printf("%c",*c); + len--; + c++; + } +} + +void sp(int num) { + int i; + for (i=0;iname_len)==1) { + switch (dir->name[0]) { + case 0: + printf("."); + break; + case 1: + printf(".."); + break; + default: + printf("%c",dir->name[0]); + break; + } + } + dumpchardesc(dir->name,isonum_711(dir->name_len)); + printf(" size=%d",isonum_733(dir->size)); + printf(" extent=%d ",isonum_733(dir->extent)); + dumpflags(isonum_711(dir->flags)); + dumpiso915time((char*) &(dir->date),0); +} + +void dumprrentry(rr_entry *rr) { + printf(" NM=[%s] uid=%d gid=%d nlink=%d mode=%o ", + rr->name,rr->uid,rr->gid,rr->nlink,rr->mode); + if (S_ISCHR(rr->mode) || S_ISBLK(rr->mode)) + printf("major=%d minor=%d ",rr->dev_major,rr->dev_minor); + if (rr->mode & S_IFLNK && rr->sl) printf("slink=%s ",rr->sl); +/* + printf("\n"); + if (rr->t_creat) printf("t_creat: %s",ctime(&rr->t_creat)); + if (rr->st_mtime) printf("st_mtime: %s",ctime(&rr->st_mtime)); + if (rr->st_atime) printf("st_atime: %s",ctime(&rr->st_atime)); + if (rr->st_ctime) printf("st_ctime: %s",ctime(&rr->st_ctime)); + if (rr->t_backup) printf("t_backup: %s",ctime(&rr->t_backup)); + if (rr->t_expire) printf("t_expire: %s",ctime(&rr->t_expire)); + if (rr->t_effect) printf("t_effect: %s",ctime(&rr->t_effect)); +*/ +} + +void dumpsusp(char *c, int len) { + dumpchars(c,len); +} + +void dumpboot(struct el_torito_boot_descriptor *ebd) { + printf("version: %d\n",isonum_711(ebd->version)); + printf("system id: ");dumpchars(ebd->system_id,ISODCL(8,39));printf("\n"); + printf("boot catalog start: %d\n",isonum_731(ebd->boot_catalog)); +} + +void dumpdefentry(struct default_entry *de) { + printf("Default entry: \n"); + printf(" bootid=%x\n",isonum_711(de->bootid)); + printf(" media emulation=%d (",isonum_711(de->media)); + switch(isonum_711(de->media) & 0xf) { + case 0: + printf("No emulation"); + break; + case 1: + printf("1.2 Mb floppy"); + break; + case 2: + printf("1.44 Mb floppy"); + break; + case 3: + printf("2.88 Mb floppy"); + break; + case 4: + printf("Hard Disk"); + break; + default: + printf("Unknown/Invalid"); + break; + } + printf(")\n"); + printf(" loadseg=%d\n",isonum_721(de->loadseg)); + printf(" systype=%d\n",isonum_711(de->systype)); + printf(" start lba=%d count=%d\n",isonum_731(de->start), + isonum_721(de->seccount)); +} + +void dumpbootcat(boot_head *bh) { + boot_entry *be; + + printf("System id: ");dumpchars(bh->ventry.id,ISODCL(28,5));printf("\n"); + be=bh->defentry; + while (be) { + dumpdefentry(be->data); + be=be->next; + } +} + +void dumpdesc(struct iso_primary_descriptor *ipd) { + + printf("system id: ");dumpchardesc(ipd->system_id,ISODCL(9,40));printf("\n"); + printf("volume id: ");dumpchardesc(ipd->volume_id,ISODCL(41,72));printf("\n"); + printf("volume space size: %d\n",isonum_733(ipd->volume_space_size)); + printf("volume set size: %d\n",isonum_723(ipd->volume_set_size)); + printf("volume seq num: %d\n",isonum_723(ipd->volume_set_size)); + printf("logical block size: %d\n",isonum_723(ipd->logical_block_size)); + printf("path table size: %d\n",isonum_733(ipd->path_table_size)); + printf("location of type_l path table: %d\n",isonum_731(ipd->type_l_path_table)); + printf("location of optional type_l path table: %d\n",isonum_731(ipd->opt_type_l_path_table)); + printf("location of type_m path table: %d\n",isonum_732(ipd->type_m_path_table)); + printf("location of optional type_m path table: %d\n",isonum_732(ipd->opt_type_m_path_table)); +/* + printf("Root dir record:\n");dumpdirrec((struct iso_directory_record*) &ipd->root_directory_record); +*/ + printf("Volume set id: ");dumpchardesc(ipd->volume_set_id,ISODCL(191,318));printf("\n"); + printf("Publisher id: ");dumpchardesc(ipd->publisher_id,ISODCL(319,446));printf("\n"); + printf("Preparer id: ");dumpchardesc(ipd->preparer_id,ISODCL(447,574));printf("\n"); + printf("Application id: ");dumpchardesc(ipd->application_id,ISODCL(575,702));printf("\n"); + printf("Copyright id: ");dumpchardesc(ipd->copyright_file_id,ISODCL(703,739));printf("\n"); + printf("Abstract file id: ");dumpchardesc(ipd->abstract_file_id,ISODCL(740,776));printf("\n"); + printf("Bibliographic file id: ");dumpchardesc(ipd->bibliographic_file_id,ISODCL(777,813));printf("\n"); + printf("Volume creation date: ");dumpiso84261time(ipd->creation_date,0);printf("\n"); + printf("Volume modification date: ");dumpiso84261time(ipd->modification_date,0);printf("\n"); + printf("Volume expiration date: ");dumpiso84261time(ipd->expiration_date,0);printf("\n"); + printf("Volume effective date: ");dumpiso84261time(ipd->effective_date,0);printf("\n"); + printf("File structure version: %d\n",isonum_711(ipd->file_structure_version)); +} + +int mycallb(struct iso_directory_record *idr,void *udata) { + rr_entry rrentry; + + sp(level);dumpdirrec(idr); + if (level==0) printf(" (Root directory) "); + printf("\n"); + + if (ParseRR(idr,&rrentry)>0) { + sp(level);printf(" ");dumprrentry(&rrentry);printf("\n"); + } + FreeRR(&rrentry); + if ( !(idr->flags[0] & 2) ) files++; + if ( (idr->flags[0] & 2) && (level==0 || isonum_711(idr->name_len)>1) ) { + level++; + dirs++; + ProcessDir(&readf,isonum_733(idr->extent),isonum_733(idr->size),&mycallb,udata); + level--; + } + return 0; +} + +/************************************************/ + +int main(int argc, char *argv[]) { + + int i=1,sector=0; + iso_vol_desc *desc; + boot_head boot; + + if (argc<2) { + fprintf(stderr,"\nUsage: %s iso-file-name or device [starting sector]\n\n",argv[0]); + return 0; + } + if (argc>=3) { + sector=atoi(argv[2]); + printf("Using starting sector number %d\n",sector); + } + fd=open(argv[1],O_RDONLY); + if (fd<0) { + fprintf(stderr,"open error\n"); + return -1; + } + iconv_d=iconv_open("ISO8859-2","UTF16BE"); + if (iconv_d==0) { + fprintf(stderr,"iconv open error\n"); + return -1; + } + + desc=ReadISO9660(&readf,sector,NULL); + if (!desc) { + printf("No volume descriptors\n"); + return -1; + } + while (desc) { + + printf("\n\n--------------- Volume descriptor (%d.) type %d: ---------------\n\n", + i,isonum_711(desc->data.type)); + switch (isonum_711(desc->data.type)) { + case ISO_VD_BOOT: { + + struct el_torito_boot_descriptor* bootdesc; + bootdesc=&(desc->data); + dumpboot(bootdesc); + if ( !memcmp(EL_TORITO_ID,bootdesc->system_id,ISODCL(8,39)) ) { + + if (ReadBootTable(&readf,isonum_731(bootdesc->boot_catalog),&boot,NULL)) { + printf("Boot Catalog Error\n"); + } else { + dumpbootcat(&boot); + FreeBootTable(&boot); + } + } + } + break; + + case ISO_VD_PRIMARY: + case ISO_VD_SUPPLEMENTARY: + joliet=0; + joliet = JolietLevel(&desc->data); + printf("Joliet level: %d\n",joliet); + dumpdesc((struct iso_primary_descriptor*) &desc->data); + printf("\n\n--------------- Directory structure: -------------------\n\n"); + dirs=0;files=0; + mycallb( &( ((struct iso_primary_descriptor*) &desc->data)->root_directory_record), NULL ); + printf("\nnumber of directories: %d\n",dirs); + printf("\nnumber of files: %d\n",files); + break; + + } + desc=desc->next; + i++; + } + iconv_close(iconv_d); + close(fd); + FreeISO9660(desc); + return 0; +} + +#endif /* ISOFS_MAIN */ diff --git a/iso/libisofs/isofs.h b/iso/libisofs/isofs.h new file mode 100644 index 0000000..52190e6 --- /dev/null +++ b/iso/libisofs/isofs.h @@ -0,0 +1,161 @@ +/*************************************************************************** + isofs.h - include this file to use libisofs + ------------------- + begin : Oct 25 2002 + copyright : (C) 2002 by Szombathelyi Gy�gy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef ISOFS_H +#define ISOFS_H + +#include +#ifdef __cplusplus +extern "C" { +#endif + +#include "iso_fs.h" +#include "el_torito.h" +#include "rock.h" + +typedef struct _rr_entry { + int len; /* length of structure */ + char *name; /* Name from 'NM' */ + char *sl; /* symbolic link data */ + time_t t_creat; + time_t t_mtime; + time_t t_atime; + time_t t_ctime; + time_t t_backup; + time_t t_expire; + time_t t_effect; + int mode; /* POSIX file modes */ + int nlink; + int uid; + int gid; + int serno; + int dev_major; + int dev_minor; + int pl; /* parent location */ + int cl; /* child location */ + int re; /* relocated */ + char z_algo[2]; /* zizofs algorithm */ + char z_params[2]; /* zizofs parameters */ + int z_size; /* zizofs real_size */ +} rr_entry; + +typedef struct _iso_vol_desc { + struct _iso_vol_desc *next; + struct _iso_vol_desc *prev; + struct iso_volume_descriptor data; +} iso_vol_desc; + +typedef struct _boot_entry { + struct _boot_entry *next; + struct _boot_entry *prev; + struct _boot_entry *parent; + struct _boot_entry *child; + char data[32]; +} + boot_entry; + +typedef struct _boot_head { + struct validation_entry ventry; + struct _boot_entry *defentry; + struct _boot_entry *sections; +} + boot_head; + +/** + * this callback function needs to read 'len' sectors from 'start' into 'buf' + */ +typedef int readfunc(char *buf,int start, int len,void *); + +/** + * ProcessDir uses this callback + */ +typedef int dircallback(struct iso_directory_record *,void *); + +/** + * Returns the Unix from the ISO9660 9.1.5 (7 bytes) time format + * This function is from the linux kernel. + * Set 'hs' to non-zero if it's a HighSierra volume + */ +time_t isodate_915(char * p, int hs); + +/** + * Returns the Unix time from the ISO9660 8.4.26.1 (17 bytes) time format + * BUG: hundredth of seconds are ignored, because time_t has one second + * resolution (I think it's no problem at all) + * Set 'hs' to non-zero if it's a HighSierra volume + */ +time_t isodate_84261(char * p, int hs); + +/** + * Creates the linked list of the volume descriptors + * 'sector' is the starting sector number of where the filesystem start + * (starting sector of a session on a CD-ROM) + * If the function fails, returns NULL + * Don't forget to call FreeISO9660 after using the volume descriptor list! + */ +iso_vol_desc *ReadISO9660(readfunc *read,int sector,void *udata); + +/** + * Frees the linked list of volume descriptors +. + */ +void FreeISO9660(iso_vol_desc *data); + +/** + * Iterates over the directory entries. The directory is in 'buf', + * the size of the directory is 'size'. 'callback' is called for each + * directory entry with the parameter 'udata'. + */ +int ProcessDir(readfunc *read,int extent,int size,dircallback *callback,void *udata); + +/** + * Parses the System Use area and fills rr_entry with values + */ +int ParseRR(struct iso_directory_record *idr, rr_entry *rrentry); + +/** + * Frees the strings in 'rrentry' + */ +void FreeRR(rr_entry *rrentry); + +/** + * returns the joliet level from the volume descriptor + */ +int JolietLevel(struct iso_volume_descriptor *ivd); + +/** + * Returns the size of the boot image (in 512 byte sectors) + */ +int BootImageSize(int media,int len); + +/** + * Frees the boot catalog entries in 'boot'. If you ever called ReadBootTable, + * then don't forget to call FreeBootTable! + */ +void FreeBootTable(boot_head *boot); + +/** + * Reads the boot catalog into 'head'. Don't forget to call FreeBootTable! + */ +int ReadBootTable(readfunc *read,int sector, boot_head *head, void *udata); + +#ifdef __cplusplus +} //extern "C" +#endif + +#endif + diff --git a/iso/libisofs/rock.h b/iso/libisofs/rock.h new file mode 100644 index 0000000..e859192 --- /dev/null +++ b/iso/libisofs/rock.h @@ -0,0 +1,127 @@ +/* this header is from the linux kernel */ + +#ifndef ROCK_H +#define ROCK_H 1 + +/* These structs are used by the system-use-sharing protocol, in which the + Rock Ridge extensions are embedded. It is quite possible that other + extensions are present on the disk, and this is fine as long as they + all use SUSP */ + +struct SU_SP{ + unsigned char magic[2]; + unsigned char skip; +}; + +struct SU_CE{ + char extent[8]; + char offset[8]; + char size[8]; +}; + +struct SU_ER{ + unsigned char len_id; + unsigned char len_des; + unsigned char len_src; + unsigned char ext_ver; + char data[1]; +}; + +struct RR_RR{ + char flags[1]; +}; + +struct RR_PX{ + char mode[8]; + char n_links[8]; + char uid[8]; + char gid[8]; + char serno[8]; +}; + +struct RR_PN{ + char dev_high[8]; + char dev_low[8]; +}; + + +struct SL_component{ + unsigned char flags; + unsigned char len; + char text[1]; +}; + +struct RR_SL{ + unsigned char flags; + struct SL_component link; +}; + +struct RR_NM{ + unsigned char flags; + char name[1]; +}; + +struct RR_CL{ + char location[8]; +}; + +struct RR_PL{ + char location[8]; +}; + +struct stamp{ + char time[7]; +}; + +struct RR_TF{ + char flags; + struct stamp times[1]; /* Variable number of these beasts */ +}; + +/* Linux-specific extension for transparent decompression */ +struct RR_ZF{ + char algorithm[2]; + char parms[2]; + char real_size[8]; +}; + +/* These are the bits and their meanings for flags in the TF structure. */ +#define TF_CREATE 1 +#define TF_MODIFY 2 +#define TF_ACCESS 4 +#define TF_ATTRIBUTES 8 +#define TF_BACKUP 16 +#define TF_EXPIRATION 32 +#define TF_EFFECTIVE 64 +#define TF_LONG_FORM 128 + +struct rock_ridge{ + char signature[2]; + char len; /* 711 */ + char version; /* 711 */ + union{ + struct SU_SP SP; + struct SU_CE CE; + struct SU_ER ER; + struct RR_RR RR; + struct RR_PX PX; + struct RR_PN PN; + struct RR_SL SL; + struct RR_NM NM; + struct RR_CL CL; + struct RR_PL PL; + struct RR_TF TF; + struct RR_ZF ZF; + } u; +}; + +#define RR_PX 1 /* POSIX attributes */ +#define RR_PN 2 /* POSIX devices */ +#define RR_SL 4 /* Symbolic link */ +#define RR_NM 8 /* Alternate Name */ +#define RR_CL 16 /* Child link */ +#define RR_PL 32 /* Parent link */ +#define RR_RE 64 /* Relocation directory */ +#define RR_TF 128 /* Timestamps */ + +#endif /* ROCK_H */ diff --git a/iso/qfilehack.cpp b/iso/qfilehack.cpp new file mode 100644 index 0000000..6f0b99d --- /dev/null +++ b/iso/qfilehack.cpp @@ -0,0 +1,40 @@ +/*************************************************************************** + qfilehack.cpp - description + ------------------- + begin : Tue Oct 29 2002 + copyright : (C) 2002 by Szombathelyi Gyrgy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "qfilehack.h" + +QFileHack::QFileHack(){ +} + +QFileHack::QFileHack( const QString & name ) : QFile(name) { +} + +QFileHack::~QFileHack(){ +} + +bool QFileHack::open ( int m ) { + bool ret; + +#ifdef __linux__ + m |= IO_Async; //On linux, set O_NONBLOCK, opens CD-ROMs faster +#endif + ret=QFile::open(m); + if (ret && isSequentialAccess() ) { + setType(IO_Direct); + } + return ret; +} diff --git a/iso/qfilehack.h b/iso/qfilehack.h new file mode 100644 index 0000000..5e9e247 --- /dev/null +++ b/iso/qfilehack.h @@ -0,0 +1,38 @@ +/*************************************************************************** + qfilehack.h - description + ------------------- + begin : Tue Oct 29 2002 + copyright : (C) 2002 by Szombathelyi Gyrgy + email : gyurco@users.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef QFILEHACK_H +#define QFILEHACK_H + +#include +#include + +/** + *@author Szombathelyi Gyrgy + * Qt thinks if a file is not S_IFREG, you cannot seek in it. It's false (what about + * block devices for example? + */ + +class QFileHack : public QFile { +public: + QFileHack(); + QFileHack( const QString & name ); + ~QFileHack(); + virtual bool open ( int m ); +}; + +#endif diff --git a/krArc/Makefile.am b/krArc/Makefile.am new file mode 100644 index 0000000..adbaa42 --- /dev/null +++ b/krArc/Makefile.am @@ -0,0 +1,59 @@ +####### kdevelop will overwrite this part!!! (begin)########## +kde_module_LTLIBRARIES = kio_krarc.la + + +INCLUDES = $(all_includes) + + +#LDFLAGS = + +kio_krarc_la_METASOURCES=AUTO + +kio_krarc_la_SOURCES = krarc.cpp +kio_krarc_la_LIBADD = $(LIB_QT) $(LIB_KDECORE) $(LIB_KIO) +# $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) + +kio_krarc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) + +noinst_HEADERS = krarc.h + +EXTRA_DIST = krarc.protocol + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(kde_servicesdir) + $(INSTALL_DATA) $(srcdir)/krarc.protocol $(DESTDIR)$(kde_servicesdir)/krarc.protocol + +uninstall-local: + rm -f $(DESTDIR)$(kde_servicesdir)/krarc.protocol + +####### kdevelop will overwrite this part!!! (end)############ +# These paths are KDE specific. Use them: +# kde_appsdir Where your application's menu entry (.desktop) should go to. +# kde_icondir Where your icon should go to - better use KDE_ICON. +# kde_sounddir Where your sounds should go to. +# kde_htmldir Where your docs should go to. (contains lang subdirs) +# kde_datadir Where you install application data. (Use a subdir) +# kde_locale Where translation files should go to. (contains lang subdirs) +# kde_cgidir Where cgi-bin executables should go to. +# kde_confdir Where config files should go to (system-wide ones with default values). +# kde_mimedir Where mimetypes .desktop files should go to. +# kde_servicesdir Where services .desktop files should go to. +# kde_servicetypesdir Where servicetypes .desktop files should go to. +# kde_toolbardir Where general toolbar icons should go to (deprecated, use KDE_ICON). +# kde_wallpaperdir Where general wallpapers should go to. +# kde_templatesdir Where templates for the "New" menu (Konqueror/KDesktop) should go to. +# kde_bindir Where executables should go to. Use bin_PROGRAMS or bin_SCRIPTS. +# kde_libdir Where shared libraries should go to. Use lib_LTLIBRARIES. +# kde_moduledir Where modules (e.g. parts) should go to. Use kde_module_LTLIBRARIES. +# kde_styledir Where Qt/KDE widget styles should go to (new in KDE 3). +# kde_designerdir Where Qt Designer plugins should go to (new in KDE 3). + + +# make messages.po. Move this one to ../po/ and "make merge" in po +# the -x is for skipping messages already translated in kdelibs +messages: + LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \ + if test -n "$$LIST"; then \ + $(XGETTEXT) -C -ki18n -x $(kde_includes)/kde.pot $$LIST -o ../po/krarc.pot; \ + fi + diff --git a/krArc/krarc.cpp b/krArc/krarc.cpp new file mode 100644 index 0000000..663236a --- /dev/null +++ b/krArc/krarc.cpp @@ -0,0 +1,1668 @@ +/*************************************************************************** + krarc.cpp + ------------------- + begin : Sat Jun 14 14:42:49 IDT 2003 + copyright : (C) 2003 by Rafi Yanai & Shie Erlich + email : krusader@users.sf.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "krarc.h" + +#define MAX_IPC_SIZE (1024*32) +#define TRIES_WITH_PASSWORDS 3 + +#if 0 +#define KRDEBUG(X...) do{ \ + QFile f("/tmp/debug"); \ + f.open(IO_WriteOnly | IO_Append); \ + QTextStream stream( &f ); \ + stream << "Pid:" << (int)getpid() << " " <<__FUNCTION__<<"(" <<__LINE__<<"): "; \ + stream << X << endl; \ + f.close(); \ +} while(0); +#else +#define KRDEBUG(X...) +#endif + +using namespace KIO; +extern "C" { + +int kdemain( int argc, char **argv ){ + KInstance instance( "kio_krarc" ); + + if (argc != 4) { + kdWarning() << "Usage: kio_krarc protocol domain-socket1 domain-socket2" << endl; + exit(-1); + } + + kio_krarcProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + return 0; +} + +} // extern "C" + +kio_krarcProtocol::kio_krarcProtocol(const QCString &pool_socket, const QCString &app_socket) + : SlaveBase("kio_krarc", pool_socket, app_socket), archiveChanged(true), arcFile(0L),extArcReady(false), + password(QString::null) { + + krConfig = new KConfig( "krusaderrc" ); + krConfig->setGroup( "Dependencies" ); + + dirDict.setAutoDelete(true); + + arcTempDir = locateLocal("tmp",QString::null); + QString dirName = "krArc"+QDateTime::currentDateTime().toString(Qt::ISODate); + dirName.replace(QRegExp(":"),"_"); + QDir(arcTempDir).mkdir(dirName); + arcTempDir = arcTempDir+dirName+"/"; +} + +/* ---------------------------------------------------------------------------------- */ +kio_krarcProtocol::~kio_krarcProtocol(){ + // delete the temp directory + KrShellProcess proc; + proc << "rm -rf "<< arcTempDir; + proc.start(KProcess::Block); +} + +/* ---------------------------------------------------------------------------------- */ +void kio_krarcProtocol::receivedData(KProcess*,char* buf,int len){ + QByteArray d(len); + d.setRawData(buf,len); + data(d); + d.resetRawData(buf,len); + processedSize(len); + decompressedLen += len; +} + +void kio_krarcProtocol::mkdir(const KURL& url,int permissions){ + KRDEBUG(url.path()); + + if( !setArcFile( url ) ) { + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + if( newArchiveURL && !initDirDict(url) ){ + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + + if( putCmd.isEmpty() ){ + error(ERR_UNSUPPORTED_ACTION, + i18n("Creating directories is not supported with %1 archives").arg(arcType) ); + return; + } + + if( arcType == "arj" || arcType == "lha" ) { + QString arcDir = url.path().mid(arcFile->url().path().length()); + if( arcDir.right(1) != "/") arcDir = arcDir+"/"; + + if( dirDict.find( arcDir ) == 0 ) + addNewDir( arcDir ); + finished(); + return; + } + + //QString tmpDir = arcTempDir+url.path(); + QString arcDir = findArcDirectory(url); + QString tmpDir = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().findRev("/")+1); + if( tmpDir.right(1) != "/" ) tmpDir = tmpDir+"/"; + + if( permissions == -1 ) permissions = 0777; //set default permissions + for( unsigned int i=arcTempDir.length();iurl().path() ) + " " << convertFileName( tmpDir.mid(arcTempDir.length()) ); + infoMessage(i18n("Creating %1 ...").arg( url.fileName() ) ); + QDir::setCurrent(arcTempDir); + proc.start(KProcess::Block,KProcess::AllOutput); + + // delete the temp directory + QDir().rmdir(arcTempDir); + + if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() ); + return; + } + + // force a refresh of archive information + initDirDict(url,true); + finished(); +} + +void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool resume){ + KRDEBUG(url.path()); + if( !setArcFile( url ) ) { + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + if( newArchiveURL && !initDirDict(url) ){ + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + + if( putCmd.isEmpty() ){ + error(ERR_UNSUPPORTED_ACTION, + i18n("Writing to %1 archives is not supported").arg(arcType) ); + return; + } + if( !overwrite && findFileEntry(url) ){ + error( ERR_FILE_ALREADY_EXIST,url.path() ); + return; + } + + QString arcDir = findArcDirectory(url); + QString tmpFile = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().findRev("/")+1); + + QString tmpDir = arcTempDir+arcDir.mid(1)+"/"; + for( unsigned int i=arcTempDir.length();i 0 ); + close(fd); + // pack the file + KrShellProcess proc; + proc << putCmd << convertName( arcFile->url().path() )+ " " <url().path(-1) ) << " > " << arcTempDir+"contents.cpio"; + cpio.start(KProcess::Block,KProcess::AllOutput); + if( !cpio.normalExit() || cpio.exitStatus() != 0 ) { + error(ERR_COULD_NOT_READ,url.path() + "\n\n" + cpio.getErrorMsg() ); + return; + } + extArcReady = true; + } + // for DEB files extract the tar file first + if ( !extArcReady && arcType == "deb" ) { + KrShellProcess dpkg; + dpkg << cmd + " --fsys-tarfile" << convertName( arcFile->url().path( -1 ) ) << " > " << arcTempDir + "contents.cpio"; + dpkg.start( KProcess::Block, KProcess::AllOutput ); + if( !dpkg.normalExit() || dpkg.exitStatus() != 0 ) { + error(ERR_COULD_NOT_READ,url.path() + "\n\n" + dpkg.getErrorMsg() ); + return; + } + extArcReady = true; + } + + // Use the external unpacker to unpack the file + QString file = url.path().mid(arcFile->url().path().length()+1); + KrShellProcess proc; + if( extArcReady ){ + proc << getCmd << arcTempDir+"contents.cpio " << convertName( "*"+file ); + } else if( arcType == "arj" || arcType == "ace" || arcType == "7z" ) { + proc << getCmd << convertName( arcFile->url().path(-1) )+ " " << convertFileName( file ); + if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!! + proc << "<" << "/dev/ptmx"; + file = url.fileName(); + decompressToFile = true; + } else { + decompressedLen = 0; + // Determine the mimetype of the file to be retrieved, and emit it. + // This is mandatory in all slaves (for KRun/BrowserRun to work). + KMimeType::Ptr mt = KMimeType::findByURL( arcTempDir+file, 0, false /* NOT local URL */ ); + emit mimeType( mt->name() ); + proc << getCmd << convertName( arcFile->url().path() )+" "; + if( arcType != "gzip" && arcType != "bzip2" ) proc << convertFileName( file ); + connect(&proc,SIGNAL(receivedStdout(KProcess*,char*,int)), + this,SLOT(receivedData(KProcess*,char*,int)) ); + } + infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) ); + // change the working directory to our arcTempDir + QDir::setCurrent(arcTempDir); + proc.start(KProcess::Block,KProcess::AllOutput); + + if( !extArcReady && !decompressToFile ) { + if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || ( arcType != "bzip2" && expectedSize != decompressedLen ) ) { + if( encrypted && tries ) { + invalidatePassword(); + get( url, tries - 1 ); + return; + } + error( KIO::ERR_ACCESS_DENIED, url.path() + "\n\n" + proc.getErrorMsg() ); + return; + } + } + else{ + if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || !QFileInfo( arcTempDir+file ).exists() ) { + if( decompressToFile ) + QFile(arcTempDir+file).remove(); + if( encrypted && tries ) { + invalidatePassword(); + get( url, tries - 1 ); + return; + } + error( KIO::ERR_ACCESS_DENIED, url.path() ); + return; + } + // the follwing block is ripped from KDE file KIO::Slave + // $Id: krarc.cpp,v 1.43 2007/01/13 13:39:51 ckarai Exp $ + QCString _path( QFile::encodeName(arcTempDir+file) ); + KDE_struct_stat buff; + if( KDE_lstat( _path.data(), &buff ) == -1 ) { + if ( errno == EACCES ) + error( KIO::ERR_ACCESS_DENIED, url.path() ); + else + error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + return; + } + if ( S_ISDIR( buff.st_mode ) ) { + error( KIO::ERR_IS_DIRECTORY, url.path() ); + return; + } + if ( !S_ISREG(buff.st_mode) ) { + error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); + return; + } + int fd = KDE_open( _path.data(), O_RDONLY ); + if ( fd < 0 ) { + error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); + return; + } + // Determine the mimetype of the file to be retrieved, and emit it. + // This is mandatory in all slaves (for KRun/BrowserRun to work). + KMimeType::Ptr mt = KMimeType::findByURL( arcTempDir+file, buff.st_mode, true /* local URL */ ); + emit mimeType( mt->name() ); + + KIO::filesize_t processed_size = 0; + + QString resumeOffset = metaData("resume"); + if ( !resumeOffset.isEmpty() ){ + bool ok; +#if QT_VERSION >= 0x030200 + KIO::fileoffset_t offset = resumeOffset.toLongLong(&ok); +#else + KIO::fileoffset_t offset = resumeOffset.toULong(&ok); +#endif + if (ok && (offset > 0) && (offset < buff.st_size)){ + if (KDE_lseek(fd, offset, SEEK_SET) == offset){ + canResume (); + processed_size = offset; + } + } + } + + totalSize( buff.st_size ); + + char buffer[ MAX_IPC_SIZE ]; + QByteArray array; + while( 1 ){ + int n = ::read( fd, buffer, MAX_IPC_SIZE ); + if (n == -1){ + if (errno == EINTR) + continue; + error( KIO::ERR_COULD_NOT_READ, url.path()); + close(fd); + return; + } + if (n == 0) + break; // Finished + + array.setRawData(buffer, n); + data( array ); + array.resetRawData(buffer, n); + + processed_size += n; + } + + data( QByteArray() ); + close( fd ); + processedSize( buff.st_size ); + finished(); + + if( decompressToFile ) + QFile(arcTempDir+file).remove(); + return; + } + // send empty buffer to mark EOF + data(QByteArray()); + finished(); +} + +void kio_krarcProtocol::del(KURL const & url, bool isFile){ + KRDEBUG(url.path()); + + if( !setArcFile( url ) ) { + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + if( newArchiveURL && !initDirDict(url) ){ + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + + if( delCmd.isEmpty() ){ + error(ERR_UNSUPPORTED_ACTION, + i18n("Deleting files from %1 archives is not supported").arg(arcType) ); + return; + } + if( !findFileEntry(url) ){ + if( ( arcType != "arj" && arcType != "lha" ) || isFile ) { + error(KIO::ERR_DOES_NOT_EXIST,url.path()); + return; + } + } + + QString file = url.path().mid(arcFile->url().path().length()+1); + if( !isFile && file.right(1) != "/" ) { + if(arcType == "zip") file = file + "/"; + } + KrShellProcess proc; + proc << delCmd << convertName( arcFile->url().path() )+" " << convertFileName( file ); + infoMessage(i18n("Deleting %1 ...").arg( url.fileName() ) ); + proc.start(KProcess::Block, KProcess::AllOutput); + if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() ); + return; + } + // force a refresh of archive information + initDirDict(url,true); + finished(); +} + +void kio_krarcProtocol::stat( const KURL & url ){ + KRDEBUG(url.path()); + if( !setArcFile( url ) ) { + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + if( newArchiveURL && !initDirDict(url) ){ + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + + if( listCmd.isEmpty() ){ + error(ERR_UNSUPPORTED_ACTION, + i18n("Accessing files is not supported with the %1 archives").arg(arcType) ); + return; + } + QString path = url.path(-1); + KURL newUrl = url; + + // but treat the archive itself as the archive root + if( path == arcFile->url().path(-1) ){ + newUrl.setPath(path+"/"); + path = newUrl.path(); + } + // we might be stating a real file + if( QFileInfo(path).exists() ){ + KDE_struct_stat buff; + KDE_stat( path.local8Bit(), &buff ); + QString mime = KMimeType::findByPath(path,buff.st_mode)->name(); + statEntry(KFileItem(path,mime,buff.st_mode).entry()); + finished(); + return; + } + UDSEntry* entry = findFileEntry(newUrl); + if( entry ){ + statEntry( *entry ); + finished(); + } else error( KIO::ERR_DOES_NOT_EXIST, path ); +} + +void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overwrite) { + KRDEBUG(url.path()); + + // KDE HACK: opening the password dlg in copy causes error for the COPY, and further problems + // that's why encrypted files are not allowed to copy + if( !encrypted && dest.isLocalFile() ) + do { + if( url.fileName() != dest.fileName() ) + break; + + //the file exists and we don't want to overwrite + if ((!overwrite) && ( QFile( dest.path() ).exists() ) ) { + error(ERR_FILE_ALREADY_EXIST, QFile::encodeName(dest.path()) ); + return; + }; + + if( !setArcFile( url ) ) { + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + if( newArchiveURL && !initDirDict(url) ){ + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + + UDSEntry* entry = findFileEntry(url); + if( copyCmd.isEmpty() || !entry ) + break; + + QString file = url.path().mid(arcFile->url().path().length()+1); + + QString destDir = dest.path( -1 ); + if( !QDir( destDir ).exists() ) { + int ndx = destDir.findRev( '/' ); + if( ndx != -1 ) + destDir.truncate( ndx+1 ); + } + + QDir::setCurrent( destDir.local8Bit() ); + + KrShellProcess proc; + proc << copyCmd << convertName( arcFile->url().path(-1) )+" " << convertFileName( file ); + if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!! + proc << "<" << "/dev/ptmx"; + + infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) ); + proc.start(KProcess::Block, KProcess::AllOutput); + if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + error(KIO::ERR_COULD_NOT_WRITE, dest.path(-1) + "\n\n" + proc.getErrorMsg() ); + return; + } + if( !QFileInfo( dest.path(-1) ).exists() ) { + error( KIO::ERR_COULD_NOT_WRITE, dest.path(-1) ); + return; + } + + processedSize( KFileItem(*entry,url).size() ); + finished(); + QDir::setCurrent( "/" ); /* for being able to umount devices after copying*/ + return; + }while( 0 ); + + error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_COPY)); +} + +void kio_krarcProtocol::listDir(const KURL& url){ + KRDEBUG(url.path()); + if( !setArcFile( url ) ) { + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + if( listCmd.isEmpty() ){ + error(ERR_UNSUPPORTED_ACTION, + i18n("Listing directories is not supported for %1 archives").arg(arcType) ); + return; + } + QString path = url.path(); + if( path.right(1) != "/" ) path = path+"/"; + + // it might be a real dir ! + if( QFileInfo(path).exists() ){ + if( QFileInfo(path).isDir() ){ + KURL redir; + redir.setPath( url.path() ); + redirection(redir); + finished(); + } else { // maybe it's an archive ! + error(ERR_IS_FILE,path); + } + return; + } + if( !initDirDict(url) ){ + error( ERR_CANNOT_ENTER_DIRECTORY, url.path()); + return; + } + QString arcDir = path.mid(arcFile->url().path().length()); + arcDir.truncate(arcDir.findRev("/")); + if(arcDir.right(1) != "/") arcDir = arcDir+"/"; + + UDSEntryList* dirList = dirDict.find(arcDir); + if( dirList == 0 ){ + error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); + return; + } + totalSize(dirList->size()); + listEntries(*dirList); + finished(); +} + +bool kio_krarcProtocol::setArcFile(const KURL& url){ + QString path = url.path(); + time_t currTime = time( 0 ); + archiveChanged = true; + newArchiveURL = true; + // is the file already set ? + if( arcFile && arcFile->url().path(-1) == path.left(arcFile->url().path(-1).length()) ){ + newArchiveURL = false; + // Has it changed ? + KFileItem* newArcFile = new KFileItem(arcFile->url(),QString::null,arcFile->mode()); + if( !newArcFile->cmp( *arcFile ) ){ + delete arcFile; + password = QString::null; + extArcReady = false; + arcFile = newArcFile; + } else { // same old file + delete newArcFile; + archiveChanged = false; + if( encrypted && password.isNull() ) + initArcParameters(); + } + } else { // it's a new file... + extArcReady = false; + if( arcFile ){ + delete arcFile; + password = QString::null; + arcFile = 0L; + } + QString newPath = path; + if(newPath.right(1) != "/") newPath = newPath+"/"; + for(int pos=0; pos >= 0; pos = newPath.find("/",pos+1)){ + QFileInfo qfi(newPath.left(pos)); + if( qfi.exists() && !qfi.isDir() ){ + KDE_struct_stat stat_p; + KDE_lstat(newPath.left(pos).local8Bit(),&stat_p); + arcFile = new KFileItem(KURL::fromPathOrURL( newPath.left(pos) ),QString::null,stat_p.st_mode); + break; + } + } + if( !arcFile ){ + error( ERR_DOES_NOT_EXIST,path ); + return false; // file not found + } + } + + /* FIX: file change can only be detected if the timestamp between the two consequent + changes is more than 1s. If the archive is continuously changing (check: move files + inside the archive), krarc may erronously think, that the archive file is unchanged, + because the timestamp is the same as the previous one. This situation can only occur + if the modification time equals with the current time. While this condition is true, + we can say, that the archive is changing, so content reread is always necessary + during that period. */ + if( archiveChanging ) + archiveChanged = true; + archiveChanging = ( currTime == arcFile->time( UDS_MODIFICATION_TIME ) ); + + arcPath = arcFile->url().path(-1); + arcType = detectArchive( encrypted, arcPath ); + + if( arcType == "tbz" ) + arcType = "bzip2"; + else if( arcType == "tgz" ) + arcType = "gzip"; + + if( arcType.isEmpty() ) { + arcType = arcFile->mimetype(); + arcType = arcType.mid(arcType.findRev("-")+1); + + if( arcType == "jar" ) + arcType = "zip"; + } + + return initArcParameters(); +} + +bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){ + // set the archive location + //if( !setArcFile(url.path()) ) return false; + // no need to rescan the archive if it's not changed + if( !archiveChanged && !forced ) return true; + extArcReady = false; + + if( !setArcFile( url ) ) + return false; /* if the archive was changed refresh the file information */ + + // write the temp file + KrShellProcess proc; + KTempFile temp( QString::null, "tmp" ); + temp.setAutoDelete(true); + if( arcType != "bzip2" ){ + if( arcType == "rpm" ) + proc << listCmd << convertName( arcPath ) <<" > " << temp.name(); + else + proc << listCmd << convertName( arcFile->url().path(-1) ) <<" > " << temp.name(); + if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!! + proc << "<" << "/dev/ptmx"; + proc.start(KProcess::Block,KProcess::AllOutput); + if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) return false; + } + // clear the dir dictionary + dirDict.clear(); + + // add the "/" directory + UDSEntryList* root = new UDSEntryList(); + dirDict.insert("/",root); + // and the "/" UDSEntry + UDSEntry entry; + UDSAtom atom; + atom.m_uds = UDS_NAME; + atom.m_str = "."; + entry.append(atom); + mode_t mode = parsePermString("drwxr-xr-x"); + atom.m_uds = UDS_FILE_TYPE; + atom.m_long = mode & S_IFMT; // keep file type only + entry.append( atom ); + atom.m_uds = UDS_ACCESS; + atom.m_long = mode & 07777; // keep permissions only + entry.append( atom ); + + root->append(entry); + + if( arcType == "bzip2" ){ + KRDEBUG("Got me here..."); + parseLine(0,"",temp.file()); + return true; + } + + // parse the temp file + temp.file()->open(IO_ReadOnly); + char buf[1000]; + QString line; + + int lineNo = 0; + bool invalidLine = false; + // the rar list is started with a ------ line. + if(arcType == "rar" || arcType == "arj" || arcType == "lha" || arcType == "7z" ){ + while(temp.file()->readLine(buf,1000) != -1){ + line = QString::fromLocal8Bit(buf); + if( line.startsWith("----------") ) break; + } + } + while(temp.file()->readLine(buf,1000) != -1) { + line = QString::fromLocal8Bit(buf); + if( arcType == "rar" ) { + // the rar list is ended with a ------ line. + if( line.startsWith("----------") ) { + invalidLine = !invalidLine; + continue; + } + if( invalidLine ) + continue; + else{ + temp.file()->readLine(buf,1000); + line = line+QString::fromLocal8Bit(buf); + if( line[0]=='*' ) // encrypted archives starts with '*' + line[0]=' '; + } + } + if( arcType == "ace" ) { + // the ace list begins with a number. + if( !line[0].isDigit() ) continue; + } + if( arcType == "arj" ) { + // the arj list is ended with a ------ line. + if( line.startsWith("----------") ) { + invalidLine = !invalidLine; + continue; + } + if( invalidLine ) + continue; + else { + temp.file()->readLine(buf,1000); + line = line+QString::fromLocal8Bit(buf); + temp.file()->readLine(buf,1000); + line = line+QString::fromLocal8Bit(buf); + temp.file()->readLine(buf,1000); + line = line+QString::fromLocal8Bit(buf); + } + } + if( arcType == "lha" || arcType == "7z" ) { + // the arj list is ended with a ------ line. + if( line.startsWith("----------") ) break; + } + parseLine(lineNo++,line.stripWhiteSpace(),temp.file()); + } + // close and delete our file + temp.file()->close(); + + archiveChanged = false; + return true; +} + +QString kio_krarcProtocol::findArcDirectory(const KURL& url){ + QString path = url.path(); + if( path.right(1) == "/" ) path.truncate(path.length()-1); + + if( !initDirDict(url) ){ + return QString::null; + } + QString arcDir = path.mid(arcFile->url().path().length()); + arcDir.truncate(arcDir.findRev("/")); + if(arcDir.right(1) != "/") arcDir = arcDir+"/"; + + return arcDir; +} + +UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){ + QString arcDir = findArcDirectory(url); + if( arcDir.isEmpty() ) return 0; + + UDSEntryList* dirList = dirDict.find(arcDir); + if( !dirList ){ + return 0; + } + QString name = url.path(); + if( arcFile->url().path(-1) == url.path(-1) ) name = "."; // the "/" case + else{ + if( name.right(1) == "/" ) name.truncate(name.length()-1); + name = name.mid(name.findRev("/")+1); + } + + UDSEntryList::iterator entry; + UDSEntry::iterator atom; + + for ( entry = dirList->begin(); entry != dirList->end(); ++entry ){ + for( atom = (*entry).begin(); atom != (*entry).end(); ++atom ){ + if( (*atom).m_uds == UDS_NAME ){ + if((*atom).m_str == name){ + return &(*entry); + } else break; + } + } + } + return 0; +} + +QString kio_krarcProtocol::nextWord(QString &s,char d) { + s=s.stripWhiteSpace(); + int j=s.find(d,0); + QString temp=s.left(j); // find the leftmost word. + s.remove(0,j); + return temp; +} + +mode_t kio_krarcProtocol::parsePermString(QString perm){ + mode_t mode=0; + // file type + if(perm[0] == 'd') mode |= S_IFDIR; + if(perm[0] == 'l') mode |= S_IFLNK; + if(perm[0] == '-') mode |= S_IFREG; + // owner permissions + if(perm[1] != '-') mode |= S_IRUSR; + if(perm[2] != '-') mode |= S_IWUSR; + if(perm[3] != '-') mode |= S_IXUSR; + // group permissions + if(perm[4] != '-') mode |= S_IRGRP; + if(perm[5] != '-') mode |= S_IWGRP; + if(perm[6] != '-') mode |= S_IXGRP; + // other permissions + if(perm[7] != '-') mode |= S_IROTH; + if(perm[8] != '-') mode |= S_IWOTH; + if(perm[9] != '-') mode |= S_IXOTH; + + return mode; +} + +UDSEntryList* kio_krarcProtocol::addNewDir(QString path){ + UDSEntryList* dir; + + // check if the current dir exists + dir = dirDict.find(path); + if(dir != 0) return dir; // dir exists- return it ! + + // set dir to the parent dir + dir = addNewDir(path.left(path.findRev("/",-2)+1)); + + // add a new entry in the parent dir + QString name = path.mid(path.findRev("/",-2)+1); + name = name.left(name.length()-1); + + UDSEntry entry; + UDSAtom atom; + atom.m_uds = UDS_NAME; + atom.m_str = name; + entry.append(atom); + + mode_t mode = parsePermString("drwxr-xr-x"); + + atom.m_uds = UDS_FILE_TYPE; + atom.m_long = mode & S_IFMT; // keep file type only + entry.append( atom ); + + atom.m_uds = UDS_ACCESS; + atom.m_long = mode & 07777; // keep permissions only + entry.append( atom ); + + atom.m_uds = UDS_SIZE; + atom.m_long = 0; + entry.append( atom ); + + atom.m_uds = UDS_MODIFICATION_TIME; + atom.m_long = arcFile->time(UDS_MODIFICATION_TIME); + entry.append( atom ); + + dir->append(entry); + + // create a new directory entry and add it.. + dir = new UDSEntryList(); + dirDict.insert(path,dir); + + return dir; +} + +void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) { + UDSEntryList* dir; + UDSEntry entry; + UDSAtom atom; + + QString owner = QString::null; + QString group = QString::null; + QString symlinkDest = QString::null; + QString perm = QString::null; + mode_t mode = 0666; + size_t size = 0; + time_t time = ::time(0); + QString fullName = QString::null; + + if(arcType == "zip"){ + // permissions + perm = nextWord(line); + // ignore the next 2 fields + nextWord(line); nextWord(line); + // size + size = nextWord(line).toLong(); + // ignore the next 2 fields + nextWord(line);nextWord(line); + // date & time + QString d = nextWord(line); + QDate qdate(d.mid(0,4).toInt(),d.mid(4,2).toInt(),d.mid(6,2).toInt()); + QTime qtime(d.mid(9,2).toInt(),d.mid(11,2).toInt(),d.mid(13,2).toInt()); + time = QDateTime(qdate,qtime).toTime_t(); + // full name + fullName = nextWord(line,'\n'); + + if(perm.length() != 10) + perm = (perm.at(0)=='d' || fullName.endsWith( "/" )) ? "drwxr-xr-x" : "-rw-r--r--" ; + mode = parsePermString(perm); + } + if(arcType == "rar") { + // full name + fullName = nextWord(line,'\n'); + // size + size = nextWord(line).toLong(); + // ignore the next 2 fields + nextWord(line); nextWord(line); + // date & time + QString d = nextWord(line); + int year = 1900 + d.mid(6,2).toInt(); + if( year < 1930 ) year+=100; + QDate qdate( year, d.mid(3,2).toInt(), d.mid(0,2).toInt() ); + QString t = nextWord(line); + QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0); + time = QDateTime(qdate,qtime).toTime_t(); + // permissions + perm = nextWord(line); + + if( perm.length() == 7 ) // windows rar permission format + { + bool isDir = ( perm.at(1).lower() == 'd' ); + bool isReadOnly = ( perm.at(2).lower() == 'r' ); + + perm = isDir ? "drwxr-xr-x" : "-rw-r--r--"; + + if( isReadOnly ) + perm.at( 2 ) = '-'; + } + + if(perm.length() != 10) perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ; + mode = parsePermString(perm); + } + if(arcType == "arj"){ + nextWord(line); + // full name + fullName = nextWord(line,'\n'); + // ignore the next 2 fields + nextWord(line); nextWord(line); + // size + size = nextWord(line).toLong(); + // ignore the next 2 fields + nextWord(line); nextWord(line); + // date & time + QString d = nextWord(line); + int year = 1900 + d.mid(0,2).toInt(); + if( year < 1930 ) year+=100; + QDate qdate( year, d.mid(3,2).toInt(), d.mid(6,2).toInt() ); + QString t = nextWord(line); + QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0); + time = QDateTime(qdate,qtime).toTime_t(); + // permissions + perm = nextWord(line); + if(perm.length() != 10) perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ; + mode = parsePermString(perm); + } + if(arcType == "rpm"){ + // full name + fullName = nextWord(line); + // size + size = nextWord(line).toULong(); + // date & time + time = nextWord(line).toULong(); + // next field is md5sum, ignore it + nextWord(line); + // permissions + mode = nextWord(line).toULong(0,8); + // Owner & Group + owner = nextWord(line); + group = nextWord(line); + // symlink destination + if( S_ISLNK(mode) ){ + // ignore the next 3 fields + nextWord(line); nextWord(line); nextWord(line); + symlinkDest = nextWord(line); + } + } + if( arcType == "gzip" ){ + if( !lineNo ) return; //ignore the first line + // first field is uncompressed size - ignore it + nextWord(line); + // size + size = nextWord(line).toULong(); + // ignore the next field + nextWord(line); + // full name + fullName = nextWord(line); + fullName = fullName.mid(fullName.findRev("/")+1); + } + if( arcType == "bzip2" ){ + // There is no way to list bzip2 files, so we take our information from + // the archive itself... + fullName = arcFile->name(); + if( fullName.endsWith("bz2") ) fullName.truncate(fullName.length()-4); + mode = arcFile->mode(); + size = arcFile->size(); + } + if(arcType == "lha"){ + // permissions + perm = nextWord(line); + if(perm.length() != 10) perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ; + mode = parsePermString(perm); + // ignore the next field + nextWord(line); + // size + size = nextWord(line).toLong(); + // ignore the next field + nextWord(line); + // date & time + int month = (QStringList::split(',', "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")).findIndex( nextWord(line) ) + 1; + int day = nextWord(line).toInt(); + int year = QDate::currentDate().year(); + QString third = nextWord(line); + QTime qtime; + + if( third.contains(":" ) ) + qtime = QTime::fromString( third ); + else + year = third.toInt(); + + QDate qdate(year, month, day ); + + time = QDateTime(qdate, qtime).toTime_t(); + // full name + fullName = nextWord(line,'\n'); + } + if(arcType == "ace"){ + // date & time + QString d = nextWord(line); + int year = 1900 + d.mid(6,2).toInt(); + if( year < 1930 ) year+=100; + QDate qdate( year, d.mid(3,2).toInt(), d.mid(0,2).toInt() ); + QString t = nextWord(line); + QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0); + time = QDateTime(qdate,qtime).toTime_t(); + // ignore the next field + nextWord(line); + // size + size = nextWord(line).toLong(); + // ignore the next field + nextWord(line); + // full name + fullName = nextWord(line,'\n'); + if( fullName[ 0 ] == '*' ) // encrypted archives starts with '*' + fullName = fullName.mid( 1 ); + } + if( arcType == "deb" ){ + // permissions + perm = nextWord( line ); + mode = parsePermString( perm ); + // Owner & Group + owner = nextWord( line,'/' ); + group = nextWord( line ).mid(1); + // size + size = nextWord( line ).toLong(); + // date & time + QString d = nextWord( line ); + QDate qdate( d.mid( 0, 4 ).toInt(), d.mid( 5, 2 ).toInt(), d.mid( 8, 2 ).toInt() ); + QString t = nextWord( line ); + QTime qtime( t.mid( 0, 2 ).toInt(), t.mid( 3, 2 ).toInt(), 0 ); + time = QDateTime( qdate, qtime ).toTime_t(); + // full name + fullName = nextWord( line, '\n' ).mid( 1 ); + //if ( fullName.right( 1 ) == "/" ) return; + if( fullName.contains("->") ){ + symlinkDest = fullName.mid(fullName.find("->")+2); + fullName = fullName.left(fullName.find("->")-1); + } + } + if(arcType == "7z"){ + // date & time + QString d = nextWord(line); + QDate qdate( d.mid(0,4).toInt(), d.mid(5,2).toInt(), d.mid(8,2).toInt() ); + QString t = nextWord(line); + QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),t.mid(6,2).toInt() ); + time = QDateTime(qdate,qtime).toTime_t(); + + // permissions + perm = nextWord(line); + bool isDir = ( perm.at(0).lower() == 'd' ); + bool isReadOnly = ( perm.at(1).lower() == 'r' ); + perm = isDir ? "drwxr-xr-x" : "-rw-r--r--"; + if( isReadOnly ) + perm.at( 2 ) = '-'; + + mode = parsePermString(perm); + + // size + size = nextWord(line).toLong(); + + // ignore the next 15 characters + line = line.mid( 15 ); + + // full name + fullName = nextWord(line,'\n'); + } + + if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1); + if( !fullName.startsWith("/") ) fullName = "/"+fullName; + QString path = fullName.left(fullName.findRev("/")+1); + // set/create the directory UDSEntryList + dir = dirDict.find(path); + if(dir == 0) dir = addNewDir(path); + QString name = fullName.mid(fullName.findRev("/")+1); + // file name + atom.m_uds = UDS_NAME; + atom.m_str = name; + entry.append(atom); + // file type + atom.m_uds = UDS_FILE_TYPE; + atom.m_long = mode & S_IFMT; // keep file type only + entry.append( atom ); + // file permissions + atom.m_uds = UDS_ACCESS; + atom.m_long = mode & 07777; // keep permissions only + entry.append( atom ); + // file size + atom.m_uds = UDS_SIZE; + atom.m_long = size; + entry.append( atom ); + // modification time + atom.m_uds = UDS_MODIFICATION_TIME; + atom.m_long = time; + entry.append( atom ); + // link destination + if( !symlinkDest.isEmpty() ){ + atom.m_uds = UDS_LINK_DEST; + atom.m_str = symlinkDest; + entry.append( atom ); + } + if( S_ISDIR(mode) ){ + fullName=fullName+"/"; + if(dirDict.find(fullName) == 0) + dirDict.insert(fullName,new UDSEntryList()); + else { + // try to overwrite an existing entry + UDSEntryList::iterator entryIt; + UDSEntry::iterator atomIt; + + for ( entryIt = dir->begin(); entryIt != dir->end(); ++entryIt ) + for( atomIt = (*entryIt).begin(); atomIt != (*entryIt).end(); ++atomIt ) + if( (*atomIt).m_uds == UDS_NAME ) + if((*atomIt).m_str == name) { + for( atomIt = (*entryIt).begin(); atomIt != (*entryIt).end(); ++atomIt ) { + switch( (*atomIt).m_uds ) { + case UDS_MODIFICATION_TIME: + (*atomIt).m_long = time; + break; + case UDS_ACCESS: + (*atomIt).m_long = mode & 07777; + break; + } + } + return; + } + return; // there is alreay an entry for this directory + } + } + + // multi volume archives can add a file twice, use only one + UDSEntryList::iterator dirEntryIt; + UDSEntry::iterator dirAtomIt; + for ( dirEntryIt = dir->begin(); dirEntryIt != dir->end(); ++dirEntryIt ) + for( dirAtomIt = (*dirEntryIt).begin(); dirAtomIt != (*dirEntryIt).end(); ++dirAtomIt ) + if( (*dirAtomIt).m_uds == UDS_NAME && (*dirAtomIt).m_str == name ) + return; + + dir->append(entry); +} + +bool kio_krarcProtocol::initArcParameters() { + KRDEBUG("arcType: "<\ndebian-binary " }, + {"7z", 0, "7z\xbc\xaf\x27\x1c" } }; + static int autoDetectElems = sizeof( autoDetectParams ) / sizeof( AutoDetectParams ); + + encrypted = false; + + QFile arcFile( fileName ); + if ( arcFile.open( IO_ReadOnly ) ) { + char buffer[ 1024 ]; + long sizeMax = arcFile.readBlock( buffer, sizeof( buffer ) ); + arcFile.close(); + + for( int i=0; i < autoDetectElems; i++ ) { + QString detectionString = autoDetectParams[ i ].detectionString; + int location = autoDetectParams[ i ].location; + + int endPtr = detectionString.length() + location; + if( endPtr > sizeMax ) + continue; + + unsigned int j=0; + for(; j != detectionString.length(); j++ ) { + if( detectionString[ j ] == '?' ) + continue; + if( buffer[ location + j ] != detectionString[ j ] ) + break; + } + + if( j == detectionString.length() ) { + QString type = autoDetectParams[ i ].type; + if( type == "bzip2" || type == "gzip" ) { + KTar tapeArchive( fileName ); + if( tapeArchive.open( IO_ReadOnly ) ) { + tapeArchive.close(); + if( type == "bzip2" ) + type = "tbz"; + else + type = "tgz"; + } + } + else if( type == "zip" ) + encrypted = (buffer[6] & 1); + else if( type == "arj" ) { + if( sizeMax > 4 ) { + long headerSize = ((unsigned char *)buffer)[ 2 ] + 256*((unsigned char *)buffer)[ 3 ]; + long fileHeader = headerSize + 10; + if( fileHeader + 9 < sizeMax && buffer[ fileHeader ] == (char)0x60 && buffer[ fileHeader + 1 ] == (char)0xea ) + encrypted = (buffer[ fileHeader + 8 ] & 1 ); + } + } + else if( type == "rar" ) { + if( sizeMax > 13 && buffer[ 9 ] == (char)0x73 ) { + if( buffer[ 10 ] & 0x80 ) { // the header is encrypted? + encrypted = true; + } else { + long offset = 7; + long mainHeaderSize = ((unsigned char *)buffer)[ offset+5 ] + 256*((unsigned char *)buffer)[ offset+6 ]; + offset += mainHeaderSize; + while( offset + 10 < sizeMax ) { + long headerSize = ((unsigned char *)buffer)[ offset+5 ] + 256*((unsigned char *)buffer)[ offset+6 ]; + bool isDir = (buffer[ offset+7 ] == '\0' ) && (buffer[ offset+8 ] == '\0' ) && + (buffer[ offset+9 ] == '\0' ) && (buffer[ offset+10 ] == '\0' ); + + if( buffer[ offset + 2 ] != (char)0x74 ) + break; + if( !isDir ) { + encrypted = ( buffer[ offset + 3 ] & 4 ) != 0; + break; + } + offset += headerSize; + } + } + } + } + else if( type == "ace" ) { + long offset = 0; + long mainHeaderSize = ((unsigned char *)buffer)[ offset+2 ] + 256*((unsigned char *)buffer)[ offset+3 ] + 4; + offset += mainHeaderSize; + while( offset + 10 < sizeMax ) { + long headerSize = ((unsigned char *)buffer)[ offset+2 ] + 256*((unsigned char *)buffer)[ offset+3 ] + 4; + bool isDir = (buffer[ offset+11 ] == '\0' ) && (buffer[ offset+12 ] == '\0' ) && + (buffer[ offset+13 ] == '\0' ) && (buffer[ offset+14 ] == '\0' ); + + if( buffer[ offset + 4 ] != (char)0x01 ) + break; + if( !isDir ) { + encrypted = ( buffer[ offset + 6 ] & 64 ) != 0; + break; + } + offset += headerSize; + } + } + else if( type == "7z" ) { + if( encryptedArchPath == fileName ) + encrypted = true; + else { // we try to find whether the 7z archive is encrypted + // this is hard as the headers are also compresseds + QString tester = fullPathName( "7z" ); + if( KStandardDirs::findExe( tester ).isEmpty() ) { + tester = fullPathName( "7za" ); + if( KStandardDirs::findExe( tester ).isEmpty() ) { + return type; + } + } + + QString testCmd = tester + " t -y "; + lastData = encryptedArchPath = ""; + + KrShellProcess proc; + proc << testCmd << convertName( fileName ); + connect( &proc, SIGNAL( receivedStdout(KProcess*,char*,int) ), + this, SLOT( checkOutputForPassword( KProcess*,char*,int ) ) ); + proc.start(KProcess::Block,KProcess::AllOutput); + encrypted = this->encrypted; + + if( encrypted ) + encryptedArchPath = fileName; + } + } + return type; + } + } + + if( sizeMax >= 512 ) { + /* checking if it's a tar file */ + unsigned checksum = 32*8; + char chksum[ 9 ]; + for( int i=0; i != 512; i++ ) + checksum += ((unsigned char *)buffer)[ i ]; + for( int i=148; i != 156; i++ ) + checksum -= ((unsigned char *)buffer)[ i ]; + sprintf( chksum, "0%o", checksum ); + if( !memcmp( buffer + 148, chksum, strlen( chksum ) ) ) { + int k = strlen( chksum ); + for(; k < 8; k++ ) + if( buffer[148+k] != 0 && buffer[148+k] != 32 ) + break; + if( k==8 ) + return "tar"; + } + } + } + return QString::null; +} + +void kio_krarcProtocol::checkOutputForPassword( KProcess *proc,char *buf,int len ) { + QByteArray d(len); + d.setRawData(buf,len); + QString data = QString( d ); + d.resetRawData(buf,len); + + QString checkable = lastData + data; + + QStringList lines = QStringList::split( '\n', checkable ); + lastData = lines[ lines.count() - 1 ]; + for( unsigned i=0; i != lines.count(); i++ ) { + QString line = lines[ i ].stripWhiteSpace().lower(); + int ndx = line.find( "testing" ); + if( ndx >=0 ) + line.truncate( ndx ); + if( line.isEmpty() ) + continue; + + if( line.contains( "password" ) && line.contains( "enter" ) ) { + KRDEBUG( "Encrypted 7z archive found!" ); + encrypted = true; + proc->kill(); + } + } +} + +void kio_krarcProtocol::invalidatePassword() { + KRDEBUG( arcFile->url().path(-1) + "/" ); + + if( !encrypted ) + return; + + KIO::AuthInfo authInfo; + authInfo.caption= i18n( "Krarc Password Dialog" ); + authInfo.username= "archive"; + authInfo.readOnly = true; + authInfo.keepPassword = true; + authInfo.verifyPath = true; + QString fileName = arcFile->url().path(-1); + authInfo.url = KURL::fromPathOrURL( "/" ); + authInfo.url.setHost( fileName /*.replace('/','_')*/ ); + authInfo.url.setProtocol( "krarc" ); + + password = QString::null; + + cacheAuthentication( authInfo ); +} + +QString kio_krarcProtocol::getPassword() { + KRDEBUG( encrypted ); + + if( !password.isNull() ) + return password; + if( !encrypted ) + return (password = "" ); + + KIO::AuthInfo authInfo; + authInfo.caption= i18n( "Krarc Password Dialog" ); + authInfo.username= "archive"; + authInfo.readOnly = true; + authInfo.keepPassword = true; + authInfo.verifyPath = true; + QString fileName = arcFile->url().path(-1); + authInfo.url = KURL::fromPathOrURL( "/" ); + authInfo.url.setHost( fileName /*.replace('/','_')*/ ); + authInfo.url.setProtocol( "krarc" ); + + if( checkCachedAuthentication( authInfo ) && !authInfo.password.isNull() ) { + KRDEBUG( authInfo.password ); + return ( password = authInfo.password ); + } + + authInfo.password = QString::null; + + if ( openPassDlg( authInfo, i18n("Accessing the file requires password.") ) && !authInfo.password.isNull() ) { + KRDEBUG( authInfo.password ); + return ( password = authInfo.password ); + } + + KRDEBUG( password ); + return password; +} + +QString kio_krarcProtocol::fullPathName( QString name ) { + QString supposedName = krConfig->readEntry( name, name ); + if( supposedName.isEmpty() ) + supposedName = name; + return escape( supposedName ); +} + +QString kio_krarcProtocol::convertFileName( QString name ) { + if( arcType == "zip" ) + name = name.replace( "[", "[[]" ); + return convertName( name ); +} + +QString kio_krarcProtocol::convertName( QString name ) { + if( !name.contains( '\'' ) ) + return "'" + name + "'"; + if( !name.contains( '"' ) && !name.contains( '$' ) ) + return "\"" + name + "\""; + return escape( name ); +} + +QString kio_krarcProtocol::escape( QString name ) { + const QString evilstuff = "\\\"'`()[]{}!?;$&<>| "; // stuff that should get escaped + + for ( unsigned int i = 0; i < evilstuff.length(); ++i ) + name.replace( evilstuff[ i ], ('\\' + evilstuff[ i ]) ); + + return name; +} + +#include "krarc.moc" diff --git a/krArc/krarc.h b/krArc/krarc.h new file mode 100644 index 0000000..9c6078c --- /dev/null +++ b/krArc/krarc.h @@ -0,0 +1,142 @@ +/*************************************************************************** + krarc.h + ------------------- + begin : Sat Jun 14 14:42:49 IDT 2003 + copyright : (C) 2003 by Rafi Yanai & Shie Erlich + email : yanai@users.sf.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#ifndef __krarc_h__ +#define __krarc_h__ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +class KProcess; +class KFileItem; +class QCString; + +class kio_krarcProtocol : public QObject, public KIO::SlaveBase { +Q_OBJECT +public: + kio_krarcProtocol(const QCString &pool_socket, const QCString &app_socket); + virtual ~kio_krarcProtocol(); + virtual void stat( const KURL & url ); + virtual void get(const KURL& url); + virtual void put(const KURL& url,int permissions,bool overwrite,bool resume); + virtual void mkdir(const KURL& url,int permissions); + virtual void listDir(const KURL& url); + virtual void del(KURL const & url, bool isFile); + virtual void copy (const KURL &src, const KURL &dest, int permissions, bool overwrite); + +public slots: + void receivedData(KProcess* proc,char* buf,int len); + void checkOutputForPassword( KProcess*,char*,int ); + +protected: + virtual bool initDirDict(const KURL& url,bool forced = false); + virtual bool initArcParameters(); + QString detectArchive( bool &encrypted, QString fileName ); + virtual void parseLine(int lineNo, QString line, QFile* temp); + virtual bool setArcFile(const KURL& url); + virtual QString getPassword(); + virtual void invalidatePassword(); + + // archive specific commands + QString cmd; ///< the archiver name. + QString listCmd; ///< list files. + QString getCmd; ///< unpack files command. + QString delCmd; ///< delete files command. + QString putCmd; ///< add file command. + QString copyCmd; ///< copy to file command. + +private: + void get(const KURL& url, int tries); + /** checks if the exit code is OK. */ + bool checkStatus( int exitCode ); + /** service function for parseLine. */ + QString nextWord(QString &s,char d=' '); + /** translate permittion string to mode_t. */ + mode_t parsePermString(QString perm); + /** return the name of the directory inside the archive. */ + QString findArcDirectory(const KURL& url); + /** find the UDSEntry of a file in a directory. */ + KIO::UDSEntry* findFileEntry(const KURL& url); + /** add a new directory (file list container). */ + KIO::UDSEntryList* addNewDir(QString path); + QString fullPathName( QString name ); + QString convertFileName( QString name ); + static QString convertName( QString name ); + static QString escape( QString name ); + + QDict dirDict; //< the directoris data structure. + bool encrypted; //< tells whether the archive is encrypted + bool archiveChanged; //< true if the archive was changed. + bool archiveChanging; //< true if the archive is currently changing. + bool newArchiveURL; //< true if new archive was entered for the protocol + KIO::filesize_t decompressedLen; //< the number of the decompressed bytes + KFileItem* arcFile; //< the archive file item. + QString arcPath; //< the archive location + QString arcTempDir; //< the currently used temp directory. + QString arcType; //< the archive type. + bool extArcReady; //< Used for RPM & DEB files. + QString password; //< Password for the archives + KConfig *krConfig; //< The configuration file for krusader + + QString lastData; + QString encryptedArchPath; +}; + +class KrShellProcess : public KShellProcess { + Q_OBJECT +public: + KrShellProcess() : KShellProcess(), errorMsg( QString::null ), outputMsg( QString::null ) { + connect(this,SIGNAL(receivedStderr(KProcess*,char*,int)), + this,SLOT(receivedErrorMsg(KProcess*,char*,int)) ); + connect(this,SIGNAL(receivedStdout(KProcess*,char*,int)), + this,SLOT(receivedOutputMsg(KProcess*,char*,int)) ); + } + + QString getErrorMsg() { + if( errorMsg.stripWhiteSpace().isEmpty() ) + return outputMsg.right( 500 ); + else + return errorMsg.right( 500 ); + } + +public slots: + void receivedErrorMsg(KProcess*, char *buf, int len) { + errorMsg += QString::fromLocal8Bit( buf, len ); + if( errorMsg.length() > 500 ) + errorMsg = errorMsg.right( 500 ); + receivedOutputMsg( 0, buf, len ); + } + + void receivedOutputMsg(KProcess*, char *buf, int len) { + outputMsg += QString::fromLocal8Bit( buf, len ); + if( outputMsg.length() > 500 ) + outputMsg = outputMsg.right( 500 ); + } + +private: + QString errorMsg; + QString outputMsg; +}; + +#endif diff --git a/krArc/krarc.protocol b/krArc/krarc.protocol new file mode 100644 index 0000000..fec5796 --- /dev/null +++ b/krArc/krarc.protocol @@ -0,0 +1,17 @@ +[Protocol] +exec=kio_krarc +protocol=krarc +mimetype=application/x-archive +input=filesystem +output=filesystem +listing=Name,Type,Size,Date,Access,Owner,Group,Link +reading=true +writing=true +makedir=true +deleting=true +source=true +linking=false +moving=false +copyToFile=true +Icon=ark +Description=Mutiple archive handler that currently supports: zip,rar. diff --git a/krusader-1.40.info b/krusader-1.40.info new file mode 100644 index 0000000..446e90e --- /dev/null +++ b/krusader-1.40.info @@ -0,0 +1,13 @@ +Package: krusader +Version: 1.40 +Revision: 1 +Source: mirror:sourceforge:%n/%n-%v.tar.gz +Depends: kdelibs3-ssl (>= 3.1.4-11) | kdelibs3 (>= 3.1.4-11), qt3-shlibs (>= 3.2.1-11) +BuildDepends: autoconf2.54, automake1.6, cctools (>= 446-1), kdelibs3-ssl-dev (>= 3.1.4-11) | kdelibs3-dev (>= 3.1.4-11), libtool14, qt3 (>= 3.2.1-11) +Maintainer: Jonas Bähr +Homepage: http://krusader.sourceforge.net/ +License: GPL +Description: Twinpanel (commander-style) filemanager +Source-MD5: 9fe6f4ccdd9b8a5a1ff2e331ba449ff8 +ConfigureParams: --with-qt-includes=%{p}/include/qt --without-arts --mandir=%{p}/share/man +DocFiles: AUTHORS COPYING CVSNEWS Changelog README diff --git a/krusader-1.50.info b/krusader-1.50.info new file mode 100644 index 0000000..7f19d6b --- /dev/null +++ b/krusader-1.50.info @@ -0,0 +1,13 @@ +Package: krusader +Version: 1.50 +Revision: 1 +Source: mirror:sourceforge:%n/%n-%v.tar.gz +Depends: kdelibs3-ssl (>= 3.2) | kdelibs3 (>= 3.2), qt3-shlibs (>= 3.2) +BuildDepends: autoconf2.54, automake1.6, cctools (>= 446-1), kdelibs3-ssl-dev (>= 3.2) | kdelibs3-dev (>= 3.2), libtool14, qt3 (>= 3.2) +Maintainer: Jonas Bähr +Homepage: http://krusader.sourceforge.net/ +License: GPL +Description: Twinpanel (commander-style) filemanager +Source-MD5: 24f86f89aa8fc10afa64afe9b966ca94 +ConfigureParams: --with-qt-includes=%{p}/include/qt --without-arts --mandir=%{p}/share/man +DocFiles: AUTHORS COPYING CVSNEWS Changelog README diff --git a/krusader-1.60.info b/krusader-1.60.info new file mode 100644 index 0000000..ecfe2ea --- /dev/null +++ b/krusader-1.60.info @@ -0,0 +1,13 @@ +Package: krusader +Version: 1.60.0 +Revision: 1 +Source: mirror:sourceforge:%n/%n-%v.tar.gz +Depends: kdelibs3-ssl (>= 3.4) | kdelibs3 (>= 3.4), qt3-shlibs (>= 3.2) +BuildDepends: autoconf2.5, automake1.9, cctools (>= 446-1), kdelibs3-ssl-dev (>= 3.2) | kdelibs3-dev (>= 3.2), libtool14, qt3 (>= 3.2) +Maintainer: Bodo Tasche +Homepage: http://krusader.sourceforge.net/ +License: GPL +Description: Twinpanel (commander-style) filemanager +Source-MD5: 95f7900799bbd2810e6ac06fbf628536 +ConfigureParams: --with-qt-includes=%{p}/include/qt --without-arts --mandir=%{p}/share/man +DocFiles: AUTHORS COPYING CVSNEWS Changelog README diff --git a/krusader-1.70.info b/krusader-1.70.info new file mode 100644 index 0000000..b61d973 --- /dev/null +++ b/krusader-1.70.info @@ -0,0 +1,13 @@ +Package: krusader +Version: 1.70.0 +Revision: 1 +Source: mirror:sourceforge:%n/%n-%v.tar.gz +Depends: kdelibs3-ssl (>= 3.4) | kdelibs3 (>= 3.4), qt3-shlibs (>= 3.2) +BuildDepends: autoconf2.5, automake1.9, cctools (>= 446-1), kdelibs3-ssl-dev (>= 3.2) | kdelibs3-dev (>= 3.2), libtool14, qt3 (>= 3.2) +Maintainer: Jonas Baehr +Homepage: http://krusader.sourceforge.net/ +License: GPL +Description: Twinpanel (commander-style) filemanager +Source-MD5: 3c2d73637c72e1042fef52ad1a336a64 +ConfigureParams: --with-qt-includes=%{p}/include/qt --without-arts --mandir=%{p}/share/man +DocFiles: AUTHORS COPYING CVSNEWS Changelog README diff --git a/krusader-1.80.info b/krusader-1.80.info new file mode 100644 index 0000000..9d783a9 --- /dev/null +++ b/krusader-1.80.info @@ -0,0 +1,18 @@ +Package: krusader +Version: 1.80.0-beta2 +Revision: 3 +Source: mirror:sourceforge:%n/%n-%v.tar.gz +PatchFile: %n.patch +PatchScript: patch -p0 < %{PatchFile} +PatchFile-MD5: d02c7d2fd46873e5130ccb074824c7ff +GCC: 4.0 +Depends: kdelibs3-unified, qt3-shlibs (>= 3.2), kdebase3-unified-shlibs, x11 +BuildDepends: autoconf2.5, automake1.9, cctools (>= 446-1), kdelibs3-unified-dev, libtool14, qt3 (>= 3.2), fink ( >= 0.24.12), libjpeg, pcre, libart2, libidn, libgettext3-dev, libiconv-dev, libpng3, kdebase3-unified-dev, kjsembed-dev, freetype219 +Maintainer: Jonas Baehr +Homepage: http://krusader.sourceforge.net/ +License: GPL +Description: Twinpanel (commander-style) filemanager +Source-MD5: 2766071dea2fbf5c3abd6de8946c0a08 +ConfigureParams: --with-qt-includes=%{p}/include/qt --without-arts --mandir=%{p}/share/man --with-qt-dir=%{p} --with-qt-includes=%{p}/include/qt --without-acl --disable-dependency-tracking +InstallScript: make install DESTDIR=%d +DocFiles: AUTHORS COPYING CVSNEWS ChangeLog README diff --git a/krusader.SlackBuild b/krusader.SlackBuild new file mode 100755 index 0000000..fb8bfaa --- /dev/null +++ b/krusader.SlackBuild @@ -0,0 +1,134 @@ +#!/bin/sh +# Slackware build script for krusader: http://krusader.sourceforge.net +# +# Copyright 2006-2007 Matas A. Fonzo, +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +CWD=$(pwd) +TMP=${TMP:-/tmp/pkgs} + +VERSION=1.80.0 +ARCH=${ARCH:-i486} +BUILD=1 + +if [ -z "$SLKCFLAGS" ]; then + if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + fi +fi + +# Number of jobs to compile at once: +if [ -z "$NUMJOBS" ]; then + NUMJOBS=-j5 +fi + +# Avoid a version number in .la files: +if [ -d /usr/lib/qt ]; then + QTDIR=/usr/lib/qt +fi + +PKG=$TMP/package-krusader +rm -rf $PKG +mkdir -p $PKG + +cd $TMP +rm -rf krusader-$VERSION +echo "Building krusader-$VERSION.tar.gz..." +tar xvfz $CWD/krusader-$VERSION.tar.gz || exit 1 +cd krusader-$VERSION + +# Make sure ownerships and permissions are sane: +chown -R root:root . +find . -perm 666 -exec chmod 644 {} \; +find . -perm 664 -exec chmod 644 {} \; +find . -perm 600 -exec chmod 644 {} \; +find . -perm 444 -exec chmod 644 {} \; +find . -perm 400 -exec chmod 644 {} \; +find . -perm 440 -exec chmod 644 {} \; +find . -perm 777 -exec chmod 755 {} \; +find . -perm 775 -exec chmod 755 {} \; +find . -perm 511 -exec chmod 755 {} \; +find . -perm 711 -exec chmod 755 {} \; +find . -perm 555 -exec chmod 755 {} \; + +# Configure: +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc/kde \ + --mandir=/usr/man \ + --disable-debug \ + --program-prefix="" \ + --program-suffix="" \ + --build=$ARCH-slackware-linux + +# Build and install: +make $NUMJOBS || exit 1 +make install DESTDIR=$PKG + +# Strip binaries and libraries: +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +# Compress and link manpages: +( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $(find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.* + ) + done +) + +# Compress info files, if any: +if [ -d $PKG/usr/info ]; then + ( cd $PKG/usr/info + rm -f dir + gzip -9 * + ) +fi + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/krusader-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL README FAQ TODO CVSNEWS krusader.lsm doc/actions_tutorial.txt \ + $PKG/usr/doc/krusader-$VERSION +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +makepkg -l y -c n $TMP/krusader-$VERSION-$ARCH-$BUILD.tgz + +# Final touches: +( cd $TMP ; cat $PKG/install/slack-desc | grep "^krusader:" > krusader-$VERSION-$ARCH-$BUILD.txt ) + +# Clean up the extra stuff: +if [ "$1" = "--cleanup" -o "$1" = "-c" ]; then + rm -rf $TMP/krusader-$VERSION + rm -rf $PKG +fi diff --git a/krusader.kdevprj b/krusader.kdevprj new file mode 100644 index 0000000..9878d07 --- /dev/null +++ b/krusader.kdevprj @@ -0,0 +1,1958 @@ +[AUTHORS] +dist=true +install=false +install_location= +type=DATA + +[COPYING] +dist=true +install=false +install_location= +type=DATA + +[ChangeLog] +dist=true +install=false +install_location= +type=DATA + +[Config for BinMakefileAm] +addcxxflags=-DKDE_NO_COMPAT -DQT_NO_ASCII_CAST -D_LARGEFILE64_SOURCE +bin_program=krusader +cflags=-DKDE_NO_COMPAT -D_LARGEFILE64_SOURCE +cppflags=-DKDE_NO_COMPAT -D_LARGEFILE64_SOURCE +cxxflags=\s-O0 -Wall +ldadd=UserMenu/libUserMenu.a VFS/libVFS.a KViewer/libKViewer.a Dialogs/libDialogs.a BookMan/libBookMan.a GUI/libGUI.a $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) +ldflags=\s \s + +[General] +AMChanged=true +author=Shie Erlich & Rafi Yanai +configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s +email= +kdevprj_version=1.3 +lfv_open_groups= +make_options=\s-j1 +makefiles=Makefile.am,krusader/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am,pics/Makefile.am,doc/pics/Makefile.am,krusader/BookMan/Makefile.am,krusader/Dialogs/Makefile.am,krusader/GUI/Makefile.am,krusader/Konfigurator/Makefile.am,krusader/KViewer/Makefile.am,krusader/MountMan/Makefile.am,krusader/Panel/Makefile.am,krusader/RemoteMan/Makefile.am,krusader/VFS/Makefile.am,krusader/Search/Makefile.am,krusader/Splitter/Makefile.am,krusader/Synchronizer/Makefile.am,krusader/UserMenu/Makefile.am,krusader/Locate/Makefile.am +modifyMakefiles=true +project_name=Krusader +project_type=mini_kde2 +short_info= +sub_dir=krusader/ +version=1.40-beta1 +version_control=None +workspace=1 + +[INSTALL] +dist=true +install=false +install_location= +type=DATA + +[LFV Groups] +Docs=*.sgml,*.docbook +GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS +Headers=*.h,*.hh,*.hxx,*.hpp,*.H +Others=* +Pics=*.png,*.jpeg,*.jpg +Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l +Translations=*.po +User Interface=*.kdevdlg,*.ui,*.rc,*.dlg +groups=Docs,Pics,Headers,Sources,User Interface,Translations,GNU,Others + +[Makefile.am] +files=krusader.kdevprj,admin,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,krusader.lsm,krusader.spec +sub_dirs=krusader,po,pics,doc,krArc,iso +type=normal + +[README] +dist=true +install=false +install_location= +type=DATA + +[TODO] +dist=true +install=false +install_location= +type=DATA + +[admin] +dist=true +install=false +install_location= +type=DATA + +[doc/Makefile.am] +files=doc/krusader.1 +sub_dirs=en,pics +type=normal + +[doc/en/Makefile.am] +files=doc/en/commands.sgml,doc/en/credits.sgml,doc/en/faq.sgml,doc/en/index.docbook,doc/en/installation.sgml,doc/en/introduction.sgml,doc/en/konfigurator.sgml,doc/en/krusader-tools.sgml,doc/en/using-krusader.sgml +sub_dirs= +type=normal + +[doc/en/commands.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/credits.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/faq.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/index.docbook] +dist=true +install=false +install_location= +type=DATA + +[doc/en/installation.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/introduction.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/konfigurator.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/krusader-tools.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/en/using-krusader.sgml] +dist=true +install=false +install_location= +type=DATA + +[doc/krusader.1] +dist=true +install=true +install_location=$$(mandir)/man1/krusader.1 +type=DATA + +[doc/pics/Makefile.am] +files=doc/pics/bookmanadd.png,doc/pics/bookmanedit.png,doc/pics/cmdline.png,doc/pics/fnkeys.png,doc/pics/kgadvanced.png,doc/pics/kgarchives.png,doc/pics/kggeneral.png,doc/pics/kglookfeel.png,doc/pics/kgstartup.png,doc/pics/krusader1.png,doc/pics/listpanel.png,doc/pics/mainwindow.png,doc/pics/mountman.png,doc/pics/remoteman.png,doc/pics/search_advanced.png,doc/pics/search_general.png,doc/pics/terminalEmu.png,doc/pics/toolbar.png,doc/pics/tabbed_browsing.png,doc/pics/krusader_title.png +sub_dirs= +type=normal + +[doc/pics/bookmanadd.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/bookmanadd.png +type=DATA + +[doc/pics/bookmanedit.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/bookmanedit.png +type=DATA + +[doc/pics/cmdline.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/cmdline.png +type=DATA + +[doc/pics/fnkeys.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/fnkeys.png +type=DATA + +[doc/pics/kgadvanced.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/kgadvanced.png +type=DATA + +[doc/pics/kgarchives.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/kgarchives.png +type=DATA + +[doc/pics/kggeneral.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/kggeneral.png +type=DATA + +[doc/pics/kglookfeel.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/kglookfeel.png +type=DATA + +[doc/pics/kgstartup.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/kgstartup.png +type=DATA + +[doc/pics/krusader1.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/krusader1.png +type=DATA + +[doc/pics/krusader_title.png] +dist=true +install=false +install_location= +type=DATA + +[doc/pics/listpanel.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/listpanel.png +type=DATA + +[doc/pics/mainwindow.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/mainwindow.png +type=DATA + +[doc/pics/mountman.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/mountman.png +type=DATA + +[doc/pics/remoteman.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/remoteman.png +type=DATA + +[doc/pics/search_advanced.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/search_advanced.png +type=DATA + +[doc/pics/search_general.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/search_general.png +type=DATA + +[doc/pics/tabbed_browsing.png] +dist=true +install=false +install_location= +type=DATA + +[doc/pics/terminalEmu.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/terminalEmu.png +type=DATA + +[doc/pics/toolbar.png] +dist=true +install=true +install_location=$$(kde_htmldir)/en/krusader/toolbar.png +type=DATA + +[krusader.kdevprj] +dist=true +install=false +install_location= +type=DATA + +[krusader.lsm] +dist=true +install=false +install_location= +type=DATA + +[krusader.spec] +dist=true +install=false +install_location= +type=DATA + +[krusader/16-blue-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/16x16/apps/krusader.png +type=DATA + +[krusader/16-red-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/16x16/apps/krusader_red.png +type=DATA + +[krusader/22-blue-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/22x22/apps/krusader.png +type=DATA + +[krusader/22-red-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/22x22/apps/krusader_red.png +type=DATA + +[krusader/32-blue-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/32x32/apps/krusader.png +type=DATA + +[krusader/32-red-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/32x32/apps/krusader_red.png +type=DATA + +[krusader/48-blue-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/48x48/apps/krusader.png +type=DATA + +[krusader/48-red-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/48x48/apps/krusader_red.png +type=DATA + +[krusader/64-blue-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/64x64/apps/krusader.png +type=DATA + +[krusader/64-red-krusader.png] +dist=true +install=true +install_location=$$(kde_icondir)/hicolor/64x64/apps/krusader_red.png +type=DATA + +[krusader/BookMan/Makefile.am] +files=krusader/BookMan/addbookmarkdlg.cpp,krusader/BookMan/addbookmarkdlg.h,krusader/BookMan/addbookmarkform.ui,krusader/BookMan/bookmarksbutton.cpp,krusader/BookMan/bookmarksbutton.h,krusader/BookMan/kbookmarkhandler.cpp,krusader/BookMan/kbookmarkhandler.h,krusader/BookMan/kbookmarkmanager.h,krusader/BookMan/kbookmarkmenu.cpp,krusader/BookMan/kbookmarkmenu.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=BookMan +sub_dirs= +type=static_library + +[krusader/BookMan/addbookmarkdlg.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/BookMan/addbookmarkdlg.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/BookMan/addbookmarkform.ui] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/BookMan/bookmarksbutton.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/BookMan/bookmarksbutton.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/BookMan/kbookmarkhandler.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/BookMan/kbookmarkhandler.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/BookMan/kbookmarkmanager.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/BookMan/kbookmarkmenu.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/BookMan/kbookmarkmenu.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/Makefile.am] +files=krusader/Dialogs/colormaskdialogbase.cpp,krusader/Dialogs/colormaskdialogbase.h,krusader/Dialogs/colormaskdialog.cpp,krusader/Dialogs/colormaskdialog.h,krusader/Dialogs/krdialogs.cpp,krusader/Dialogs/krdialogs.h,krusader/Dialogs/krmaskchoice.cpp,krusader/Dialogs/krmaskchoice.h,krusader/Dialogs/krpleasewait.cpp,krusader/Dialogs/krpleasewait.h,krusader/Dialogs/krspecialwidgets.cpp,krusader/Dialogs/krspecialwidgets.h,krusader/Dialogs/krspwidgets.cpp,krusader/Dialogs/krspwidgets.h,krusader/Dialogs/newftpgui.cpp,krusader/Dialogs/newftpgui.h,krusader/Dialogs/packguibase.cpp,krusader/Dialogs/packguibase.h,krusader/Dialogs/packgui.cpp,krusader/Dialogs/packgui.h,krusader/Dialogs/krprogress.cpp,krusader/Dialogs/krprogress.h,krusader/Dialogs/krsqueezedtextlabel.cpp,krusader/Dialogs/krsqueezedtextlabel.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=Dialogs +sub_dirs= +type=static_library + +[krusader/Dialogs/colormaskdialog.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/colormaskdialog.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/colormaskdialogbase.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/colormaskdialogbase.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krdialogs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krdialogs.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krmaskchoice.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krmaskchoice.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krpleasewait.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krpleasewait.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krprogress.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krprogress.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krspecialwidgets.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krspecialwidgets.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krspwidgets.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krspwidgets.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/krsqueezedtextlabel.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/krsqueezedtextlabel.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/newftpgui.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/newftpgui.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/packgui.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/packgui.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Dialogs/packguibase.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Dialogs/packguibase.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/GUI/Makefile.am] +files=krusader/GUI/kcmdline.cpp,krusader/GUI/kcmdline.h,krusader/GUI/kfnkeys.cpp,krusader/GUI/kfnkeys.h,krusader/GUI/krusaderstatus.cpp,krusader/GUI/krusaderstatus.h,krusader/GUI/dirhistorybutton.cpp,krusader/GUI/dirhistorybutton.h,krusader/GUI/dirhistoryqueue.cpp,krusader/GUI/dirhistoryqueue.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=GUI +sub_dirs= +type=static_library + +[krusader/GUI/dirhistorybutton.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/GUI/dirhistorybutton.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/GUI/dirhistoryqueue.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/GUI/dirhistoryqueue.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/GUI/kcmdline.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/GUI/kcmdline.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/GUI/kfnkeys.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/GUI/kfnkeys.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/GUI/krusaderstatus.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/GUI/krusaderstatus.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/KViewer/Makefile.am] +files=krusader/KViewer/krviewer.cpp,krusader/KViewer/krviewer.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=KViewer +sub_dirs= +type=static_library + +[krusader/KViewer/krviewer.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/KViewer/krviewer.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/Makefile.am] +files=krusader/Konfigurator/kgadvanced.cpp,krusader/Konfigurator/kgadvanced.h,krusader/Konfigurator/kgarchives.cpp,krusader/Konfigurator/kgarchives.h,krusader/Konfigurator/kggeneral.cpp,krusader/Konfigurator/kggeneral.h,krusader/Konfigurator/kglookfeel.cpp,krusader/Konfigurator/kglookfeel.h,krusader/Konfigurator/kgstartup.cpp,krusader/Konfigurator/kgstartup.h,krusader/Konfigurator/kgwelcome.cpp,krusader/Konfigurator/kgwelcome.h,krusader/Konfigurator/konfigurator.cpp,krusader/Konfigurator/konfigurator.h,krusader/Konfigurator/konfiguratoritems.cpp,krusader/Konfigurator/konfiguratoritems.h,krusader/Konfigurator/konfiguratorpage.cpp,krusader/Konfigurator/konfiguratorpage.h,krusader/Konfigurator/kgdependencies.h,krusader/Konfigurator/kgdependencies.cpp,krusader/Konfigurator/kgcolors.cpp,krusader/Konfigurator/kgcolors.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=Konfigurator +sub_dirs= +type=static_library + +[krusader/Konfigurator/kgadvanced.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kgadvanced.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kgarchives.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kgarchives.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kgcolors.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kgcolors.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kgdependencies.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kgdependencies.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kggeneral.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kggeneral.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kglookfeel.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kglookfeel.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kgstartup.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kgstartup.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/kgwelcome.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/kgwelcome.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/konfigurator.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/konfigurator.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/konfiguratoritems.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/konfiguratoritems.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Konfigurator/konfiguratorpage.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Konfigurator/konfiguratorpage.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Locate/Makefile.am] +files=krusader/Locate/locate.cpp,krusader/Locate/locate.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=Locate +sub_dirs= +type=static_library + +[krusader/Locate/locate.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Locate/locate.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Makefile.am] +files=krusader/krusader.desktop,krusader/defaults.h,krusader/kicons.cpp,krusader/kicons.h,krusader/krslots.cpp,krusader/krslots.h,krusader/krusader.cpp,krusader/krusader.h,krusader/krusaderui.rc,krusader/krusaderview.cpp,krusader/krusaderview.h,krusader/main.cpp,krusader/resources.h,krusader/x-ace.desktop,krusader/krservices.cpp,krusader/krservices.h,krusader/panelmanager.cpp,krusader/panelmanager.h,krusader/paneltabbar.cpp,krusader/paneltabbar.h,krusader/16-blue-krusader.png,krusader/22-blue-krusader.png,krusader/32-blue-krusader.png,krusader/48-blue-krusader.png,krusader/64-blue-krusader.png,krusader/16-red-krusader.png,krusader/22-red-krusader.png,krusader/32-red-krusader.png,krusader/48-red-krusader.png,krusader/64-red-krusader.png +sub_dirs=BookMan,Dialogs,GUI,Konfigurator,KViewer,MountMan,Panel,RemoteMan,VFS,Search,Splitter,Synchronizer,UserMenu,Locate +type=prog_main + +[krusader/MountMan/Makefile.am] +files=krusader/MountMan/kmountman.cpp,krusader/MountMan/kmountmangui.cpp,krusader/MountMan/kmountmangui.h,krusader/MountMan/kmountman.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=MountMan +sub_dirs= +type=static_library + +[krusader/MountMan/kmountman.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/MountMan/kmountman.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/MountMan/kmountmangui.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/MountMan/kmountmangui.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/Makefile.am] +files=krusader/Panel/listpanel.cpp,krusader/Panel/panelfunc.cpp,krusader/Panel/panelfunc.h,krusader/Panel/listpanel.h,krusader/Panel/krdetailedview.cpp,krusader/Panel/krdetailedview.h,krusader/Panel/krdetailedviewitem.cpp,krusader/Panel/krdetailedviewitem.h,krusader/Panel/krview.cpp,krusader/Panel/krview.h,krusader/Panel/krviewitem.h,krusader/Panel/krpreviewpopup.cpp,krusader/Panel/krpreviewpopup.h,krusader/Panel/krpopupmenu.cpp,krusader/Panel/krpopupmenu.h,krusader/Panel/krcalcspacedialog.cpp,krusader/Panel/krcalcspacedialog.h,krusader/Panel/krcolorcache.cpp,krusader/Panel/krcolorcache.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=Panel +sub_dirs= +type=static_library + +[krusader/Panel/krcalcspacedialog.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krcalcspacedialog.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krcolorcache.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krcolorcache.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krdetailedview.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krdetailedview.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krdetailedviewitem.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krdetailedviewitem.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krpopupmenu.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krpopupmenu.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krpreviewpopup.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krpreviewpopup.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krview.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/krview.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/krviewitem.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/listpanel.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/listpanel.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Panel/panelfunc.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Panel/panelfunc.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/RemoteMan/Makefile.am] +files=krusader/RemoteMan/remotemanbase.cpp,krusader/RemoteMan/remotemanbase.h,krusader/RemoteMan/remoteman.cpp,krusader/RemoteMan/remoteman.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=RemoteMan +sub_dirs= +type=static_library + +[krusader/RemoteMan/remoteman.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/RemoteMan/remoteman.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/RemoteMan/remotemanbase.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/RemoteMan/remotemanbase.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Search/Makefile.am] +files=krusader/Search/krquery.cpp,krusader/Search/krquery.h,krusader/Search/krsearchdialogbase.cpp,krusader/Search/krsearchdialogbase.h,krusader/Search/krsearchdialog.cpp,krusader/Search/krsearchdialog.h,krusader/Search/krsearchmod.cpp,krusader/Search/krsearchmod.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=Search +sub_dirs= +type=static_library + +[krusader/Search/krquery.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Search/krquery.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Search/krsearchdialog.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Search/krsearchdialog.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Search/krsearchdialogbase.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Search/krsearchdialogbase.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Search/krsearchmod.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Search/krsearchmod.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Splitter/Makefile.am] +files=krusader/Splitter/combiner.cpp,krusader/Splitter/combiner.h,krusader/Splitter/splitter.cpp,krusader/Splitter/splitter.h,krusader/Splitter/splittergui.cpp,krusader/Splitter/splittergui.h,krusader/Splitter/crc32.cpp,krusader/Splitter/crc32.h +type=static_library + +[krusader/Splitter/combiner.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Splitter/combiner.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Splitter/crc32.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Splitter/crc32.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Splitter/splitter.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Splitter/splitter.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Splitter/splittergui.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Splitter/splittergui.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Synchronizer/Makefile.am] +files=krusader/Synchronizer/synchronizedialog.cpp,krusader/Synchronizer/synchronizedialog.h,krusader/Synchronizer/synchronizer.cpp,krusader/Synchronizer/synchronizer.h,krusader/Synchronizer/synchronizergui.cpp,krusader/Synchronizer/synchronizergui.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=Synchronizer +sub_dirs= +type=static_library + +[krusader/Synchronizer/synchronizedialog.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Synchronizer/synchronizedialog.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Synchronizer/synchronizer.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Synchronizer/synchronizer.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/Synchronizer/synchronizergui.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/Synchronizer/synchronizergui.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/UserMenu/Makefile.am] +files=krusader/UserMenu/usermenu.cpp,krusader/UserMenu/usermenu.h,krusader/UserMenu/usermenuadd.ui,krusader/UserMenu/usermenuaddimpl.cpp,krusader/UserMenu/usermenuaddimpl.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=UserMenu +sub_dirs= +type=static_library + +[krusader/UserMenu/usermenu.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/UserMenu/usermenu.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/UserMenu/usermenuadd.ui] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/UserMenu/usermenuaddimpl.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/UserMenu/usermenuaddimpl.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/Makefile.am] +files=krusader/VFS/ftp_vfs.cpp,krusader/VFS/ftp_vfs.h,krusader/VFS/krarchandler.cpp,krusader/VFS/krarchandler.h,krusader/VFS/krdirwatch.cpp,krusader/VFS/krdirwatch.h,krusader/VFS/krpermhandler.cpp,krusader/VFS/krpermhandler.h,krusader/VFS/normal_vfs.cpp,krusader/VFS/normal_vfs.h,krusader/VFS/temp_vfs.cpp,krusader/VFS/temp_vfs.h,krusader/VFS/vfile.cpp,krusader/VFS/vfile.h,krusader/VFS/vfs.cpp,krusader/VFS/vfs.h,krusader/VFS/virt_vfs.cpp,krusader/VFS/virt_vfs.h,krusader/VFS/krvfshandler.cpp,krusader/VFS/krvfshandler.h +sharedlib_LDFLAGS=-version-info 0:0:0 +sharedlib_rootname=VFS +sub_dirs= +type=static_library + +[krusader/VFS/ftp_vfs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/ftp_vfs.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/krarchandler.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/krarchandler.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/krdirwatch.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/krdirwatch.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/krpermhandler.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/krpermhandler.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/krvfshandler.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/krvfshandler.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/normal_vfs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/normal_vfs.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/temp_vfs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/temp_vfs.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/vfile.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/vfile.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/vfs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/vfs.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/VFS/virt_vfs.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/VFS/virt_vfs.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/defaults.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/kicons.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/kicons.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/krservices.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/krservices.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/krslots.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/krslots.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/krusader.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/krusader.desktop] +dist=true +install=true +install_location=$$(kde_appsdir)/Applications/krusader.desktop +type=DATA + +[krusader/krusader.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/krusaderui.rc] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/krusaderui.rc +type=DATA + +[krusader/krusaderview.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/krusaderview.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/main.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/panelmanager.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/panelmanager.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/paneltabbar.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[krusader/paneltabbar.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/resources.h] +dist=true +install=false +install_location= +type=HEADER + +[krusader/x-ace.desktop] +dist=true +install=true +install_location=$$(kde_mimedir)/application/x-ace.desktop +type=DATA + +[pics/Makefile] +dist=true +install=false +install_location= +type=DATA + +[pics/Makefile.am] +dist=true +files=pics/about.png,pics/arc_pack16x16.png,pics/arc_pack22x22.png,pics/arc_pack32x32.png,pics/arc_test16x16.png,pics/arc_test22x22.png,pics/arc_test32x32.png,pics/arc_unpack16x16.png,pics/arc_unpack22x22.png,pics/arc_unpack32x32.png,pics/calc16x16.png,pics/calc22x22.png,pics/calc32x32.png,pics/compare16x16.png,pics/compare22x22.png,pics/compare32x32.png,pics/comparedirs16x16.png,pics/comparedirs22x22.png,pics/comparedirs32x32.png,pics/ftp_connect16x16.png,pics/ftp_connect22x22.png,pics/ftp_connect32x32.png,pics/ftp_disconnect16x16.png,pics/ftp_disconnect22x22.png,pics/ftp_disconnect32x32.png,pics/ftp_new16x16.png,pics/ftp_new22x22.png,pics/ftp_new32x32.png,pics/konfig_small.jpg,pics/kr_addbookmark16x16.png,pics/kr_addbookmark22x22.png,pics/kr_addbookmark32x32.png,pics/kr_bookman16x16.png,pics/kr_bookman22x22.png,pics/kr_bookman32x32.png,pics/kr_bookmark16x16.png,pics/kr_bookmark22x22.png,pics/kr_bookmark32x32.png,pics/kr_fullview16x16.png,pics/kr_fullview22x22.png,pics/kr_fullview32x32.png,pics/kr_hwinfo16x16.png,pics/kr_hwinfo22x22.png,pics/kr_hwinfo32x32.png,pics/kr_invert16x16.png,pics/kr_invert22x22.png,pics/kr_invert32x32.png,pics/kr_treeview16x16.png,pics/kr_treeview22x22.png,pics/kr_treeview32x32.png,pics/kr_unselect16x16.png,pics/kr_unselect22x22.png,pics/kr_unselect32x32.png,pics/Makefile,pics/Makefile.am,pics/Makefile.in,pics/mountman16x16.png,pics/mountman22x22.png,pics/mountman32x32.png,pics/properties16x16.png,pics/properties22x22.png,pics/properties32x32.png,pics/select16x16.png,pics/select22x22.png,pics/select32x32.png,pics/selectall16x16.png,pics/selectall22x22.png,pics/selectall32x32.png,pics/terminal16x16.png,pics/terminal22x22.png,pics/terminal32x32.png,pics/unselectall16x16.png,pics/unselectall22x22.png,pics/unselectall32x32.png,pics/kr_split16x16.png,pics/kr_split22x22.png,pics/kr_split32x32.png,pics/kr_combine16x16.png,pics/kr_combine22x22.png,pics/kr_combine32x32.png,pics/kr_dependencies.png,pics/kr_syncdirs16x16.png,pics/kr_syncdirs22x22.png,pics/kr_syncdirs32x32.png +install=false +install_location= +sub_dirs= +type=DATA + +[pics/Makefile.in] +dist=true +install=false +install_location= +type=DATA + +[pics/about.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/about.png +type=DATA + +[pics/arc_pack16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_arc_pack.png +type=DATA + +[pics/arc_pack22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_arc_pack.png +type=DATA + +[pics/arc_pack32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_arc_pack.png +type=DATA + +[pics/arc_test16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_arc_test.png +type=DATA + +[pics/arc_test22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_arc_test.png +type=DATA + +[pics/arc_test32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_arc_test.png +type=DATA + +[pics/arc_unpack16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_arc_unpack.png +type=DATA + +[pics/arc_unpack22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_arc_unpack.png +type=DATA + +[pics/arc_unpack32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_arc_unpack.png +type=DATA + +[pics/calc16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_calc.png +type=DATA + +[pics/calc22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_calc.png +type=DATA + +[pics/calc32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_calc.png +type=DATA + +[pics/compare16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_compare.png +type=DATA + +[pics/compare22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_compare.png +type=DATA + +[pics/compare32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_compare.png +type=DATA + +[pics/comparedirs16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_comparedirs.png +type=DATA + +[pics/comparedirs22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_comparedirs.png +type=DATA + +[pics/comparedirs32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_comparedirs.png +type=DATA + +[pics/ftp_connect16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_ftp_connect.png +type=DATA + +[pics/ftp_connect22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_ftp_connect.png +type=DATA + +[pics/ftp_connect32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_ftp_connect.png +type=DATA + +[pics/ftp_disconnect16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_ftp_disconnect.png +type=DATA + +[pics/ftp_disconnect22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_ftp_disconnect.png +type=DATA + +[pics/ftp_disconnect32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_ftp_disconnect.png +type=DATA + +[pics/ftp_new16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_ftp_new.png +type=DATA + +[pics/ftp_new22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_ftp_new.png +type=DATA + +[pics/ftp_new32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_ftp_new.png +type=DATA + +[pics/konfig_small.jpg] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/konfig_small.jpg +type=DATA + +[pics/kr_addbookmark16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_addbookmark.png +type=DATA + +[pics/kr_addbookmark22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_addbookmark.png +type=DATA + +[pics/kr_addbookmark32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_addbookmark.png +type=DATA + +[pics/kr_bookman16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_bookman.png +type=DATA + +[pics/kr_bookman22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_bookman.png +type=DATA + +[pics/kr_bookman32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_bookman.png +type=DATA + +[pics/kr_bookmark16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_bookmark.png +type=DATA + +[pics/kr_bookmark22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_bookmark.png +type=DATA + +[pics/kr_bookmark32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_bookmark.png +type=DATA + +[pics/kr_combine16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_combine.png +type=DATA + +[pics/kr_combine22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_combine.png +type=DATA + +[pics/kr_combine32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_combine.png +type=DATA + +[pics/kr_dependencies.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_dependencies.png +type=DATA + +[pics/kr_fullview16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_fullview.png +type=DATA + +[pics/kr_fullview22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_fullview.png +type=DATA + +[pics/kr_fullview32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_fullview.png +type=DATA + +[pics/kr_hwinfo16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_hwinfo.png +type=DATA + +[pics/kr_hwinfo22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_hwinfo.png +type=DATA + +[pics/kr_hwinfo32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_hwinfo.png +type=DATA + +[pics/kr_invert16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_invert.png +type=DATA + +[pics/kr_invert22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_invert.png +type=DATA + +[pics/kr_invert32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_invert.png +type=DATA + +[pics/kr_split16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_split.png +type=DATA + +[pics/kr_split22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_split.png +type=DATA + +[pics/kr_split32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_split.png +type=DATA + +[pics/kr_syncdirs16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_syncdirs.png +type=DATA + +[pics/kr_syncdirs22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_syncdirs.png +type=DATA + +[pics/kr_syncdirs32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_syncdirs.png +type=DATA + +[pics/kr_treeview16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_treeview.png +type=DATA + +[pics/kr_treeview22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_treeview.png +type=DATA + +[pics/kr_treeview32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_treeview.png +type=DATA + +[pics/kr_unselect16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_unselect.png +type=DATA + +[pics/kr_unselect22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_unselect.png +type=DATA + +[pics/kr_unselect32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_unselect.png +type=DATA + +[pics/mountman16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_mountman.png +type=DATA + +[pics/mountman22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_mountman.png +type=DATA + +[pics/mountman32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_mountman.png +type=DATA + +[pics/properties16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_properties.png +type=DATA + +[pics/properties22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_properties.png +type=DATA + +[pics/properties32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_properties.png +type=DATA + +[pics/select16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_select.png +type=DATA + +[pics/select22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_select.png +type=DATA + +[pics/select32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_select.png +type=DATA + +[pics/selectall16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_selectall.png +type=DATA + +[pics/selectall22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_selectall.png +type=DATA + +[pics/selectall32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_selectall.png +type=DATA + +[pics/terminal16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_terminal.png +type=DATA + +[pics/terminal22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_terminal.png +type=DATA + +[pics/terminal32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_terminal.png +type=DATA + +[pics/unselectall16x16.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_unselectall.png +type=DATA + +[pics/unselectall22x22.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_unselectall.png +type=DATA + +[pics/unselectall32x32.png] +dist=true +install=true +install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_unselectall.png +type=DATA + +[po/Makefile.am] +files=po/es.po +sub_dirs= +type=po + +[po/es.po] +dist=false +install=false +install_location= +type=PO diff --git a/krusader.lsm b/krusader.lsm new file mode 100644 index 0000000..d3cb8aa --- /dev/null +++ b/krusader.lsm @@ -0,0 +1,34 @@ +Begin4 +Title: Krusader +Version: 1.70.0 +Entered-date: 2006-02-13 +Description: + Krusader is an advanced twin panel (commander style) file manager + for KDE and other desktops in the *nix world, similar to + Midnight or Total Commander. It provides all the file management + features you could possibly want. Plus extensive archive handling, + mounted filesystem support, FTP, advanced search module, + viewer/editor, directory synchronisation, + file content comparisons, powerful batch renaming and much much + more. It supports the following archive formats, + tar, zip, bzip2, gzip, rar, ace, arj, lha and rpm and can + handle other KIOSlaves such as smb, fish, sftp It is (almost) + completely customizable, very user friendly, + fast and looks great on your desktop! + You should give it a try. +Keywords: kde file-manager commander archive twin-panel ftp midnight +Author: krusader@users.sourceforge.net (Krusader Krew) +Maintained-by: krusader@users.sourceforge.net (Krusader Krew) +Primary-site: http://www.krusader.org/downloads.php +Alternate-site: http://sourceforge.net/project/showfiles.php?group_id=6488 +Original-site: http://www.krusader.org/ +Platforms: Linux/BSD/UNIX-like OSes + KDE 3.3 libs or KDE 3.4 libs +Copying-policy: GPL +End + + + +mail: LSM@execpc.com +subject: add +website: http://www.boutell.com/lsm/lsmbyid.cgi/002225 + diff --git a/krusader.spec b/krusader.spec new file mode 100644 index 0000000..3426d2a --- /dev/null +++ b/krusader.spec @@ -0,0 +1,177 @@ +# Spec file for Krusader-1.80.0 on Fedora 6 by Marcin Garski +# http://cvs.fedoraproject.org/viewcvs/rpms/krusader/devel/?root=extras +# http://download.fedoraproject.org/pub/fedora/linux/extras/development/SRPMS/repoview/krusader.html +# http://download.fedoraproject.org/pub/fedora/linux/extras/development/i386/repoview/krusader.html +# http://download.fedora.redhat.com/pub/fedora/linux/extras/6/x86_64/repoview/krusader.html + +Name: krusader +Version: 1.80.0 +Release: 1%{?dist} +Summary: An advanced twin-panel (commander-style) file-manager for KDE + +Group: Applications/File +License: GPL +URL: http://krusader.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: kdelibs-devel kdebase-devel kdebindings-devel +BuildRequires: libpng-devel gamin-devel libacl-devel +BuildRequires: desktop-file-utils automake gettext + +%description +Krusader is an advanced twin panel (commander style) file manager for KDE and +other desktops in the *nix world, similar to Midnight or Total Commander. +It provides all the file management features you could possibly want. +Plus: extensive archive handling, mounted filesystem support, FTP, advanced +search module, an internal viewer/editor, directory synchronisation, +file content comparisons, powerful batch renaming and much much more. +It supports a wide variety of archive formats and can handle other KIO slaves +such as smb or fish. It is (almost) completely customizable, very user +friendly, fast and looks great on your desktop! You should give it a try. + +%prep +%setup -q + +%build +unset QTDIR || : ; . %{_sysconfdir}/profile.d/qt.sh + +%configure \ + --disable-rpath \ + --disable-debug \ + --disable-dependency-tracking +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +# Make symlink relative +pushd $RPM_BUILD_ROOT%{_docdir}/HTML/en/krusader/ +ln -sf ../common +popd + +%find_lang %{name} + +%post +update-desktop-database &> /dev/null ||: + +touch --no-create %{_datadir}/icons/crystalsvg || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg || : +fi + +touch --no-create %{_datadir}/icons/locolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/locolor || : +fi + +%postun +update-desktop-database &> /dev/null ||: + +touch --no-create %{_datadir}/icons/crystalsvg || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg || : +fi + +touch --no-create %{_datadir}/icons/locolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/locolor || : +fi + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc doc/actions_tutorial.txt AUTHORS ChangeLog COPYING CVSNEWS FAQ README TODO +%{_bindir}/krusader +%{_libdir}/kde3/kio_*.* +%{_datadir}/applications/kde/*krusader*.desktop +%{_datadir}/apps/konqueror/servicemenus/isoservice.desktop +%{_datadir}/apps/krusader/ +%{_datadir}/config/kio_isorc +%{_docdir}/HTML/*/krusader/ +%{_datadir}/icons/crystalsvg/*/apps/* +%{_datadir}/icons/locolor/*/apps/* +%{_mandir}/man1/krusader.1* +%{_datadir}/services/*.protocol + +%changelog +* Thu Aug 02 2007 Marcin Garski 1.80.0-1 +- Update to 1.80.0 (#249903) +- Preserve upstream .desktop vendor + +* Fri Apr 20 2007 Marcin Garski 1.80.0-0.1.beta2 +- Updated to version 1.80.0-beta2 +- Drop X-Fedora category + +* Fri Sep 01 2006 Marcin Garski 1.70.1-2 +- Rebuild for Fedora Core 6 +- Spec tweak + +* Sat Jul 29 2006 Marcin Garski 1.70.1-1 +- Updated to version 1.70.1 which fix CVE-2006-3816 (#200323) + +* Mon Feb 13 2006 Marcin Garski 1.70.0-1 +- Remove all patches (merged upstream) +- Updated to version 1.70.0 + +* Mon Jan 16 2006 Marcin Garski 1.60.1-6 +- Remove --enable-final + +* Mon Jan 16 2006 Marcin Garski 1.60.1-5 +- Remove --disable-dependency-tracking + +* Sun Jan 15 2006 Marcin Garski 1.60.1-4 +- Change "/etc/profile.d/qt.sh" to "%%{_sysconfdir}/profile.d/qt.sh" +- Add --disable-debug --disable-dependency-tracking & --enable-final + +* Wed Dec 14 2005 Marcin Garski 1.60.1-3 +- Add to BR libacl-devel + +* Tue Dec 13 2005 Marcin Garski 1.60.1-2 +- Fix for modular X.Org + +* Mon Dec 12 2005 Marcin Garski 1.60.1-1 +- Updated to version 1.60.1 which fix CVE-2005-3856 + +* Sun Oct 23 2005 Marcin Garski 1.60.0-4 +- Added update-mime-database and gtk-update-icon-cache (bug #171547) + +* Thu Aug 25 2005 Marcin Garski 1.60.0-3 +- Include .la files +- Include actions_tutorial.txt +- Fix krusader_root-mode.desktop file to show only in KDE and under System + category +- Fix compile warnings + +* Fri Aug 12 2005 Marcin Garski 1.60.0-2 +- Spec improvements for Fedora Extras + +* Wed Aug 10 2005 Marcin Garski 1.60.0-1 +- Updated to version 1.60.0 & clean up for Fedora Extras + +* Fri Dec 17 2004 Marcin Garski 1.51.fc2kde331 +- Updated to version 1.51 + +* Sat Nov 11 2004 Marcin Garski 1.50.fc2kde331 +- Added Requires: + +* Tue Nov 02 2004 Marcin Garski 1.50.fc2 +- Updated to version 1.50 & spec cleanup + +* Fri Aug 06 2004 Marcin Garski 1.40-1.fc2 +- Updated to version 1.40 + +* Wed Jun 23 2004 Marcin Garski 1.40-beta2.fc2 +- Updated to version 1.40-beta2 + +* Wed Jun 02 2004 Marcin Garski 1.40-beta1.fc2 +- Rebuild for Fedora Core 2 & huge spec cleanup + +* Mon Nov 17 2003 11:05:00 Marian POPESCU [1.30] +- Updated to 1.30 release + changed description to match the official one + +* Tue Jul 03 2003 17:00:00 Marcin Garski [1.20] +- Initial specfile \ No newline at end of file diff --git a/krusader/ActionMan/Makefile.am b/krusader/ActionMan/Makefile.am new file mode 100644 index 0000000..e71563a --- /dev/null +++ b/krusader/ActionMan/Makefile.am @@ -0,0 +1,14 @@ +noinst_LIBRARIES = libActionMan.a + +INCLUDES = $(all_includes) + +libActionMan_a_METASOURCES = AUTO + +libActionMan_a_SOURCES = \ + actionman.cpp \ + actionpropertybase.ui \ + actionproperty.cpp \ + addplaceholderpopup.cpp \ + useractionlistview.cpp \ + useractionpage.cpp +noinst_HEADERS = useractionpage.h diff --git a/krusader/ActionMan/actionman.cpp b/krusader/ActionMan/actionman.cpp new file mode 100644 index 0000000..10b604b --- /dev/null +++ b/krusader/ActionMan/actionman.cpp @@ -0,0 +1,60 @@ +// +// C++ Implementation: actionman +// +// Description: This manages all useractions +// +// +// Author: Jonas Bähr (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "actionman.h" + +#include +#include + +#include "useractionpage.h" +#include "../krusader.h" +#include "../UserAction/useraction.h" + + +ActionMan::ActionMan( QWidget * parent ) + : KDialogBase( parent, "ActionMan", true /*modal*/, "ActionMan - Manage your useractions", KDialogBase::Apply | KDialogBase::Close ) +{ + setPlainCaption(i18n("ActionMan - Manage Your Useractions")); + + userActionPage = new UserActionPage( this ); + setMainWidget( userActionPage ); + + connect( userActionPage, SIGNAL( changed() ), SLOT( slotEnableApplyButton() ) ); + connect( userActionPage, SIGNAL( applied() ), SLOT( slotDisableApplyButton() ) ); + enableButtonApply( false ); + + exec(); +} + +ActionMan::~ActionMan() { +} + +void ActionMan::slotClose() { + if ( userActionPage->readyToQuit() ) + reject(); +} + +void ActionMan::slotApply() { + userActionPage->applyChanges(); +} + +void ActionMan::slotEnableApplyButton() { + enableButtonApply( true ); +} + +void ActionMan::slotDisableApplyButton() { + enableButtonApply( false ); +} + + + +#include "actionman.moc" diff --git a/krusader/ActionMan/actionman.h b/krusader/ActionMan/actionman.h new file mode 100644 index 0000000..bbfe33f --- /dev/null +++ b/krusader/ActionMan/actionman.h @@ -0,0 +1,36 @@ +// +// C++ Interface: actionman +// +// Description: This manages all useractions +// +// +// Author: Jonas B�r (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#ifndef ACTIONMAN_H +#define ACTIONMAN_H + +#include + +class UserActionPage; + +class ActionMan : public KDialogBase { +Q_OBJECT +public: + ActionMan( QWidget* parent=0 ); + ~ActionMan(); + +protected slots: + void slotClose(); + void slotApply(); + void slotEnableApplyButton(); + void slotDisableApplyButton(); + +private: + UserActionPage* userActionPage; +}; + +#endif // ifndef ACTIONMAN_H diff --git a/krusader/ActionMan/actionproperty.cpp b/krusader/ActionMan/actionproperty.cpp new file mode 100644 index 0000000..077b035 --- /dev/null +++ b/krusader/ActionMan/actionproperty.cpp @@ -0,0 +1,470 @@ +// +// C++ Implementation: actionproperty +// +// Description: +// +// +// Author: Jonas B�r (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "actionproperty.h" +#include "addplaceholderpopup.h" + +#include "../UserAction/useraction.h" +#include "../UserAction/kraction.h" +#include "../krusader.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define ICON(N) KGlobal::iconLoader()->loadIcon(N, KIcon::Small) + +ActionProperty::ActionProperty( QWidget *parent, const char *name, KrAction *action ) + : ActionPropertyBase( parent, name ), _modified(false) + { + if ( action ) { + _action = action; + updateGUI( _action ); + } + + ButtonAddPlaceholder->setPixmap( ICON("add") ); + ButtonAddStartpath->setPixmap( ICON("fileopen") ); + + // fill with all existing categories + cbCategory->insertStringList( krUserAction->allCategories() ); + + connect( ButtonAddPlaceholder, SIGNAL( clicked() ), this, SLOT( addPlaceholder() ) ); + connect( ButtonAddStartpath, SIGNAL( clicked() ), this, SLOT( addStartpath() ) ); + connect( ButtonNewProtocol, SIGNAL( clicked() ), this, SLOT( newProtocol() ) ); + connect( ButtonEditProtocol, SIGNAL( clicked() ), this, SLOT( editProtocol() ) ); + connect( ButtonRemoveProtocol, SIGNAL( clicked() ), this, SLOT( removeProtocol() ) ); + connect( ButtonAddPath, SIGNAL( clicked() ), this, SLOT( addPath() ) ); + connect( ButtonEditPath, SIGNAL( clicked() ), this, SLOT( editPath() ) ); + connect( ButtonRemovePath, SIGNAL( clicked() ), this, SLOT( removePath() ) ); + connect( ButtonAddMime, SIGNAL( clicked() ), this, SLOT( addMime() ) ); + connect( ButtonEditMime, SIGNAL( clicked() ), this, SLOT( editMime() ) ); + connect( ButtonRemoveMime, SIGNAL( clicked() ), this, SLOT( removeMime() ) ); + connect( ButtonNewFile, SIGNAL( clicked() ), this, SLOT( newFile() ) ); + connect( ButtonEditFile, SIGNAL( clicked() ), this, SLOT( editFile() ) ); + connect( ButtonRemoveFile, SIGNAL( clicked() ), this, SLOT( removeFile() ) ); + connect( KeyButtonShortcut, SIGNAL( capturedShortcut(const KShortcut&) ), this, SLOT( changedShortcut(const KShortcut&) ) ); + // track modifications: + connect( leDistinctName, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( leTitle, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( ButtonIcon, SIGNAL( iconChanged(QString) ), SLOT( setModified() ) ); + connect( cbCategory, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( leTooltip, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( textDescription, SIGNAL( textChanged() ), SLOT( setModified() ) ); + connect( leDistinctName, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( leCommandline, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( leStartpath, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( bgExecType, SIGNAL( clicked(int) ), SLOT( setModified() ) ); + connect( bgAccept, SIGNAL( clicked(int) ), SLOT( setModified() ) ); + connect( KeyButtonShortcut, SIGNAL( capturedShortcut(const KShortcut&) ), SLOT( setModified() ) ); + connect( leDifferentUser, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) ); + connect( chkDifferentUser, SIGNAL( clicked() ), SLOT( setModified() ) ); + connect( chkConfirmExecution, SIGNAL( clicked() ), SLOT( setModified() ) ); + // The modified-state of the ShowOnly-lists is tracked in the access-functions below +} + +ActionProperty::~ActionProperty() { +} + +void ActionProperty::changedShortcut( const KShortcut& shortcut ) { + KeyButtonShortcut->setShortcut( shortcut, false ); +} + + +void ActionProperty::clear() { + _action = 0; + + // This prevents the changed-signal from being emited during the GUI-update + _modified = true; // The real state is set at the end of this function. + + leDistinctName->clear(); + cbCategory->clearEdit(); + leTitle->clear(); + leTooltip->clear(); + textDescription->clear(); + leCommandline->clear(); + leStartpath->clear(); + KeyButtonShortcut->setShortcut( KShortcut(), false ); + + lbShowonlyProtocol->clear(); + lbShowonlyPath->clear(); + lbShowonlyMime->clear(); + lbShowonlyFile->clear(); + + chkSeparateStdError->setChecked( false ); + radioNormal->setChecked( true ); + + radioLocal->setChecked( true ); + + chkConfirmExecution->setChecked( false ); + + ButtonIcon->resetIcon(); + + leDifferentUser->clear(); + chkDifferentUser->setChecked( false ); + + setModified( false ); +} + +void ActionProperty::updateGUI( KrAction *action ) { + if ( action ) + _action = action; + if ( ! _action ) + return; + + // This prevents the changed-signal from being emited during the GUI-update. + _modified = true; // The real state is set at the end of this function. + + leDistinctName->setText( _action->name() ); + cbCategory->setCurrentText( _action->category() ); + leTitle->setText( _action->text() ); + leTooltip->setText( _action->toolTip() ); + textDescription->setText( _action->whatsThis() ); + leCommandline->setText( _action->command() ); + leCommandline->home(false); + leStartpath->setText( _action->startpath() ); + KeyButtonShortcut->setShortcut( _action->shortcut(), false ); + + lbShowonlyProtocol->clear(); + lbShowonlyProtocol->insertStringList( _action->showonlyProtocol() ); + lbShowonlyPath->clear(); + lbShowonlyPath->insertStringList( _action->showonlyPath() ); + lbShowonlyMime->clear(); + lbShowonlyMime->insertStringList( _action->showonlyMime() ); + lbShowonlyFile->clear(); + lbShowonlyFile->insertStringList( _action->showonlyFile() ); + + chkSeparateStdError->setChecked( false ); + switch ( _action->execType() ) { + case KrAction::CollectOutputSeparateStderr: + chkSeparateStdError->setChecked( true ); + radioCollectOutput->setChecked( true ); + break; + case KrAction::CollectOutput: + radioCollectOutput->setChecked( true ); + break; + case KrAction::Terminal: + radioTerminal->setChecked( true ); + break; + default: // case KrAction::Normal: + radioNormal->setChecked( true ); + break; + } + + if ( _action->acceptURLs() ) + radioUrl->setChecked( true ); + else + radioLocal->setChecked( true ); + + chkConfirmExecution->setChecked( _action->confirmExecution() ); + + if ( ! _action->icon().isEmpty() ) + ButtonIcon->setIcon( _action->icon() ); + else + ButtonIcon->resetIcon(); + + leDifferentUser->setText( _action->user() ); + if ( _action->user().isEmpty() ) + chkDifferentUser->setChecked( false ); + else + chkDifferentUser->setChecked( true ); + + setModified( false ); +} + +void ActionProperty::updateAction( KrAction *action ) { + if ( action ) + _action = action; + if ( ! _action ) + return; + + if ( _action->category() != cbCategory->currentText() ) { + _action->setCategory( cbCategory->currentText() ); + // Update the category-list + cbCategory->clear(); + cbCategory->insertStringList( krUserAction->allCategories() ); + cbCategory->setCurrentText( _action->category() ); + } + + _action->setName( leDistinctName->text().latin1() ); + _action->setText( leTitle->text() ); + _action->setToolTip( leTooltip->text() ); + _action->setWhatsThis( textDescription->text() ); + _action->setCommand( leCommandline->text() ); + _action->setStartpath( leStartpath->text() ); + _action->setShortcut( KeyButtonShortcut->shortcut() ); + + QListBoxItem* lbi = lbShowonlyProtocol->firstItem(); + QStringList list; + while ( lbi ) { + list << lbi->text(); + lbi = lbi->next(); + } + _action->setShowonlyProtocol( list ); + + lbi = lbShowonlyPath->firstItem(); + list = QStringList(); + while ( lbi ) { + list << lbi->text(); + lbi = lbi->next(); + } + _action->setShowonlyPath( list ); + + lbi = lbShowonlyMime->firstItem(); + list = QStringList(); + while ( lbi ) { + list << lbi->text(); + lbi = lbi->next(); + } + _action->setShowonlyMime( list ); + + lbi = lbShowonlyFile->firstItem(); + list = QStringList(); + while ( lbi ) { + list << lbi->text(); + lbi = lbi->next(); + } + _action->setShowonlyFile( list ); + + if ( radioCollectOutput->isChecked() && chkSeparateStdError->isChecked() ) + _action->setExecType( KrAction::CollectOutputSeparateStderr ); + else if ( radioCollectOutput->isChecked() && ! chkSeparateStdError->isChecked() ) + _action->setExecType( KrAction::CollectOutput ); + else if ( radioTerminal->isChecked() ) + _action->setExecType( KrAction::Terminal ); + else + _action->setExecType( KrAction::Normal ); + + if ( radioUrl->isChecked() ) + _action->setAcceptURLs( true ); + else + _action->setAcceptURLs( false ); + + _action->setConfirmExecution( chkConfirmExecution->isChecked() ); + + _action->setIcon( ButtonIcon->icon() ); + + _action->setUser( leDifferentUser->text() ); + + setModified( false ); +} + +void ActionProperty::addPlaceholder() { + AddPlaceholderPopup popup( this ); + QString exp = popup.getPlaceholder( mapToGlobal( + QPoint( + ButtonAddPlaceholder->pos().x() + ButtonAddPlaceholder->width()+6, // 6 is the default margin + ButtonAddPlaceholder->pos().y() + ) + ) ); + leCommandline->insert( exp ); +} + + +void ActionProperty::addStartpath() { + QString folder = KFileDialog::getExistingDirectory(QString::null, this); + if (folder != QString::null) { + leStartpath->setText( folder ); + } +} + + +void ActionProperty::newProtocol() { + bool ok; + QString text = KInputDialog::getText( + i18n( "New protocol" ), + i18n( "Set a protocol:" ), + lbShowonlyProtocol->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyProtocol->insertStringList( QStringList::split( ";", text ) ); + setModified(); + } +} + +void ActionProperty::editProtocol() { + if (lbShowonlyProtocol->currentItem() == -1) + return; + + bool ok; + QString text = KInputDialog::getText( + i18n( "Edit protocol" ), + i18n( "Set another protocol:" ), + lbShowonlyProtocol->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyProtocol->changeItem( text, lbShowonlyProtocol->currentItem() ); + setModified(); + } +} + +void ActionProperty::removeProtocol() { + if (lbShowonlyProtocol->currentItem() != -1) { + lbShowonlyProtocol->removeItem( lbShowonlyProtocol->currentItem() ); + setModified(); + } +} + +void ActionProperty::addPath() { + QString folder = KFileDialog::getExistingDirectory(QString::null, this); + if (folder != QString::null) { + lbShowonlyPath->insertItem( folder ); + setModified(); + } +} + +void ActionProperty::editPath() { + if (lbShowonlyPath->currentItem() == -1) + return; + + bool ok; + QString text = KInputDialog::getText( + i18n( "Edit path" ), + i18n( "Set another path:" ), + lbShowonlyPath->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyPath->changeItem( text, lbShowonlyPath->currentItem() ); + setModified(); + } +} + +void ActionProperty::removePath() { + if (lbShowonlyPath->currentItem() != -1) { + lbShowonlyPath->removeItem( lbShowonlyPath->currentItem() ); + setModified(); + } +} + +void ActionProperty::addMime() { + bool ok; + QString text = KInputDialog::getText( + i18n( "New mime-type" ), + i18n( "Set a mime-type:" ), + lbShowonlyMime->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyMime->insertStringList( QStringList::split( ";", text ) ); + setModified(); + } +} + +void ActionProperty::editMime() { + if (lbShowonlyMime->currentItem() == -1) + return; + + bool ok; + QString text = KInputDialog::getText( + i18n( "Edit mime-type" ), + i18n( "Set another mime-type:" ), + lbShowonlyMime->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyMime->changeItem( text, lbShowonlyMime->currentItem() ); + setModified(); + } +} + +void ActionProperty::removeMime() { + if (lbShowonlyMime->currentItem() != -1) { + lbShowonlyMime->removeItem( lbShowonlyMime->currentItem() ); + setModified(); + } +} + +void ActionProperty::newFile() { + bool ok; + QString text = KInputDialog::getText( + i18n( "New filename" ), + i18n( "Set a filename:" ), + lbShowonlyFile->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyFile->insertStringList( QStringList::split( ";", text ) ); + setModified(); + } +} + +void ActionProperty::editFile() { + if (lbShowonlyFile->currentItem() == -1) + return; + + bool ok; + QString text = KInputDialog::getText( + i18n( "Edit filename" ), + i18n( "Set another filename:" ), + lbShowonlyFile->currentText(), + &ok, this ); + if ( ok && !text.isEmpty() ) { + lbShowonlyFile->changeItem( text, lbShowonlyFile->currentItem() ); + setModified(); + } +} + +void ActionProperty::removeFile() { + if (lbShowonlyFile->currentItem() != -1) { + lbShowonlyFile->removeItem( lbShowonlyFile->currentItem() ); + setModified(); + } +} + + +bool ActionProperty::validProperties() { + if ( leDistinctName->text().simplifyWhiteSpace().isEmpty() ) { + KMessageBox::error( this, i18n("Please set a unique name for the useraction") ); + leDistinctName->setFocus(); + return false; + } + if ( leTitle->text().simplifyWhiteSpace().isEmpty() ) { + KMessageBox::error( this, i18n("Please set a title for the menu entry") ); + leTitle->setFocus(); + return false; + } + if ( leCommandline->text().simplifyWhiteSpace().isEmpty() ) { + KMessageBox::error( this, i18n("Command line is empty") ); + leCommandline->setFocus(); + return false; + } + if ( leDistinctName->isEnabled() ) + if ( krApp->actionCollection()->action( leDistinctName->text().latin1() ) ) { + KMessageBox::error( this, + i18n("There already is an action with this name\n" + "If you don't have such an useraction the name is used by Krusader for an internal action") + ); + leDistinctName->setFocus(); + return false; + } + + return true; +} + +void ActionProperty::setModified( bool m ) +{ + if ( m && !_modified ) { // emit only when the state _changes_to_true_, + emit changed(); + } + _modified = m; +} + + +#include "actionproperty.moc" diff --git a/krusader/ActionMan/actionproperty.h b/krusader/ActionMan/actionproperty.h new file mode 100644 index 0000000..41cc564 --- /dev/null +++ b/krusader/ActionMan/actionproperty.h @@ -0,0 +1,146 @@ +// +// C++ Interface: actionproperty +// +// Description: +// +// +// Author: Jonas Bähr (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#ifndef ACTIONPROPERTY_H +#define ACTIONPROPERTY_H + +#include "actionpropertybase.h" + +class KrAction; +class KShortcut; + +/** + * Use this widget where ever you need to manipulate a UserAction + * @author Jonas Bähr (http://www.jonas-baehr.de) + */ +class ActionProperty : public ActionPropertyBase { + Q_OBJECT +public: + ActionProperty( QWidget *parent=0, const char *name=0, KrAction *action=0 ); + ~ActionProperty(); + + /** + * @return the currently displayed action + */ + KrAction* action() { return _action; }; + + /** + * This inits the widget with the actions properties. + * If no action is provided, the last used will be taken! + * It also resets the changed() state. + * @param action the action which should be displayd + */ + void updateGUI( KrAction *action = 0 ); + + /** + * This writes the displayed properties back into the action. + * If no action is provided, the last used will be taken! + * It also resets the changed() state. + * @param action the action which should be manipulated + */ + void updateAction( KrAction *action = 0 ); + + /** + * clears everything + */ + void clear(); + + /** + * @return true if all properties got valid values + */ + bool validProperties(); + + /** + * @return true if any property got changed + */ + bool isModified() { return _modified; }; + +signals: + /** + * emited when any actionproperty changed. This signal is only emited when + * the _modified attribute changes to true. If there are changes made and + * _modified is already true, no signal is emited! + */ + void changed(); + +protected slots: + void setModified( bool m = true ); + /** + * executes the AddPlaceholderPopup + */ + void addPlaceholder(); + /** + * asks for an existing path + */ + void addStartpath(); + /** + * (availability) asks for a new protocol + */ + void newProtocol(); + /** + * (availability) changes a protocol of the list + */ + void editProtocol(); + /** + * (availability) removes a protocol from the list + */ + void removeProtocol(); + /** + * (availability) asks for a new path + */ + void addPath(); + /** + * (availability) edits a path of the list + */ + void editPath(); + /** + * (availability) removes a path from the list + */ + void removePath(); + /** + * (availability) asks for a new mime-type + */ + void addMime(); + /** + * (availability) changes a mime-type of the list + */ + void editMime(); + /** + * (availability) removes a mime-type from the list + */ + void removeMime(); + /** + * (availability) asks for a new file-filter + */ + void newFile(); + /** + * (availability) edits a file-filter of the list + */ + void editFile(); + /** + * (availability) removes a file-filter from the lsit + */ + void removeFile(); + +private: + KrAction *_action; + bool _modified; + +private slots: + /** + * This updates the ShortcutButton + * @internal + */ + void changedShortcut(const KShortcut& shortcut); +}; + +#endif diff --git a/krusader/ActionMan/actionpropertybase.cpp b/krusader/ActionMan/actionpropertybase.cpp new file mode 100644 index 0000000..639f6fd --- /dev/null +++ b/krusader/ActionMan/actionpropertybase.cpp @@ -0,0 +1,463 @@ +#include +#include +/**************************************************************************** +** Form implementation generated from reading ui file './actionpropertybase.ui' +** +** Created: Sat Mar 15 11:41:43 2008 +** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.8 edited Jan 11 14:47 $) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "actionpropertybase.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "klineedit.h" +#include "kcombobox.h" +#include "kicondialog.h" +#include "ktextedit.h" +#include "kkeybutton.h" +#include "klistbox.h" + +/* + * Constructs a ActionPropertyBase as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "ActionPropertyBase" ); + ActionPropertyBaseLayout = new QGridLayout( this, 1, 1, 0, 0, "ActionPropertyBaseLayout"); + + tabWidget3 = new QTabWidget( this, "tabWidget3" ); + + tab = new QWidget( tabWidget3, "tab" ); + tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout"); + + ButtonAddStartpath = new QToolButton( tab, "ButtonAddStartpath" ); + + tabLayout->addWidget( ButtonAddStartpath, 8, 3 ); + + LabelDescription = new QLabel( tab, "LabelDescription" ); + LabelDescription->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, LabelDescription->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelDescription, 4, 0 ); + + bgAccept = new QButtonGroup( tab, "bgAccept" ); + bgAccept->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, bgAccept->sizePolicy().hasHeightForWidth() ) ); + bgAccept->setColumnLayout(0, Qt::Vertical ); + bgAccept->layout()->setSpacing( 6 ); + bgAccept->layout()->setMargin( 11 ); + bgAcceptLayout = new QGridLayout( bgAccept->layout() ); + bgAcceptLayout->setAlignment( Qt::AlignTop ); + + radioLocal = new QRadioButton( bgAccept, "radioLocal" ); + radioLocal->setChecked( TRUE ); + + bgAcceptLayout->addWidget( radioLocal, 0, 0 ); + + radioUrl = new QRadioButton( bgAccept, "radioUrl" ); + + bgAcceptLayout->addWidget( radioUrl, 1, 0 ); + + tabLayout->addMultiCellWidget( bgAccept, 9, 9, 2, 3 ); + + leTitle = new KLineEdit( tab, "leTitle" ); + + tabLayout->addMultiCellWidget( leTitle, 2, 2, 1, 3 ); + + LabelTitle = new QLabel( tab, "LabelTitle" ); + LabelTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelTitle->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelTitle, 2, 0 ); + + layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); + + layout2 = new QVBoxLayout( 0, 0, 6, "layout2"); + + leDistinctName = new KLineEdit( tab, "leDistinctName" ); + layout2->addWidget( leDistinctName ); + + cbCategory = new KComboBox( FALSE, tab, "cbCategory" ); + cbCategory->setEditable( TRUE ); + layout2->addWidget( cbCategory ); + layout3->addLayout( layout2 ); + + ButtonIcon = new KIconButton( tab, "ButtonIcon" ); + ButtonIcon->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, ButtonIcon->sizePolicy().hasHeightForWidth() ) ); + ButtonIcon->setMinimumSize( QSize( 50, 50 ) ); + ButtonIcon->setMaximumSize( QSize( 50, 50 ) ); + layout3->addWidget( ButtonIcon ); + + tabLayout->addMultiCellLayout( layout3, 0, 1, 1, 3 ); + + LabelDistinctName = new QLabel( tab, "LabelDistinctName" ); + LabelDistinctName->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelDistinctName->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelDistinctName, 0, 0 ); + + LabelCommandline = new QLabel( tab, "LabelCommandline" ); + LabelCommandline->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, LabelCommandline->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelCommandline, 7, 0 ); + + leTooltip = new KLineEdit( tab, "leTooltip" ); + + tabLayout->addMultiCellWidget( leTooltip, 3, 3, 1, 3 ); + + leStartpath = new KLineEdit( tab, "leStartpath" ); + + tabLayout->addMultiCellWidget( leStartpath, 8, 8, 1, 2 ); + + LabelTooltip = new QLabel( tab, "LabelTooltip" ); + LabelTooltip->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelTooltip->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelTooltip, 3, 0 ); + + leCommandline = new KLineEdit( tab, "leCommandline" ); + + tabLayout->addMultiCellWidget( leCommandline, 7, 7, 1, 2 ); + + LabelCategory = new QLabel( tab, "LabelCategory" ); + LabelCategory->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelCategory->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelCategory, 1, 0 ); + + ButtonAddPlaceholder = new QToolButton( tab, "ButtonAddPlaceholder" ); + ButtonAddPlaceholder->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, ButtonAddPlaceholder->sizePolicy().hasHeightForWidth() ) ); + ButtonAddPlaceholder->setMinimumSize( QSize( 0, 0 ) ); + + tabLayout->addWidget( ButtonAddPlaceholder, 7, 3 ); + + textDescription = new KTextEdit( tab, "textDescription" ); + textDescription->setWordWrap( KTextEdit::WidgetWidth ); + + tabLayout->addMultiCellWidget( textDescription, 4, 6, 1, 3 ); + + LabelStartpath = new QLabel( tab, "LabelStartpath" ); + LabelStartpath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, LabelStartpath->sizePolicy().hasHeightForWidth() ) ); + + tabLayout->addWidget( LabelStartpath, 8, 0 ); + spacer = new QSpacerItem( 80, 19, QSizePolicy::Minimum, QSizePolicy::Expanding ); + tabLayout->addItem( spacer, 6, 0 ); + + layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); + + LabelShortcut = new QLabel( tab, "LabelShortcut" ); + layout4->addWidget( LabelShortcut ); + spacer6_2 = new QSpacerItem( 161, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); + layout4->addItem( spacer6_2 ); + + KeyButtonShortcut = new KKeyButton( tab, "KeyButtonShortcut" ); + layout4->addWidget( KeyButtonShortcut ); + + tabLayout->addMultiCellLayout( layout4, 10, 10, 2, 3 ); + + bgExecType = new QButtonGroup( tab, "bgExecType" ); + bgExecType->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, bgExecType->sizePolicy().hasHeightForWidth() ) ); + bgExecType->setColumnLayout(0, Qt::Vertical ); + bgExecType->layout()->setSpacing( 6 ); + bgExecType->layout()->setMargin( 11 ); + bgExecTypeLayout = new QGridLayout( bgExecType->layout() ); + bgExecTypeLayout->setAlignment( Qt::AlignTop ); + + radioCollectOutput = new QRadioButton( bgExecType, "radioCollectOutput" ); + + bgExecTypeLayout->addWidget( radioCollectOutput, 2, 0 ); + + chkSeparateStdError = new QCheckBox( bgExecType, "chkSeparateStdError" ); + chkSeparateStdError->setEnabled( FALSE ); + + bgExecTypeLayout->addWidget( chkSeparateStdError, 3, 0 ); + + radioNormal = new QRadioButton( bgExecType, "radioNormal" ); + radioNormal->setChecked( TRUE ); + + bgExecTypeLayout->addWidget( radioNormal, 0, 0 ); + + radioTerminal = new QRadioButton( bgExecType, "radioTerminal" ); + + bgExecTypeLayout->addWidget( radioTerminal, 1, 0 ); + + tabLayout->addMultiCellWidget( bgExecType, 9, 10, 0, 1 ); + tabWidget3->insertTab( tab, QString::fromLatin1("") ); + + tab_2 = new QWidget( tabWidget3, "tab_2" ); + tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); + + gbShowonly = new QGroupBox( tab_2, "gbShowonly" ); + gbShowonly->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, gbShowonly->sizePolicy().hasHeightForWidth() ) ); + gbShowonly->setColumnLayout(0, Qt::Vertical ); + gbShowonly->layout()->setSpacing( 6 ); + gbShowonly->layout()->setMargin( 11 ); + gbShowonlyLayout = new QGridLayout( gbShowonly->layout() ); + gbShowonlyLayout->setAlignment( Qt::AlignTop ); + + tabShowonly = new QTabWidget( gbShowonly, "tabShowonly" ); + tabShowonly->setTabPosition( QTabWidget::Top ); + tabShowonly->setTabShape( QTabWidget::Triangular ); + + TabPage = new QWidget( tabShowonly, "TabPage" ); + TabPageLayout = new QGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout"); + + ButtonNewProtocol = new QToolButton( TabPage, "ButtonNewProtocol" ); + ButtonNewProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonNewProtocol->sizePolicy().hasHeightForWidth() ) ); + ButtonNewProtocol->setMinimumSize( QSize( 0, 0 ) ); + ButtonNewProtocol->setMaximumSize( QSize( 32767, 32767 ) ); + + TabPageLayout->addWidget( ButtonNewProtocol, 0, 1 ); + + ButtonEditProtocol = new QToolButton( TabPage, "ButtonEditProtocol" ); + ButtonEditProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditProtocol->sizePolicy().hasHeightForWidth() ) ); + ButtonEditProtocol->setMinimumSize( QSize( 0, 0 ) ); + ButtonEditProtocol->setMaximumSize( QSize( 32767, 32767 ) ); + + TabPageLayout->addWidget( ButtonEditProtocol, 1, 1 ); + spacer6_3 = new QSpacerItem( 21, 58, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TabPageLayout->addItem( spacer6_3, 3, 1 ); + + ButtonRemoveProtocol = new QToolButton( TabPage, "ButtonRemoveProtocol" ); + ButtonRemoveProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemoveProtocol->sizePolicy().hasHeightForWidth() ) ); + ButtonRemoveProtocol->setMinimumSize( QSize( 0, 0 ) ); + ButtonRemoveProtocol->setMaximumSize( QSize( 32767, 32767 ) ); + + TabPageLayout->addWidget( ButtonRemoveProtocol, 2, 1 ); + + lbShowonlyProtocol = new KListBox( TabPage, "lbShowonlyProtocol" ); + + TabPageLayout->addMultiCellWidget( lbShowonlyProtocol, 0, 3, 0, 0 ); + tabShowonly->insertTab( TabPage, QString::fromLatin1("") ); + + tab_3 = new QWidget( tabShowonly, "tab_3" ); + tabLayout_3 = new QGridLayout( tab_3, 1, 1, 11, 6, "tabLayout_3"); + + lbShowonlyPath = new KListBox( tab_3, "lbShowonlyPath" ); + + tabLayout_3->addMultiCellWidget( lbShowonlyPath, 0, 3, 0, 0 ); + + ButtonAddPath = new QToolButton( tab_3, "ButtonAddPath" ); + ButtonAddPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonAddPath->sizePolicy().hasHeightForWidth() ) ); + ButtonAddPath->setMinimumSize( QSize( 0, 0 ) ); + ButtonAddPath->setMaximumSize( QSize( 32767, 32767 ) ); + + tabLayout_3->addWidget( ButtonAddPath, 0, 1 ); + + ButtonEditPath = new QToolButton( tab_3, "ButtonEditPath" ); + ButtonEditPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditPath->sizePolicy().hasHeightForWidth() ) ); + ButtonEditPath->setMinimumSize( QSize( 0, 0 ) ); + ButtonEditPath->setMaximumSize( QSize( 32767, 32767 ) ); + + tabLayout_3->addWidget( ButtonEditPath, 1, 1 ); + + ButtonRemovePath = new QToolButton( tab_3, "ButtonRemovePath" ); + ButtonRemovePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemovePath->sizePolicy().hasHeightForWidth() ) ); + ButtonRemovePath->setMinimumSize( QSize( 0, 0 ) ); + ButtonRemovePath->setMaximumSize( QSize( 32767, 32767 ) ); + + tabLayout_3->addWidget( ButtonRemovePath, 2, 1 ); + spacer4 = new QSpacerItem( 21, 61, QSizePolicy::Minimum, QSizePolicy::Expanding ); + tabLayout_3->addItem( spacer4, 3, 1 ); + tabShowonly->insertTab( tab_3, QString::fromLatin1("") ); + + tab_4 = new QWidget( tabShowonly, "tab_4" ); + tabLayout_4 = new QGridLayout( tab_4, 1, 1, 11, 6, "tabLayout_4"); + + lbShowonlyMime = new KListBox( tab_4, "lbShowonlyMime" ); + + tabLayout_4->addMultiCellWidget( lbShowonlyMime, 0, 3, 0, 0 ); + + ButtonAddMime = new QToolButton( tab_4, "ButtonAddMime" ); + ButtonAddMime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonAddMime->sizePolicy().hasHeightForWidth() ) ); + ButtonAddMime->setMinimumSize( QSize( 0, 0 ) ); + ButtonAddMime->setMaximumSize( QSize( 32767, 32767 ) ); + + tabLayout_4->addWidget( ButtonAddMime, 0, 1 ); + + ButtonEditMime = new QToolButton( tab_4, "ButtonEditMime" ); + ButtonEditMime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditMime->sizePolicy().hasHeightForWidth() ) ); + ButtonEditMime->setMinimumSize( QSize( 0, 0 ) ); + ButtonEditMime->setMaximumSize( QSize( 32767, 32767 ) ); + + tabLayout_4->addWidget( ButtonEditMime, 1, 1 ); + + ButtonRemoveMime = new QToolButton( tab_4, "ButtonRemoveMime" ); + ButtonRemoveMime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemoveMime->sizePolicy().hasHeightForWidth() ) ); + ButtonRemoveMime->setMinimumSize( QSize( 0, 0 ) ); + ButtonRemoveMime->setMaximumSize( QSize( 32767, 32767 ) ); + + tabLayout_4->addWidget( ButtonRemoveMime, 2, 1 ); + spacer5 = new QSpacerItem( 21, 41, QSizePolicy::Minimum, QSizePolicy::Expanding ); + tabLayout_4->addItem( spacer5, 3, 1 ); + tabShowonly->insertTab( tab_4, QString::fromLatin1("") ); + + TabPage_2 = new QWidget( tabShowonly, "TabPage_2" ); + TabPageLayout_2 = new QGridLayout( TabPage_2, 1, 1, 11, 6, "TabPageLayout_2"); + + lbShowonlyFile = new KListBox( TabPage_2, "lbShowonlyFile" ); + + TabPageLayout_2->addMultiCellWidget( lbShowonlyFile, 0, 3, 0, 0 ); + + ButtonNewFile = new QToolButton( TabPage_2, "ButtonNewFile" ); + ButtonNewFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonNewFile->sizePolicy().hasHeightForWidth() ) ); + ButtonNewFile->setMinimumSize( QSize( 0, 0 ) ); + ButtonNewFile->setMaximumSize( QSize( 32767, 32767 ) ); + + TabPageLayout_2->addWidget( ButtonNewFile, 0, 1 ); + + ButtonEditFile = new QToolButton( TabPage_2, "ButtonEditFile" ); + ButtonEditFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditFile->sizePolicy().hasHeightForWidth() ) ); + ButtonEditFile->setMinimumSize( QSize( 0, 0 ) ); + ButtonEditFile->setMaximumSize( QSize( 32767, 32767 ) ); + + TabPageLayout_2->addWidget( ButtonEditFile, 1, 1 ); + + ButtonRemoveFile = new QToolButton( TabPage_2, "ButtonRemoveFile" ); + ButtonRemoveFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemoveFile->sizePolicy().hasHeightForWidth() ) ); + ButtonRemoveFile->setMinimumSize( QSize( 0, 0 ) ); + ButtonRemoveFile->setMaximumSize( QSize( 32767, 32767 ) ); + + TabPageLayout_2->addWidget( ButtonRemoveFile, 2, 1 ); + spacer6 = new QSpacerItem( 21, 41, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TabPageLayout_2->addItem( spacer6, 3, 1 ); + tabShowonly->insertTab( TabPage_2, QString::fromLatin1("") ); + + gbShowonlyLayout->addWidget( tabShowonly, 0, 0 ); + + tabLayout_2->addMultiCellWidget( gbShowonly, 0, 0, 0, 1 ); + + chkConfirmExecution = new QCheckBox( tab_2, "chkConfirmExecution" ); + + tabLayout_2->addMultiCellWidget( chkConfirmExecution, 1, 1, 0, 1 ); + + chkDifferentUser = new QCheckBox( tab_2, "chkDifferentUser" ); + + tabLayout_2->addWidget( chkDifferentUser, 2, 0 ); + + leDifferentUser = new KLineEdit( tab_2, "leDifferentUser" ); + leDifferentUser->setEnabled( FALSE ); + + tabLayout_2->addWidget( leDifferentUser, 2, 1 ); + spacer3 = new QSpacerItem( 161, 102, QSizePolicy::Minimum, QSizePolicy::Expanding ); + tabLayout_2->addMultiCell( spacer3, 3, 3, 0, 1 ); + tabWidget3->insertTab( tab_2, QString::fromLatin1("") ); + + ActionPropertyBaseLayout->addWidget( tabWidget3, 0, 0 ); + languageChange(); + resize( QSize(485, 470).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); + + // signals and slots connections + connect( radioCollectOutput, SIGNAL( toggled(bool) ), chkSeparateStdError, SLOT( setEnabled(bool) ) ); + connect( chkDifferentUser, SIGNAL( toggled(bool) ), leDifferentUser, SLOT( setEnabled(bool) ) ); +} + +/* + * Destroys the object and frees any allocated resources + */ +ActionPropertyBase::~ActionPropertyBase() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void ActionPropertyBase::languageChange() +{ + setCaption( tr2i18n( "Action Property" ) ); + ButtonAddStartpath->setText( tr2i18n( "..." ) ); + LabelDescription->setText( tr2i18n( "Description:" ) ); + QWhatsThis::add( LabelDescription, tr2i18n( "A detailed description of the Useraction. It is only displayed in the Konfigurator and via Shift-F1." ) ); + bgAccept->setTitle( tr2i18n( "Command accepts" ) ); + radioLocal->setText( tr2i18n( "Local files only (no URL's)" ) ); + QWhatsThis::add( radioLocal, tr2i18n( "Substitute the Placeholders with local filenames." ) ); + radioUrl->setText( tr2i18n( "URL's (remote and local)" ) ); + QWhatsThis::add( radioUrl, tr2i18n( "Substitute the Placeholders with valid URL's." ) ); + QWhatsThis::add( leTitle, tr2i18n( "The title displayed in the Usermenu." ) ); + LabelTitle->setText( tr2i18n( "Title:" ) ); + QWhatsThis::add( LabelTitle, tr2i18n( "The title displayed in the Usermenu." ) ); + QWhatsThis::add( leDistinctName, tr2i18n( "Unique name of the Useraction. It is only used in the Konfigurator and doesn't appear in any other menu.

Note: The Title shown in the Usermenu can be set below." ) ); + QWhatsThis::add( cbCategory, tr2i18n( "Useractions can be grouped in categories for better distinction. Choose a existing Category or create a new one by entering a name." ) ); + ButtonIcon->setText( tr2i18n( "Icon" ) ); + QWhatsThis::add( ButtonIcon, tr2i18n( "Each Useraction can have its own icon. It will appear in front of the title in the Usermenu." ) ); + LabelDistinctName->setText( tr2i18n( "Identifier:" ) ); + QWhatsThis::add( LabelDistinctName, tr2i18n( "

Unique name of the Useraction. It is only used in the Konfigurator and doesn't appear in any other menu.

Note: The Title shown in the Usermenu can be set below.

" ) ); + LabelCommandline->setText( tr2i18n( "Command:" ) ); + QWhatsThis::add( LabelCommandline, tr2i18n( "

The Command defines the command that will be executed when the Useraction is used. It can be a simple shell command or a complex sequence of multiple commands with Placeholders.

Examples:

  • eject /mnt/cdrom
  • amarok --append %aList(\"Selected\")%
\n" +"Please consult the handbook to learn more about the syntax.

" ) ); + QWhatsThis::add( leTooltip, tr2i18n( "The Tooltip is shown when the mouse cursor is hold over an entry of the Useraction Toolbar." ) ); + QWhatsThis::add( leStartpath, tr2i18n( "The Workdir defines in which directory the Command will be executed." ) ); + LabelTooltip->setText( tr2i18n( "Tooltip:" ) ); + QWhatsThis::add( LabelTooltip, tr2i18n( "The Tooltip is shown when the mouse cursor is hold over an entry of the Useraction Toolbar." ) ); + leCommandline->setText( QString::null ); + QWhatsThis::add( leCommandline, tr2i18n( "The Command defines the command that will be executed when the Useraction is used. It can be a simple shell command or a complex sequence of multiple commands with Placeholders.

\n" +"Examples:

  • eject /mnt/cdrom
  • amarok --append %aList(\"Selected\")%
\n" +"Please consult the handbook to learn more about the syntax." ) ); + LabelCategory->setText( tr2i18n( "Category:" ) ); + QWhatsThis::add( LabelCategory, tr2i18n( "Useractions can be grouped in categories for better distinction. Choose a existing Category or create a new one by entering a name." ) ); + ButtonAddPlaceholder->setText( tr2i18n( "&Add" ) ); + QWhatsThis::add( ButtonAddPlaceholder, tr2i18n( "Add Placeholders for the selected files in the panel." ) ); + QWhatsThis::add( textDescription, tr2i18n( "A detailed description of the Useraction. It is only displayed in the Konfigurator and via Shift-F1." ) ); + LabelStartpath->setText( tr2i18n( "Workdir:" ) ); + QWhatsThis::add( LabelStartpath, tr2i18n( "The Workdir defines in which directory the Command will be executed." ) ); + LabelShortcut->setText( tr2i18n( "Default shortcut:" ) ); + KeyButtonShortcut->setText( tr2i18n( "None" ) ); + QWhatsThis::add( KeyButtonShortcut, tr2i18n( "Set a default keyboard shortcut." ) ); + bgExecType->setTitle( tr2i18n( "Execution mode" ) ); + radioCollectOutput->setText( tr2i18n( "Collect output" ) ); + QWhatsThis::add( radioCollectOutput, tr2i18n( "Collect the output of the executed program." ) ); + chkSeparateStdError->setText( tr2i18n( "Separate standard error" ) ); + QWhatsThis::add( chkSeparateStdError, tr2i18n( "Separate standard out and standard error in the output collection." ) ); + radioNormal->setText( tr2i18n( "Normal" ) ); + radioTerminal->setText( tr2i18n( "Run in terminal" ) ); + QWhatsThis::add( radioTerminal, tr2i18n( "Run the command in a terminal." ) ); + tabWidget3->changeTab( tab, tr2i18n( "Basic Properties" ) ); + gbShowonly->setTitle( tr2i18n( "The Useraction is only available for" ) ); + ButtonNewProtocol->setText( tr2i18n( "&New..." ) ); + ButtonEditProtocol->setText( tr2i18n( "Chan&ge..." ) ); + ButtonRemoveProtocol->setText( tr2i18n( "De&lete" ) ); + QWhatsThis::add( lbShowonlyProtocol, tr2i18n( "Show the Useraction only for the values defined here." ) ); + tabShowonly->changeTab( TabPage, tr2i18n( "Protocol" ) ); + QWhatsThis::add( lbShowonlyPath, tr2i18n( "Show the Useraction only for the values defined here." ) ); + ButtonAddPath->setText( tr2i18n( "&New..." ) ); + ButtonEditPath->setText( tr2i18n( "Chan&ge..." ) ); + ButtonRemovePath->setText( tr2i18n( "De&lete" ) ); + tabShowonly->changeTab( tab_3, tr2i18n( "Path" ) ); + QWhatsThis::add( lbShowonlyMime, tr2i18n( "Show the Useraction only for the values defined here." ) ); + ButtonAddMime->setText( tr2i18n( "&New..." ) ); + ButtonEditMime->setText( tr2i18n( "Chan&ge..." ) ); + ButtonRemoveMime->setText( tr2i18n( "De&lete" ) ); + tabShowonly->changeTab( tab_4, tr2i18n( "Mime-type" ) ); + QWhatsThis::add( lbShowonlyFile, tr2i18n( "Show the Useraction only for the filenames defined here. The wildcards '?' and '*' can be used." ) ); + ButtonNewFile->setText( tr2i18n( "&New..." ) ); + ButtonEditFile->setText( tr2i18n( "Chan&ge..." ) ); + ButtonRemoveFile->setText( tr2i18n( "De&lete" ) ); + tabShowonly->changeTab( TabPage_2, tr2i18n( "Filename" ) ); + chkConfirmExecution->setText( tr2i18n( "Confirm each program call separately" ) ); + QWhatsThis::add( chkConfirmExecution, tr2i18n( "Allows to tweak the Command before it is executed." ) ); + chkDifferentUser->setText( tr2i18n( "Run as different user:" ) ); + QWhatsThis::add( chkDifferentUser, tr2i18n( "Execute the Command under a different user-id." ) ); + QWhatsThis::add( leDifferentUser, tr2i18n( "Execute the Command under a different user-id." ) ); + tabWidget3->changeTab( tab_2, tr2i18n( "Advanced Properties" ) ); +} + +#include "actionpropertybase.moc" diff --git a/krusader/ActionMan/actionpropertybase.ui b/krusader/ActionMan/actionpropertybase.ui new file mode 100644 index 0000000..9079e85 --- /dev/null +++ b/krusader/ActionMan/actionpropertybase.ui @@ -0,0 +1,1125 @@ + +ActionPropertyBase + + + ActionPropertyBase + + + + 0 + 0 + 485 + 470 + + + + Action Property + + + + unnamed + + + 0 + + + 0 + + + + tabWidget3 + + + + tab + + + Basic Properties + + + + unnamed + + + + ButtonAddStartpath + + + ... + + + + + LabelDescription + + + + 1 + 1 + 0 + 0 + + + + Description: + + + A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>. + + + + + bgAccept + + + + 5 + 1 + 0 + 0 + + + + Command accepts + + + + unnamed + + + + radioLocal + + + Local files only (no URL's) + + + true + + + Substitute the <b>Placeholders</b> with local filenames. + + + + + radioUrl + + + URL's (remote and local) + + + Substitute the <b>Placeholders</b> with valid URL's. + + + + + + + leTitle + + + The title displayed in the <b>Usermenu</b>. + + + + + LabelTitle + + + + 1 + 0 + 0 + 0 + + + + Title: + + + The title displayed in the <b>Usermenu</b>. + + + + + layout3 + + + + unnamed + + + + layout2 + + + + unnamed + + + + leDistinctName + + + Unique name of the <b>Useraction</b>. It is only used in the <i>Konfigurator</i> and doesn't appear in any other menu.<p><b>Note</b>: The <i>Title</i> shown in the <b>Usermenu</b> can be set below. + + + + + cbCategory + + + true + + + <b>Useractions</b> can be grouped in categories for better distinction. Choose a existing <i>Category</i> or create a new one by entering a name. + + + + + + + ButtonIcon + + + + 0 + 0 + 0 + 0 + + + + + 50 + 50 + + + + + 50 + 50 + + + + Icon + + + Each <b>Useraction</b> can have its own icon. It will appear in front of the title in the <b>Usermenu</b>. + + + + + + + LabelDistinctName + + + + 1 + 0 + 0 + 0 + + + + Identifier: + + + <p>Unique name of the <b>Useraction</b>. It is only used in the <i>Konfigurator</i> and doesn't appear in any other menu.</p><p><b>Note</b>: The <i>Title</i> shown in the <b>Usermenu</b> can be set below.</p> + + + + + LabelCommandline + + + + 0 + 0 + 0 + 0 + + + + Command: + + + <p>The <i>Command</i> defines the command that will be executed when the <b>Useraction</b> is used. It can be a simple shell command or a complex sequence of multiple commands with <b>Placeholders</b>.</p><p>Examples:<ul><code><li>eject /mnt/cdrom</li><li>amarok --append %aList("Selected")%</li></code></ul> +Please consult the handbook to learn more about the syntax.</p> + + + + + leTooltip + + + The <i>Tooltip</i> is shown when the mouse cursor is hold over an entry of the <b>Useraction Toolbar</b>. + + + + + leStartpath + + + The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed. + + + + + LabelTooltip + + + + 1 + 0 + 0 + 0 + + + + Tooltip: + + + The <i>Tooltip</i> is shown when the mouse cursor is hold over an entry of the <b>Useraction Toolbar</b>. + + + + + leCommandline + + + + + + The <i>Command</i> defines the command that will be executed when the <b>Useraction</b> is used. It can be a simple shell command or a complex sequence of multiple commands with <b>Placeholders</b>.<p> +Examples:<ul><code><li>eject /mnt/cdrom</li><li>amarok --append %aList("Selected")%</li></code></ul> +Please consult the handbook to learn more about the syntax. + + + + + LabelCategory + + + + 1 + 0 + 0 + 0 + + + + Category: + + + <b>Useractions</b> can be grouped in categories for better distinction. Choose a existing <i>Category</i> or create a new one by entering a name. + + + + + ButtonAddPlaceholder + + + + 0 + 0 + 0 + 0 + + + + + 0 + 0 + + + + &Add + + + Add <b>Placeholders</b> for the selected files in the panel. + + + + + textDescription + + + WidgetWidth + + + A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>. + + + + + LabelStartpath + + + + 0 + 0 + 0 + 0 + + + + Workdir: + + + The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed. + + + + + spacer + + + Vertical + + + Expanding + + + + 80 + 19 + + + + + + layout4 + + + + unnamed + + + + LabelShortcut + + + Default shortcut: + + + + + spacer6_2 + + + Horizontal + + + Expanding + + + + 161 + 21 + + + + + + KeyButtonShortcut + + + None + + + Set a default keyboard shortcut. + + + + + + + bgExecType + + + + 5 + 1 + 0 + 0 + + + + Execution mode + + + + unnamed + + + + radioCollectOutput + + + Collect output + + + Collect the output of the executed program. + + + + + chkSeparateStdError + + + false + + + Separate standard error + + + Separate standard out and standard error in the output collection. + + + + + radioNormal + + + Normal + + + true + + + + + radioTerminal + + + Run in terminal + + + Run the command in a terminal. + + + + + + + + + tab + + + Advanced Properties + + + + unnamed + + + + gbShowonly + + + + 7 + 7 + 0 + 0 + + + + The Useraction is only available for + + + + unnamed + + + + tabShowonly + + + Top + + + Triangular + + + + TabPage + + + Protocol + + + + unnamed + + + + ButtonNewProtocol + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + &New... + + + + + ButtonEditProtocol + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + Chan&ge... + + + + + spacer6_3 + + + Vertical + + + Expanding + + + + 21 + 58 + + + + + + ButtonRemoveProtocol + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + De&lete + + + + + lbShowonlyProtocol + + + Show the <b>Useraction</b> only for the values defined here. + + + + + + + tab + + + Path + + + + unnamed + + + + lbShowonlyPath + + + Show the <b>Useraction</b> only for the values defined here. + + + + + ButtonAddPath + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + &New... + + + + + ButtonEditPath + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + Chan&ge... + + + + + ButtonRemovePath + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + De&lete + + + + + spacer4 + + + Vertical + + + Expanding + + + + 21 + 61 + + + + + + + + tab + + + Mime-type + + + + unnamed + + + + lbShowonlyMime + + + Show the <b>Useraction</b> only for the values defined here. + + + + + ButtonAddMime + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + &New... + + + + + ButtonEditMime + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + Chan&ge... + + + + + ButtonRemoveMime + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + De&lete + + + + + spacer5 + + + Vertical + + + Expanding + + + + 21 + 41 + + + + + + + + TabPage + + + Filename + + + + unnamed + + + + lbShowonlyFile + + + Show the <b>Useraction</b> only for the filenames defined here. The wildcards '<code>?</code>' and '<code>*</code>' can be used. + + + + + ButtonNewFile + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + &New... + + + + + ButtonEditFile + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + Chan&ge... + + + + + ButtonRemoveFile + + + + 1 + 0 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + De&lete + + + + + spacer6 + + + Vertical + + + Expanding + + + + 21 + 41 + + + + + + + + + + + chkConfirmExecution + + + Confirm each program call separately + + + Allows to tweak the <i>Command</i> before it is executed. + + + + + chkDifferentUser + + + Run as different user: + + + Execute the <i>Command</i> under a different user-id. + + + + + leDifferentUser + + + false + + + Execute the <i>Command</i> under a different user-id. + + + + + spacer3 + + + Vertical + + + Expanding + + + + 161 + 102 + + + + + + + + + + + radioCollectOutput + toggled(bool) + chkSeparateStdError + setEnabled(bool) + + + chkDifferentUser + toggled(bool) + leDifferentUser + setEnabled(bool) + + + + + klineedit.h + klineedit.h + kcombobox.h + klineedit.h + kicondialog.h + klineedit.h + klineedit.h + klineedit.h + ktextedit.h + kkeybutton.h + klistbox.h + klistbox.h + klistbox.h + klistbox.h + klineedit.h + + diff --git a/krusader/ActionMan/addplaceholderpopup.cpp b/krusader/ActionMan/addplaceholderpopup.cpp new file mode 100644 index 0000000..1dc2ef1 --- /dev/null +++ b/krusader/ActionMan/addplaceholderpopup.cpp @@ -0,0 +1,582 @@ +// +// C++ Implementation: addplaceholderpopup +// +// Description: +// +// +// Author: Shie Erlich and Rafi Yanai <>, (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "addplaceholderpopup.h" + +#include "../UserAction/expander.h" + +#include +#include +#include + +// for ParameterDialog +#include "../krusader.h" // for konfig-access +#include "../BookMan/krbookmarkbutton.h" +#include "../GUI/profilemanager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define ACTIVE_MASK 0x0100 +#define OTHER_MASK 0x0200 +#define LEFT_MASK 0x0400 +#define RIGHT_MASK 0x0800 +#define INDEPENDENT_MASK 0x1000 +#define EXECUTABLE_ID 0xFFFF + + +AddPlaceholderPopup::AddPlaceholderPopup( QWidget *parent ) : KPopupMenu( parent ) { + + _activeSub = new KPopupMenu( this ); + _otherSub = new KPopupMenu( this ); + _leftSub = new KPopupMenu( this ); + _rightSub = new KPopupMenu( this ); + _independentSub = new KPopupMenu( this ); + + insertItem( i18n( "Active panel" ), _activeSub ); + insertItem( i18n( "Other panel" ), _otherSub ); + insertItem( i18n( "Left panel" ), _leftSub ); + insertItem( i18n( "Right panel" ), _rightSub ); + insertItem( i18n( "Panel independent" ), _independentSub ); + _independentSub->insertItem( i18n( "Choose executable..." ), EXECUTABLE_ID ); + _independentSub->insertSeparator(); + + // read the expressions array from the user menu and populate menus + Expander expander; + for ( int i = 0; i < expander.placeholderCount(); ++i ) { + if ( expander.placeholder( i )->expression().isEmpty() ) { + if ( expander.placeholder( i )->needPanel() ) { + _activeSub->insertSeparator(); + _otherSub->insertSeparator(); + _leftSub->insertSeparator(); + _rightSub->insertSeparator(); + } + else + _independentSub->insertSeparator(); + } + else { + if ( expander.placeholder( i )->needPanel() ) { + _activeSub->insertItem( i18n( expander.placeholder( i )->description().utf8() ), ( i | ACTIVE_MASK ) ); + _otherSub->insertItem( i18n( expander.placeholder( i )->description().utf8() ), ( i | OTHER_MASK ) ); + _leftSub->insertItem( i18n( expander.placeholder( i )->description().utf8() ), ( i | LEFT_MASK ) ); + _rightSub->insertItem( i18n( expander.placeholder( i )->description().utf8() ), ( i | RIGHT_MASK ) ); + } + else + _independentSub->insertItem( i18n( expander.placeholder( i )->description().utf8() ), ( i | INDEPENDENT_MASK ) ); + } + } + +} + + +QString AddPlaceholderPopup::getPlaceholder( const QPoint& pos ) { + int res = exec( pos ); + if ( res == -1 ) + return QString::null; + + // add the selected flag to the command line + if ( res == EXECUTABLE_ID ) { // did the user need an executable ? + // select an executable + QString filename = KFileDialog::getOpenFileName(QString::null, QString::null, this); + if (filename != QString::null) + return filename + " "; // with extra space + //return filename; // without extra space + } else { // user selected something from the menus + Expander expander; + const exp_placeholder* currentPlaceholder = expander.placeholder( res & ~( ACTIVE_MASK | OTHER_MASK | LEFT_MASK | RIGHT_MASK | INDEPENDENT_MASK ) ); +// if ( ¤tPlaceholder->expFunc == 0 ) { +// KMessageBox::sorry( this, "BOFH Excuse #93:\nFeature not yet implemented" ); +// return QString::null; +// } + ParameterDialog* parameterDialog = new ParameterDialog( currentPlaceholder, this ); + QString panel, parameter = parameterDialog->getParameter(); + delete parameterDialog; + // indicate the panel with 'a' 'o', 'l', 'r' or '_'. + if ( res & ACTIVE_MASK ) + panel = "a"; + else if ( res & OTHER_MASK ) + panel = "o"; + else if ( res & LEFT_MASK ) + panel = "l"; + else if ( res & RIGHT_MASK ) + panel = "r"; + else if ( res & INDEPENDENT_MASK ) + panel = "_"; + //return "%" + panel + currentPlaceholder->expression() + parameter + "% "; // with extra space + return "%" + panel + currentPlaceholder->expression() + parameter + "%"; // without extra space + } + return QString::null; +} + + +//////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////// ParameterDialog //////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////// + +ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, QWidget *parent ) : KDialogBase( Plain, i18n("User Action Parameter Dialog"), Default | Ok, Ok, parent ) { + _parameter.clear(); + _parameterCount = currentPlaceholder->parameterCount(); + + QVBoxLayout* layout = new QVBoxLayout( plainPage() ); + layout->setAutoAdd( true ); + layout->setSpacing( 11 ); + + new QLabel( i18n("This placeholder allows some parameter:"), plainPage(), "intro" ); + + for (int i = 0; i < _parameterCount; ++i ) { + if ( currentPlaceholder->parameter( i ).preset() == "__placeholder" ) + _parameter.append( new ParameterPlaceholder( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__yes" ) + _parameter.append( new ParameterYes( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__no" ) + _parameter.append( new ParameterNo( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__file" ) + _parameter.append( new ParameterFile( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset().find( "__choose" ) != -1 ) + _parameter.append( new ParameterChoose( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__select" ) + _parameter.append( new ParameterSelect( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__goto" ) + _parameter.append( new ParameterGoto( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__syncprofile" ) + _parameter.append( new ParameterSyncprofile( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__searchprofile" ) + _parameter.append( new ParameterSearch( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset() == "__panelprofile" ) + _parameter.append( new ParameterPanelprofile( currentPlaceholder->parameter( i ), plainPage() ) ); + else if ( currentPlaceholder->parameter( i ).preset().find( "__int" ) != -1 ) + _parameter.append( new ParameterInt( currentPlaceholder->parameter( i ), plainPage() ) ); + else + _parameter.append( new ParameterText( currentPlaceholder->parameter( i ), plainPage() ) ); + } + + QFrame * line = new QFrame( plainPage() ); + line->setFrameShape( QFrame::HLine ); + line->setFrameShadow( QFrame::Sunken ); + + connect( this, SIGNAL(defaultClicked()), this, SLOT(reset()) ); +} + +QString ParameterDialog::getParameter() { + if ( _parameterCount == 0 ) // meaning no parameters + return QString::null; + + if ( exec() == -1 ) + return QString::null; + + int lastParameter = _parameterCount; + while ( --lastParameter > -1 ) { + if ( _parameter[ lastParameter ]->text() != _parameter[ lastParameter ]->preset() || _parameter[ lastParameter ]->nessesary() ) + break; + } + + if ( lastParameter < 0) // all parameters have default-values + return QString::null; + + QString parameter = "("; + for ( int i = 0; i <= lastParameter; ++i ) { + if ( i > 0 ) + parameter += ", "; + parameter += "\"" + _parameter[ i ]->text().replace( "\"", "\\\"" ) + "\""; + } + parameter += ")"; + return parameter; +} + +void ParameterDialog::reset() { + for ( int i = 0; i < _parameterCount; ++i ) + _parameter[ i ]->reset(); +} + +void ParameterDialog::slotOk() { + bool valid = true; + for (int i = 0; i < _parameterCount; ++i ) { + if ( _parameter[ i ]->nessesary() && ! _parameter[ i ]->valid() ) + valid = false; + } + + if ( valid ) + accept(); +} + +///////////// ParameterText +ParameterText::ParameterText( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _lineEdit = new KLineEdit( parameter.preset(), this ); + _preset = parameter.preset(); +} + +QString ParameterText::text() { + return _lineEdit->text(); +} +QString ParameterText::preset() { + return _preset; +} +void ParameterText::reset() { + _lineEdit->setText( _preset ); +} +bool ParameterText::valid() { + if ( _lineEdit->text().isEmpty() ) + return false; + else + return true; +} + +///////////// ParameterPlaceholder +ParameterPlaceholder::ParameterPlaceholder( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + QHBox * hbox = new QHBox( this ); + hbox->setSpacing( 6 ); + _lineEdit = new KLineEdit( hbox ); + _button = new QToolButton( hbox); + _button->setText( i18n("add") ); + connect( _button, SIGNAL(clicked()), this, SLOT(addPlaceholder()) ); +} + +QString ParameterPlaceholder::text() { + return _lineEdit->text(); +} +QString ParameterPlaceholder::preset() { + return QString::null; +} +void ParameterPlaceholder::reset() { + _lineEdit->setText( QString::null ); +} +bool ParameterPlaceholder::valid() { + if ( _lineEdit->text().isEmpty() ) + return false; + else + return true; +} +void ParameterPlaceholder::addPlaceholder() { + AddPlaceholderPopup* popup = new AddPlaceholderPopup( this ); + QString exp = popup->getPlaceholder( mapToGlobal( QPoint( _button->pos().x() + _button->width() + 6, _button->pos().y() + _button->height() / 2 ) ) ); + _lineEdit->insert( exp ); + delete popup; +} + +///////////// ParameterYes +ParameterYes::ParameterYes( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + _checkBox = new QCheckBox( i18n( parameter.description().utf8() ), this ); + _checkBox->setChecked( true ); +} + +QString ParameterYes::text() { + if ( _checkBox->isChecked() ) + return QString::null; + else + return "No"; +} +QString ParameterYes::preset() { + return QString::null; +} +void ParameterYes::reset() { + _checkBox->setChecked( true ); +} +bool ParameterYes::valid() { + return true; +} + +///////////// ParameterNo +ParameterNo::ParameterNo( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + _checkBox = new QCheckBox( i18n( parameter.description().utf8() ), this ); + _checkBox->setChecked( false ); +} + +QString ParameterNo::text() { + if ( _checkBox->isChecked() ) + return "Yes"; + else + return QString::null; +} +QString ParameterNo::preset() { + return QString::null; +} +void ParameterNo::reset() { + _checkBox->setChecked( false ); +} +bool ParameterNo::valid() { + return true; +} + +///////////// ParameterFile +ParameterFile::ParameterFile( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + QHBox * hbox = new QHBox( this ); + hbox->setSpacing( 6 ); + _lineEdit = new KLineEdit( hbox ); + _button = new QToolButton( hbox); + KIconLoader *iconLoader = new KIconLoader(); + _button->setPixmap( iconLoader->loadIcon( "fileopen", KIcon::Toolbar, 16 ) ); + connect( _button, SIGNAL(clicked()), this, SLOT(addFile()) ); +} + +QString ParameterFile::text() { + return _lineEdit->text(); +} +QString ParameterFile::preset() { + return QString::null; +} +void ParameterFile::reset() { + _lineEdit->setText( QString::null ); +} +bool ParameterFile::valid() { + if ( _lineEdit->text().isEmpty() ) + return false; + else + return true; +} +void ParameterFile::addFile() { + QString filename = KFileDialog::getOpenFileName(QString::null, QString::null, this); + _lineEdit->insert( filename ); +} + +///////////// ParameterChoose +ParameterChoose::ParameterChoose( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _combobox = new KComboBox( this ); + _combobox->insertStringList( QStringList::split( ";", parameter.preset().section(":", 1) ) ); +} + +QString ParameterChoose::text() { + return _combobox->currentText(); +} +QString ParameterChoose::preset() { + return _combobox->text( 0 ); +} +void ParameterChoose::reset() { + _combobox->setCurrentItem( 0 ); +} +bool ParameterChoose::valid() { + return true; +} + +///////////// ParameterSelect +ParameterSelect::ParameterSelect( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _combobox = new KComboBox( this ); + _combobox->setEditable( true ); + + krConfig->setGroup( "Private" ); + QStrList lst; + int i = krConfig->readListEntry( "Predefined Selections", lst ); + if ( i > 0 ) + _combobox->insertStrList( lst ); + + _combobox->setCurrentText( "*" ); +} + +QString ParameterSelect::text() { + return _combobox->currentText(); +} +QString ParameterSelect::preset() { + return "*"; +} +void ParameterSelect::reset() { + _combobox->setCurrentText( "*" ); +} +bool ParameterSelect::valid() { + return true; +} + +///////////// ParameterGoto +ParameterGoto::ParameterGoto( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + QHBox * hbox = new QHBox( this ); + hbox->setSpacing( 6 ); + _lineEdit = new KLineEdit( hbox ); + _lineEdit->setCompletionObject( new KURLCompletion( KURLCompletion::DirCompletion ) ); + _dirButton = new QToolButton( hbox ); + KIconLoader *iconLoader = new KIconLoader(); + _dirButton->setPixmap( iconLoader->loadIcon( "fileopen", KIcon::Toolbar, 16 ) ); + connect( _dirButton, SIGNAL(clicked()), this, SLOT(setDir()) ); + _placeholderButton = new QToolButton( hbox); + _placeholderButton->setText( i18n("add") ); + connect( _placeholderButton, SIGNAL(clicked()), this, SLOT(addPlaceholder()) ); +} + +QString ParameterGoto::text() { + return _lineEdit->text(); +} +QString ParameterGoto::preset() { + return QString::null; +} +void ParameterGoto::reset() { + _lineEdit->setText( QString::null ); +} +bool ParameterGoto::valid() { + if ( _lineEdit->text().isEmpty() ) + return false; + else + return true; +} +void ParameterGoto::setDir() { + QString folder = KFileDialog::getExistingDirectory(QString::null, this); + _lineEdit->setText( folder ); +} +void ParameterGoto::addPlaceholder() { + AddPlaceholderPopup* popup = new AddPlaceholderPopup( this ); + QString exp = popup->getPlaceholder( mapToGlobal( QPoint( _placeholderButton->pos().x() + _placeholderButton->width() + 6, _placeholderButton->pos().y() + _placeholderButton->height() / 2 ) ) ); + _lineEdit->insert( exp ); + delete popup; +} + +///////////// ParameterSyncprofile +ParameterSyncprofile::ParameterSyncprofile( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _combobox = new KComboBox( this ); + + _combobox->insertStringList( ProfileManager::availableProfiles("SynchronizerProfile") ); +} + +QString ParameterSyncprofile::text() { + return _combobox->currentText(); +} +QString ParameterSyncprofile::preset() { + return _combobox->text( 0 ); +} +void ParameterSyncprofile::reset() { + _combobox->setCurrentItem( 0 ); +} +bool ParameterSyncprofile::valid() { + return true; +} + +///////////// ParameterSearch +ParameterSearch::ParameterSearch( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _combobox = new KComboBox( this ); + + _combobox->insertStringList( ProfileManager::availableProfiles("SearcherProfile") ); +} + +QString ParameterSearch::text() { + return _combobox->currentText(); +} +QString ParameterSearch::preset() { + return _combobox->text( 0 ); +} +void ParameterSearch::reset() { + _combobox->setCurrentItem( 0 ); +} +bool ParameterSearch::valid() { + return true; +} + +///////////// ParameterPanelprofile +ParameterPanelprofile::ParameterPanelprofile( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QVBoxLayout* layout = new QVBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _combobox = new KComboBox( this ); + + _combobox->insertStringList( ProfileManager::availableProfiles("Panel") ); +} + +QString ParameterPanelprofile::text() { + return _combobox->currentText(); +} +QString ParameterPanelprofile::preset() { + return _combobox->text( 0 ); +} +void ParameterPanelprofile::reset() { + _combobox->setCurrentItem( 0 ); +} +bool ParameterPanelprofile::valid() { + return true; +} + +///////////// ParameterInt +ParameterInt::ParameterInt( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { + QHBoxLayout* layout = new QHBoxLayout( this ); + layout->setAutoAdd( true ); + layout->setSpacing( 6 ); + + new QLabel( i18n( parameter.description().utf8() ), this ); + _spinbox = new KIntSpinBox( this ); + QStringList para = QStringList::split( ";", parameter.preset().section(":", 1) ); + + _spinbox->setMinValue( para[0].toInt() ); + _spinbox->setMaxValue( para[1].toInt() ); + _spinbox->setLineStep( para[2].toInt() ); + _spinbox->setValue( para[3].toInt() ); + + _default = _spinbox->value(); +} + +QString ParameterInt::text() { + return _spinbox->text(); +} +QString ParameterInt::preset() { + return QString( "%1" ).arg( _default ); +} +void ParameterInt::reset() { + return _spinbox->setValue( _default ); +} +bool ParameterInt::valid() { + return true; +} + + +#include "addplaceholderpopup.moc" diff --git a/krusader/ActionMan/addplaceholderpopup.h b/krusader/ActionMan/addplaceholderpopup.h new file mode 100644 index 0000000..285d6a4 --- /dev/null +++ b/krusader/ActionMan/addplaceholderpopup.h @@ -0,0 +1,318 @@ +// +// C++ Interface: addplaceholderpopup +// +// Description: +// +// +// Author: Shie Erlich and Rafi Yanai <>, (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#ifndef ADDPLACEHOLDERPOPUP_H +#define ADDPLACEHOLDERPOPUP_H + +#include +#include +#include "../UserAction/expander.h" + +class QString; +class KLineEdit; +class QToolButton; +class QCheckBox; +class KComboBox; +class KrBookmarkButton; +class KURL; +class KIntSpinBox; + + +/** + * This reads Expander::placeholder[] and fills a popup for easy access to the UserAction Placeholder + * @author Jonas Bhr (http://www.jonas-baehr.de), Shie Erlich + */ +class AddPlaceholderPopup : public KPopupMenu { + +public: + AddPlaceholderPopup( QWidget *parent ); + + /** + * Use this to exec the popup. + * @param pos Position where the popup should appear + * @return the expression which can be placed in the UserAction commandline + */ + QString getPlaceholder( const QPoint& pos ); + +protected: + /** + * This is calles when a Placeholder got parameter. + * @param currentPlaceholder A pointer to the Placeholder the user has choosen + * @return a parameter-string + */ + QString getParameter( exp_placeholder* currentPlaceholder ); + +private: + KPopupMenu *_activeSub, *_otherSub, *_leftSub, *_rightSub, *_independentSub; +}; + + +//////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// Parameter Widgets /////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////// + +/** + * abstract baseclass for all Parameter widgets + * @author Jonas Bhr (http://www.jonas-baehr.de) + */ +class ParameterBase : public QWidget { +public: + inline ParameterBase( const exp_parameter& parameter, QWidget* parent ) : QWidget( parent ) { _nessesary = parameter.nessesary(); } + /** + * @return the text for the parameter + */ + virtual QString text() = 0; + /** + * @return the default of the parameter + */ + virtual QString preset() = 0; + /** + * re-init the parameter with the default + */ + virtual void reset() = 0; + /** + * @return true if the Parameter as a valid value + */ + virtual bool valid() = 0; + /** + * @return true if the Placeholder realy needs this parameter + */ + inline bool nessesary() { return _nessesary; } +private: + bool _nessesary; +}; + +/** + * The simple Parameter widgets: a line-edit with the description above + * used by default + */ +class ParameterText : public ParameterBase { +public: + ParameterText( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KLineEdit * _lineEdit; + QString _preset; +}; + +/** + * A line-edit with the "addPlaceholder"-button + * used with default = "__placeholder" + */ +class ParameterPlaceholder : public ParameterBase { +Q_OBJECT +public: + ParameterPlaceholder( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KLineEdit * _lineEdit; + QToolButton* _button; +private slots: + void addPlaceholder(); +}; + +/** + * A Checkbox, default: checked; retuns "No" if unchecked + * used with default = "__yes" + */ +class ParameterYes : public ParameterBase { +public: + ParameterYes( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + QCheckBox* _checkBox; +}; + +/** + * A Checkbox, default: unchecked; retuns "Yes" if checked + * used with default = "__no" + */ +class ParameterNo : public ParameterBase { +public: + ParameterNo( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + QCheckBox* _checkBox; +}; + +/** + * A line-edit with the "file open"-button + * used with default = "__file" + */ +class ParameterFile : public ParameterBase { +Q_OBJECT +public: + ParameterFile( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KLineEdit * _lineEdit; + QToolButton* _button; +private slots: + void addFile(); +}; + +/** + * A ComboBox with the description above + * used with default = "__choose:item1;item2;..." + */ +class ParameterChoose : public ParameterBase { +public: + ParameterChoose( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KComboBox * _combobox; +}; + +/** + * An editable ComboBox with the predifined selections + * used with default = "__select" + */ +class ParameterSelect : public ParameterBase { +public: + ParameterSelect( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KComboBox * _combobox; +}; + +/** + * A line-edit with a "choose dir"- and a bookmark-button + * used with default = "__goto" + */ +class ParameterGoto : public ParameterBase { +Q_OBJECT +public: + ParameterGoto( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KLineEdit * _lineEdit; + QToolButton* _dirButton, *_placeholderButton; +private slots: + void setDir(); + void addPlaceholder(); +}; + +/** + * A ComboBox with all profiles available for the Synchronizer + * used with default = "__syncprofile" + */ +class ParameterSyncprofile : public ParameterBase { +public: + ParameterSyncprofile( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KComboBox * _combobox; +}; + +/** + * A ComboBox with all profiles available for the panels + * used with default = "__panelprofile" + */ +class ParameterPanelprofile : public ParameterBase { +public: + ParameterPanelprofile( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KComboBox * _combobox; +}; + +/** + * A ComboBox with all profiles available for the Searchmodule + * used with default = "__searchprofile" + */ +class ParameterSearch : public ParameterBase { +public: + ParameterSearch( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KComboBox * _combobox; +}; + +/** + * A SpinBox for integer + * used with default = "__int:min;max;step;value" + */ +class ParameterInt : public ParameterBase { +public: + ParameterInt( const exp_parameter& parameter, QWidget* parent ); + QString text(); + QString preset(); + void reset(); + bool valid(); +private: + KIntSpinBox * _spinbox; + int _default; +}; + +//////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////// ParameterDialog //////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////// + +/** + * Opens a dialog for the parameter. Depending on the default (preset) a differend widget is used. + * See Parameter-Classes for details + */ +class ParameterDialog : public KDialogBase { +Q_OBJECT +public: + ParameterDialog( const exp_placeholder* currentPlaceholder, QWidget *parent ); + + /** + * Use this to execute the dialog. + * @return a QString with all paremeters; ommiting the optional ones if they have the default-value. + */ + QString getParameter(); + +private: + typedef QValueList ParameterList; + ParameterList _parameter; + int _parameterCount; +private slots: + void reset(); + void slotOk(); +}; + + +#endif // ADDPLACEHOLDERPOPUP_H diff --git a/krusader/ActionMan/useractionlistview.cpp b/krusader/ActionMan/useractionlistview.cpp new file mode 100644 index 0000000..0534027 --- /dev/null +++ b/krusader/ActionMan/useractionlistview.cpp @@ -0,0 +1,232 @@ +// +// C++ Implementation: useractionlistview +// +// Description: +// +// +// Author: Jonas Bähr, (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "useractionlistview.h" + +#include +#include +#include +#include + +#include "../krusader.h" +#include "../UserAction/kraction.h" +#include "../UserAction/useraction.h" + +#define COL_TITLE 0 +#define COL_NAME 1 + + +////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// UserActionListView ///////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////// + +UserActionListView::UserActionListView( QWidget * parent, const char * name ) + : KListView( parent, name ) +{ + addColumn( i18n("Title") ); + //addColumn( i18n("Identifier") ); + setResizeMode( QListView::AllColumns ); + + setRootIsDecorated( true ); + setSelectionMode( QListView::Extended ); // normaly select single items but one may use Ctrl or Shift to select multiple + setSorting( COL_TITLE ); + + update(); +} + +UserActionListView::~UserActionListView() +{ +} + +QSize UserActionListView::sizeHint() const { + return QSize(200, 400); +} + + +void UserActionListView::update() { + clear(); + UserAction::KrActionList list = krUserAction->actionList(); + for ( KrAction* action = list.first(); action; action = list.next() ) + insertAction( action ); + //sort(); // this is done automaticly +} + +void UserActionListView::update( KrAction* action ) { + UserActionListViewItem* item = findActionItem( action ); + if ( item ) { + // deleting & re-inserting is _much_easyer then tracking all possible cases of category changes! + bool current = ( item == currentItem() ); + bool selected = item->isSelected(); + delete item; + item = insertAction( action ); + if ( current ) + setCurrentItem( item ); + if ( selected ) + setSelected( item, true ); + } +} + +UserActionListViewItem* UserActionListView::insertAction( KrAction* action ) { + if ( ! action ) + return 0; + + UserActionListViewItem* item; + + if ( action->category().isEmpty() ) + item = new UserActionListViewItem( this, action ); + else { + QListViewItem* categoryItem = findCategoryItem( action->category() ); + if ( ! categoryItem ) { + categoryItem = new KListViewItem( this, action->category() ); // create the new category item it not already present + categoryItem->setSelectable( false ); + } + item = new UserActionListViewItem( categoryItem, action ); + } + + item->setAction( action ); + return item; +} + +QListViewItem* UserActionListView::findCategoryItem( const QString& category ) { + for ( QListViewItem* item = firstChild(); item; item = item->nextSibling() ) + if ( item->text( COL_TITLE ) == category && item->text( COL_NAME ).isEmpty() ) // because actions must have a name, items without name haveto be categories + return item; + + return 0; +} + +UserActionListViewItem* UserActionListView::findActionItem( const KrAction* action ) { + for ( QListViewItemIterator it( this ); it.current(); ++it ) { + if ( UserActionListViewItem* item = dynamic_cast( it.current() ) ) { + if ( item->action() == action ) + return item; + } + } //for + return 0; +} + +KrAction * UserActionListView::currentAction() const { + if ( UserActionListViewItem* item = dynamic_cast( currentItem() ) ) + return item->action(); + else + return 0; +} + +void UserActionListView::setCurrentAction( const KrAction* action) { + UserActionListViewItem* item = findActionItem( action ); + if ( item ) { + setCurrentItem( item ); +// setSelected( item, true ); +// repaintItem( item ); + } +} + +void UserActionListView::setFirstActionCurrent() { + for ( QListViewItemIterator it( this ); it.current(); ++it ) { + if ( UserActionListViewItem* item = dynamic_cast( it.current() ) ) { + setCurrentItem( item ); + break; + } + } //for +} + +void UserActionListView::setCurrentItem( QListViewItem* item ) { + if ( ! item ) + return; + ensureItemVisible( item ); + QListView::setCurrentItem( item ); +} + +QDomDocument UserActionListView::dumpSelectedActions( QDomDocument* mergeDoc ) const { + QPtrList list = selectedItems(); + QDomDocument doc; + if ( mergeDoc ) + doc = *mergeDoc; + else + doc = UserAction::createEmptyDoc(); + QDomElement root = doc.documentElement(); + + for ( QListViewItem* item = list.first(); item; item = list.next() ) + if ( UserActionListViewItem* actionItem = dynamic_cast( item ) ) + root.appendChild( actionItem->action()->xmlDump( doc ) ); + + return doc; +} + +void UserActionListView::removeSelectedActions() { + QPtrList list = selectedItems(); + + for ( QListViewItem* item = list.first(); item; item = list.next() ) + if ( UserActionListViewItem* actionItem = dynamic_cast( item ) ) { + delete actionItem->action(); // remove the action itself + delete actionItem; // remove the action from the list + } // if + +} + +////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////// UserActionListViewItem //////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////// + +UserActionListViewItem::UserActionListViewItem( QListView* view, KrAction* action ) + : KListViewItem( view ) +{ + setAction( action ); +} + +UserActionListViewItem::UserActionListViewItem( QListViewItem* item, KrAction * action ) + : KListViewItem( item ) +{ + setAction( action ); +} + +UserActionListViewItem::~UserActionListViewItem() { +/* // remove category-item if the last member ofthiscategory disappears + if ( QListViewItem* item = dynamic_cast( parent() ) ) { + if ( item->childCount() <= 1 ) + item->deleteLater(); // not possible since not inherited from QObject + }*/ +} + + +void UserActionListViewItem::setAction( KrAction * action ) { + if ( ! action ) + return; + + _action = action; + update(); +} + +KrAction * UserActionListViewItem::action() const { + return _action; +} + +void UserActionListViewItem::update() { + if ( ! _action ) + return; + + if ( ! _action->icon().isEmpty() ) + setPixmap( COL_TITLE, KGlobal::iconLoader()->loadIcon( _action->icon(), KIcon::Small ) ); + setText( COL_TITLE, _action->text() ); + setText( COL_NAME, _action->name() ); +} + +int UserActionListViewItem::compare( QListViewItem* i, int col, bool ascending ) const { +// FIXME some how this only produces bullshit :-/ +// if ( i->text( COL_NAME ).isEmpty() ) { // categories only have titles +// //kdDebug() << "this->title: " << text(COL_TITLE) << " |=| i->title: " << i->text(COL_TITLE) << endl; +// return ( ascending ? -1 : 1 ); // <0 means this is smaller then i +// } +// else + return QListViewItem::compare( i, col, ascending ); +} + + diff --git a/krusader/ActionMan/useractionlistview.h b/krusader/ActionMan/useractionlistview.h new file mode 100644 index 0000000..e0a57f6 --- /dev/null +++ b/krusader/ActionMan/useractionlistview.h @@ -0,0 +1,81 @@ +// +// C++ Interface: useractionlistview +// +// Description: +// +// +// Author: Jonas Bähr, (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef USERACTIONLISTVIEW_H +#define USERACTIONLISTVIEW_H + +#include + +class KrAction; +class QString; +class UserActionListViewItem; +class QDomDocument; + +/** + * @author Jonas Bähr + */ +class UserActionListView : public KListView { +public: + UserActionListView( QWidget* parent = 0, const char* name = 0 ); + ~UserActionListView(); + virtual QSize sizeHint() const; + + void update(); + void update( KrAction* action ); + UserActionListViewItem* insertAction( KrAction* action ); + + KrAction* currentAction() const; + void setCurrentAction( const KrAction* ); + + QDomDocument dumpSelectedActions( QDomDocument* mergeDoc = 0 ) const; + + void removeSelectedActions(); + + /** + * makes the first action in the list current + */ + void setFirstActionCurrent(); + + /** + * makes @e item current and ensures its visibility + */ + virtual void setCurrentItem( QListViewItem* item ); + +protected: + QListViewItem* findCategoryItem( const QString& category ); + UserActionListViewItem* findActionItem( const KrAction* action ); +}; + + +/** + * @author Jonas Bähr + */ +class UserActionListViewItem : public KListViewItem { +public: + UserActionListViewItem( QListView* view, KrAction* action ); + UserActionListViewItem( QListViewItem* item, KrAction* action ); + ~UserActionListViewItem(); + + void setAction( KrAction* action ); + KrAction* action() const; + void update(); + + /** + * This reimplements qt's compare-function in order to have categories on the top of the list + */ + int compare ( QListViewItem * i, int col, bool ascending ) const; + +private: + KrAction* _action; +}; + + +#endif //USERACTIONLISTVIEW_H diff --git a/krusader/ActionMan/useractionpage.cpp b/krusader/ActionMan/useractionpage.cpp new file mode 100644 index 0000000..c4c91e7 --- /dev/null +++ b/krusader/ActionMan/useractionpage.cpp @@ -0,0 +1,317 @@ +// +// C++ Implementation: useractionpage +// +// Description: +// +// +// Author: Shie Erlich and Rafi Yanai <>, (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "useractionpage.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "actionproperty.h" +#include "useractionlistview.h" +#include "../UserMenu/usermenu.h" //FIXME this should not be needed here! +#include "../UserAction/useraction.h" +#include "../UserAction/kraction.h" +#include "../krusader.h" + +#define ICON(N) KGlobal::iconLoader()->loadIcon(N, KIcon::Toolbar) +//This is the filter in the KFileDialog of Import/Export: +static const char* FILE_FILTER = I18N_NOOP("*.xml|xml-files\n*|all files"); + + +UserActionPage::UserActionPage( QWidget* parent ) + : QWidget( parent, "UserActionPage" ) +{ + QVBoxLayout* layout = new QVBoxLayout( this, 0, 6, "UserActionPageLayout" ); // 0px margin, 6px item-spacing + + // ======== pseudo-toolbar start ======== + QHBoxLayout* toolbarLayout = new QHBoxLayout( layout, 0, 0 ); // neither margin nor spacing for the toolbar with autoRaise + + newButton = new QToolButton( this, "newButton" ); + newButton->setPixmap( ICON("filenew") ); + newButton->setAutoRaise(true); + QToolTip::add( newButton, i18n("Create new useraction") ); + + importButton = new QToolButton( this, "importButton" ); + importButton->setPixmap( ICON("fileimport") ); + importButton->setAutoRaise(true); + QToolTip::add( importButton, i18n("Import useractions") ); + + exportButton = new QToolButton( this, "exportButton" ); + exportButton->setPixmap( ICON("fileexport") ); + exportButton->setAutoRaise(true); + QToolTip::add( exportButton, i18n("Export useractions") ); + + copyButton = new QToolButton( this, "copyButton" ); + copyButton->setPixmap( ICON("editcopy") ); + copyButton->setAutoRaise(true); + QToolTip::add( copyButton, i18n("Copy useractions to clipboard") ); + + pasteButton = new QToolButton( this, "pasteButton" ); + pasteButton->setPixmap( ICON("editpaste") ); + pasteButton->setAutoRaise(true); + QToolTip::add( pasteButton, i18n("Paste useractions from clipboard") ); + + removeButton = new QToolButton( this, "removeButton" ); + removeButton->setPixmap( ICON("editdelete") ); + removeButton->setAutoRaise(true); + QToolTip::add( removeButton, i18n("Delete selected useractions") ); + + toolbarLayout->addWidget( newButton ); + toolbarLayout->addWidget( importButton ); + toolbarLayout->addWidget( exportButton ); + toolbarLayout->addWidget( copyButton ); + toolbarLayout->addWidget( pasteButton ); + toolbarLayout->addSpacing( 6 ); // 6 pixel nothing + toolbarLayout->addWidget( removeButton ); + toolbarLayout->addStretch( 1000 ); // some very large stretch-factor + // ======== pseudo-toolbar end ======== +/* This seems obsolete now! + // Display some help + KMessageBox::information( this, // parent + i18n( "When you apply changes to an action, the modifications " + "become available in the current session immediately.\n" + "When closing ActionMan, you will be asked to save the changes permanently." + ), + QString::null, // caption + "show UserAction help" //dontShowAgainName for the config + ); +*/ + QSplitter *split = new QSplitter( this, "useractionpage splitter"); + layout->addWidget( split, 1000 ); // again a very large stretch-factor to fix the height of the toolbar + + actionTree = new UserActionListView( split, "actionTree" ); + actionProperties = new ActionProperty( split, "actionProperties" ); + actionProperties->setEnabled( false ); // if there are any actions in the list, the first is displayed and this widget is enabled + + connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) ); + connect( newButton, SIGNAL( clicked() ), SLOT( slotNewAction() ) ); + connect( removeButton, SIGNAL( clicked() ), SLOT( slotRemoveAction() ) ); + connect( importButton, SIGNAL( clicked() ), SLOT( slotImport() ) ); + connect( exportButton, SIGNAL( clicked() ), SLOT( slotExport() ) ); + connect( copyButton, SIGNAL( clicked() ), SLOT( slotToClip() ) ); + connect( pasteButton, SIGNAL( clicked() ), SLOT( slotFromClip() ) ); + + // forwards the changed signal of the properties + connect ( actionProperties, SIGNAL( changed() ), SIGNAL( changed() ) ); + + actionTree->setFirstActionCurrent(); + actionTree->setFocus(); +} + +UserActionPage::~UserActionPage() +{ +} + +bool UserActionPage::continueInSpiteOfChanges() { + if ( ! actionProperties->isModified() ) + return true; + + int answer = KMessageBox::questionYesNoCancel( this, + i18n("The current action has been modified. Do you want to apply these changes?") + ); + if ( answer == KMessageBox::Cancel ) { + disconnect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotChangeCurrent() ) ); + actionTree->setCurrentAction( actionProperties->action() ); + connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) ); + return false; + } + if ( answer == KMessageBox::Yes ) { + if ( ! actionProperties->validProperties() ) { + disconnect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotChangeCurrent() ) ); + actionTree->setCurrentAction( actionProperties->action() ); + connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) ); + return false; + } + slotUpdateAction(); + } // if Yes + return true; +} + +void UserActionPage::slotChangeCurrent() { + if ( ! continueInSpiteOfChanges() ) + return; + + KrAction* action = actionTree->currentAction(); + if ( action ) { + actionProperties->setEnabled( true ); + // the discinct name is used as ID it is not allowd to change it afterwards because it is may referenced anywhere else + actionProperties->leDistinctName->setEnabled( false ); + actionProperties->updateGUI( action ); + } + else { + // If the current item in the tree is no action (i.e. a cathegory), disable the properties + actionProperties->clear(); + actionProperties->setEnabled( false ); + } + emit applied(); // to disable the apply-button +} + + +void UserActionPage::slotUpdateAction() { + // check that we have a command line, title and a name + if ( ! actionProperties->validProperties() ) + return; + + if ( actionProperties->leDistinctName->isEnabled() ) { + // := new entry + KrAction* action = new KrAction( krApp->actionCollection(), actionProperties->leDistinctName->text().latin1() ); + krUserAction->addKrAction( action ); + actionProperties->updateAction( action ); + UserActionListViewItem* item = actionTree->insertAction( action ); + actionTree->setCurrentItem( item ); + krApp->userMenu->update(); + } + else { // := edit an existing + actionProperties->updateAction(); + actionTree->update( actionProperties->action() ); // update the listviewitem as well... + } + apply(); +} + + +void UserActionPage::slotNewAction() { + if ( continueInSpiteOfChanges() ) { + actionTree->clearSelection(); // else the user may think that he is overwriting the selected action + actionProperties->clear(); + actionProperties->setEnabled( true ); // it may be disabled because the tree has the focus on a category + actionProperties->leDistinctName->setEnabled( true ); + actionProperties->leDistinctName->setFocus(); + } +} + +void UserActionPage::slotRemoveAction() { + if ( ! dynamic_cast( actionTree->currentItem() ) ) + return; + + int messageDelete = KMessageBox::warningContinueCancel ( this, //parent + i18n("Are you sure that you want to remove all selected actions?"), //text + i18n("Remove selected actions?"), //caption + i18n("Remove"), //Label for the continue-button + "Confirm Remove UserAction", //dontAskAgainName (for the config-file) + KMessageBox::Dangerous) ; + + if ( messageDelete != KMessageBox::Continue ) + return; + + actionTree->removeSelectedActions(); + + apply(); +} + +void UserActionPage::slotImport() { + QString filename = KFileDialog::getOpenFileName(QString::null, i18n(FILE_FILTER), this); + if ( filename.isEmpty() ) + return; + + UserAction::KrActionList newActions; + krUserAction->readFromFile( filename, UserAction::renameDoublicated, &newActions ); + for ( KrAction* action = newActions.first(); action; action = newActions.next() ) + actionTree->insertAction( action ); + + if ( newActions.count() > 0 ) { + apply(); + } +} + +void UserActionPage::slotExport() { + if ( ! dynamic_cast( actionTree->currentItem() ) ) + return; + + QString filename = KFileDialog::getSaveFileName(QString::null, i18n(FILE_FILTER), this); + if ( filename.isEmpty() ) + return; + + QDomDocument doc = QDomDocument( ACTION_DOCTYPE ); + QFile file( filename ); + int answer = 0; + if( file.open( IO_ReadOnly ) ) { // getting here, means the file already exists an can be read + if( doc.setContent( &file ) ) // getting here means the file exists and already contains an UserAction-XML-tree + answer = KMessageBox::warningYesNoCancel( this, //parent + i18n("This file already contains some useractions.\nDo you want to overwrite it or should it be merged with the selected actions?"), //text + i18n("Overwrite or merge?"), //caption + i18n("Overwrite"), //label for Yes-Button + i18n("Merge") //label for No-Button + ); + file.close(); + } + if ( answer == 0 && file.exists() ) + answer = KMessageBox::warningContinueCancel( this, //parent + i18n("This file already exists. Do you want to overwrite it?"), //text + i18n("Overwrite existing file?"), //caption + i18n("Overwrite") //label for Continue-Button + ); + + if ( answer == KMessageBox::Cancel ) + return; + + if ( answer == KMessageBox::No ) // that means the merge-button + doc = actionTree->dumpSelectedActions( &doc ); // merge + else // Yes or Continue means overwrite + doc = actionTree->dumpSelectedActions(); + + bool success = UserAction::writeToFile( doc, filename ); + if ( ! success ) + KMessageBox::error( this, + i18n("Can't open %1 for writing!\nNothing exported.").arg(filename), + i18n("Export failed!") + ); +} + +void UserActionPage::slotToClip() { + if ( ! dynamic_cast( actionTree->currentItem() ) ) + return; + + QDomDocument doc = actionTree->dumpSelectedActions(); + KApplication::clipboard()->setText( doc.toString() ); +} + +void UserActionPage::slotFromClip() { + QDomDocument doc( ACTION_DOCTYPE ); + if ( doc.setContent( KApplication::clipboard()->text() ) ) { + QDomElement root = doc.documentElement(); + UserAction::KrActionList newActions; + krUserAction->readFromElement( root, UserAction::renameDoublicated, &newActions ); + for ( KrAction* action = newActions.first(); action; action = newActions.next() ) + actionTree->insertAction( action ); + if ( newActions.count() > 0 ) { + apply(); + } + } // if ( doc.setContent ) +} + +bool UserActionPage::readyToQuit() { + // Check if the current UserAction has changed + if ( ! continueInSpiteOfChanges() ) + return false; + + krUserAction->writeActionFile(); + return true; +} + +void UserActionPage::apply() { + krUserAction->writeActionFile(); + emit applied(); +} + +void UserActionPage::applyChanges() { + slotUpdateAction(); +} + + +#include "useractionpage.moc" diff --git a/krusader/ActionMan/useractionpage.h b/krusader/ActionMan/useractionpage.h new file mode 100644 index 0000000..cda2dfc --- /dev/null +++ b/krusader/ActionMan/useractionpage.h @@ -0,0 +1,73 @@ +// +// C++ Interface: useractionpage +// +// Description: +// +// +// Author: Shie Erlich and Rafi Yanai <>, (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef USERACTIONPAGE_H +#define USERACTIONPAGE_H + +#include + +class UserActionListView; +class ActionProperty; +class QToolButton; + +/** + * @author Jonas Bähr +*/ +class UserActionPage : public QWidget { +Q_OBJECT +public: + UserActionPage( QWidget* parent ); + ~UserActionPage(); + + /** + * Be sure to call this function before you delete this page!! + * @return true if this page can be closed + */ + bool readyToQuit(); + + void applyChanges(); + +signals: + void changed(); ///< emited on changes to an action (used to enable the apply-button) + void applied(); ///< emited when changes are applied to an action (used to disable the apply-button) + +private: + /** + * If there are modifications in the property-widget, the user is asked + * what to do. Apply, discard or continue editing. In the first case, + * saving is done in this function. + * @return true if a new action can be loaded in the property-widget. + */ + bool continueInSpiteOfChanges(); + /** + * applyes all changes by writing the actionfile and emits "applied" + */ + void apply(); + + //bool _modified; ///< true if the action-tree was changed (= changes were applied to an action) + UserActionListView *actionTree; + ActionProperty *actionProperties; + QToolButton *importButton, *exportButton; + QToolButton *copyButton, *pasteButton; + QToolButton *removeButton, *newButton; + +private slots: + void slotChangeCurrent(); //loads a new action into the detail-view + void slotUpdateAction(); //updates the action to the xml-file + void slotNewAction(); + void slotRemoveAction(); + void slotImport(); + void slotExport(); + void slotToClip(); + void slotFromClip(); +}; + +#endif //USERACTIONPAGE_H diff --git a/krusader/BookMan/Makefile.am b/krusader/BookMan/Makefile.am new file mode 100644 index 0000000..3f602d3 --- /dev/null +++ b/krusader/BookMan/Makefile.am @@ -0,0 +1,11 @@ +noinst_LIBRARIES = libBookMan.a + +INCLUDES = $(all_includes) + +libBookMan_a_METASOURCES = AUTO + +libBookMan_a_SOURCES = \ + krbookmark.cpp \ + krbookmarkbutton.cpp \ + krbookmarkhandler.cpp \ + kraddbookmarkdlg.cpp diff --git a/krusader/BookMan/kraddbookmarkdlg.cpp b/krusader/BookMan/kraddbookmarkdlg.cpp new file mode 100644 index 0000000..c5ecfd4 --- /dev/null +++ b/krusader/BookMan/kraddbookmarkdlg.cpp @@ -0,0 +1,117 @@ +#include "kraddbookmarkdlg.h" +#include "../krusader.h" +#include "krbookmarkhandler.h" +#include +#include +#include +#include +#include +#include +#include + +KrAddBookmarkDlg::KrAddBookmarkDlg(QWidget *parent, KURL url): + KDialogBase(KDialogBase::Swallow, i18n("Add Bookmark"), + KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent) { + // create the 'new folder' button + setButtonText(KDialogBase::User1, i18n("New Folder")); + showButton(KDialogBase::User1, false); // hide it until _createIn is shown + connect(this, SIGNAL(user1Clicked()), this, SLOT(newFolder())); + + // create the main widget + QWidget *page = new QWidget(this); + setMainWidget(page); + + QGridLayout *layout = new QGridLayout(page, 1, 1, 0, spacingHint()); // expanding + // name and url + QLabel *lb1 = new QLabel(i18n("Name:"), page); + _name = new KLineEdit(page); + _name->setText(url.prettyURL()); // default name is the url + _name->selectAll(); // make the text selected + layout->addWidget(lb1, 0, 0); + layout->addWidget(_name, 0, 1); + + QLabel *lb2 = new QLabel(i18n("URL:"), page); + _url = new KLineEdit(page); + layout->addWidget(lb2, 1, 0); + layout->addWidget(_url, 1, 1); + _url->setText(url.prettyURL()); // set the url in the field + + // create in linedit and button + QLabel *lb3 = new QLabel(i18n("Create in:"), page); + _folder = new KLineEdit(page); + layout->addWidget(lb3, 2, 0); + layout->addWidget(_folder, 2, 1); + _folder->setReadOnly(true); + + _createInBtn = new QToolButton(page); + _createInBtn->setPixmap(krLoader->loadIcon("down", KIcon::Small)); + _createInBtn->setToggleButton(true); + connect(_createInBtn, SIGNAL(toggled(bool)), this, SLOT(toggleCreateIn(bool ))); + layout->addWidget(_createInBtn, 2, 2); + + setDetailsWidget(createInWidget()); + + _name->setFocus(); +} + +void KrAddBookmarkDlg::toggleCreateIn(bool show) { + _createInBtn->setPixmap(krLoader->loadIcon(show ? "up" :"down", KIcon::Small)); + showButton(KDialogBase::User1, show); + setDetails(show); +} + +// creates the widget that lets you decide where to put the new bookmark +QWidget *KrAddBookmarkDlg::createInWidget() { + _createIn = new KListView(this); + _createIn->addColumn("Folders"); + _createIn->header()->hide(); + _createIn->setRootIsDecorated(true); + _createIn->setAlternateBackground(QColor()); // disable alternate coloring + + KListViewItem *item = new KListViewItem(_createIn, i18n("Bookmarks")); + item->setOpen(true); + item->setSelected(true); + _xr[item] = krBookMan->_root; + + populateCreateInWidget(krBookMan->_root, item); + _createIn->setCurrentItem(item); + createInSelection(item); + connect(_createIn, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(createInSelection(QListViewItem*))); + + return _createIn; +} + +void KrAddBookmarkDlg::createInSelection(QListViewItem *item) { + if (item) { + _folder->setText(_xr[static_cast(item)]->text()); + } +} + +void KrAddBookmarkDlg::populateCreateInWidget(KrBookmark *root, KListViewItem *parent) { + for (KrBookmark *bm = root->children().first(); bm; bm = root->children().next()) { + if (bm->isFolder()) { + KListViewItem *item = new KListViewItem(parent, bm->text()); + item->setOpen(true); + _xr[item] = bm; + populateCreateInWidget(bm, item); + } + } +} + +void KrAddBookmarkDlg::newFolder() { + // get the name + QString newFolder = KInputDialog::getText(i18n("New Folder"), i18n("Folder name:"), QString::null, 0, this); + if (newFolder == QString::null) + return; + // add to the list in bookman + KrBookmark *bm = new KrBookmark(newFolder); + krBookMan->addBookmark(bm, _xr[static_cast(_createIn->selectedItem())]); + // fix the gui + KListViewItem *item = new KListViewItem(_createIn->selectedItem(), bm->text()); + _xr[item] = bm; + + _createIn->setCurrentItem(item); + item->setSelected(true); +} + +#include "kraddbookmarkdlg.moc" diff --git a/krusader/BookMan/kraddbookmarkdlg.h b/krusader/BookMan/kraddbookmarkdlg.h new file mode 100644 index 0000000..d9db75c --- /dev/null +++ b/krusader/BookMan/kraddbookmarkdlg.h @@ -0,0 +1,39 @@ +#ifndef KRADDBOOKMARKDLG_H +#define KRADDBOOKMARKDLG_H + +#include "krbookmark.h" +#include "../VFS/vfs.h" +#include +#include +#include +#include +#include +#include + +class KrAddBookmarkDlg: public KDialogBase { + Q_OBJECT +public: + KrAddBookmarkDlg(QWidget *parent, KURL url = 0); + KURL url() const { return vfs::fromPathOrURL(_url->text()); } + QString name() const { return _name->text(); } + KrBookmark *folder() const { return _xr[static_cast(_createIn->selectedItem())]; } + +protected: + QWidget *createInWidget(); + void populateCreateInWidget(KrBookmark *root, KListViewItem *parent); + +protected slots: + void toggleCreateIn(bool show); + void createInSelection(QListViewItem *item); + void newFolder(); + +private: + KLineEdit *_name; + KLineEdit *_url; + KLineEdit *_folder; + KListView *_createIn; + QMap _xr; + QToolButton *_createInBtn; +}; + +#endif // KRADDBOOKMARKDLG_H diff --git a/krusader/BookMan/krbookmark.cpp b/krusader/BookMan/krbookmark.cpp new file mode 100644 index 0000000..f0708d3 --- /dev/null +++ b/krusader/BookMan/krbookmark.cpp @@ -0,0 +1,92 @@ +#include "krbookmark.h" +#include "../krusader.h" +#include "../VFS/krarchandler.h" +#include +#include +#include +#include + +#define BM_NAME(X) (QString("Bookmark:")+X) + +#if KDE_IS_VERSION(3,4,0) +static const char* NAME_DEVICES = I18N_NOOP("Media"); +#else +static const char* NAME_DEVICES = I18N_NOOP("Devices"); +#endif +static const char* NAME_VIRTUAL = I18N_NOOP("Virtual Filesystem"); +static const char* NAME_LAN = I18N_NOOP("Local Network"); + +KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent, QString icon, QString actionName ): + KAction(name, 0, 0, 0, parent, actionName.isNull() ? BM_NAME(name).latin1() : BM_NAME(actionName).latin1()), + _url(url), _folder(false), _separator(false) { + connect(this, SIGNAL(activated()), this, SLOT(activatedProxy())); + // do we have an icon? + if (!icon.isEmpty()) + setIcon(icon); + else { + // what kind of a url is it? + if (_url.isLocalFile()) { + setIcon("folder"); + } else { // is it an archive? + if (KRarcHandler::isArchive(_url)) + setIcon("tar"); + else setIcon("folder_html"); + } + } + + _children.setAutoDelete(true); +} + +KrBookmark::KrBookmark(QString name, QString icon): + KAction(name, 0, 0, 0, 0), _folder(true), _separator(false) { + setIcon(icon=="" ? "folder" : icon); +} + +KrBookmark* KrBookmark::getExistingBookmark(QString actionName, KActionCollection *collection) { + return static_cast(collection->action(BM_NAME(actionName).latin1())); +} + +KrBookmark* KrBookmark::devices(KActionCollection *collection) { + KrBookmark *bm = getExistingBookmark(i18n(NAME_DEVICES), collection); + if (!bm) { +#if KDE_IS_VERSION(3,4,0) + bm = new KrBookmark(i18n(NAME_DEVICES), "media:/", collection); +#else + bm = new KrBookmark(i18n(NAME_DEVICES), "devices:/", collection); +#endif + bm->setIconSet(krLoader->loadIcon("blockdevice", KIcon::Small)); + } + return bm; +} + +KrBookmark* KrBookmark::virt(KActionCollection *collection) { + KrBookmark *bm = getExistingBookmark(i18n(NAME_VIRTUAL), collection); + if (!bm) { + bm = new KrBookmark(i18n(NAME_VIRTUAL), "virt:/", collection); + bm->setIconSet(krLoader->loadIcon("pipe", KIcon::Small)); + } + return bm; +} + +KrBookmark* KrBookmark::lan(KActionCollection *collection) { + KrBookmark *bm = getExistingBookmark(i18n(NAME_LAN), collection); + if (!bm) { + bm = new KrBookmark(i18n(NAME_LAN), "lan:/", collection); + bm->setIconSet(krLoader->loadIcon("network", KIcon::Small)); + } + return bm; +} + +KrBookmark* KrBookmark::separator() { + KrBookmark *bm = new KrBookmark(""); + bm->_separator = true; + bm->_folder = false; + return bm; +} + + +void KrBookmark::activatedProxy() { + emit activated(url()); +} + +#include "krbookmark.moc" diff --git a/krusader/BookMan/krbookmark.h b/krusader/BookMan/krbookmark.h new file mode 100644 index 0000000..fda39ce --- /dev/null +++ b/krusader/BookMan/krbookmark.h @@ -0,0 +1,45 @@ +#ifndef KRBOOKMARK_H +#define KRBOOKMARK_H + +#include +#include +#include + +class KActionCollection; + +class KrBookmark: public KAction { + Q_OBJECT +public: + KrBookmark(QString name, KURL url, KActionCollection *parent, QString icon = "", QString actionName = QString::null ); + KrBookmark(QString name, QString icon = ""); // creates a folder + // text() and setText() to change the name of the bookmark + // icon() and setIcon() to change icons (by name) + inline const KURL& url() const { return _url; } + inline void setURL(const KURL& url) { _url = url; } + inline bool isFolder() const { return _folder; } + inline bool isSeparator() const { return _separator; } + QPtrList& children() { return _children; } + + static KrBookmark* getExistingBookmark(QString actionName, KActionCollection *collection); + // ----- special bookmarks + static KrBookmark* devices(KActionCollection *collection); + static KrBookmark* virt(KActionCollection *collection); + static KrBookmark* lan(KActionCollection *collection); + static KrBookmark* separator(); + +signals: + void activated(const KURL& url); + +protected slots: + void activatedProxy(); + + +private: + KURL _url; + QString _icon; + bool _folder; + bool _separator; + QPtrList _children; +}; + +#endif // KRBOOKMARK_H diff --git a/krusader/BookMan/krbookmarkbutton.cpp b/krusader/BookMan/krbookmarkbutton.cpp new file mode 100644 index 0000000..08d13a5 --- /dev/null +++ b/krusader/BookMan/krbookmarkbutton.cpp @@ -0,0 +1,38 @@ +#include "krbookmarkbutton.h" +#include "krbookmarkhandler.h" +#include "../krusader.h" +#include +#include +#include +#include +#include +#include + +KrBookmarkButton::KrBookmarkButton(QWidget *parent): QToolButton(parent) { + QPixmap icon = krLoader->loadIcon("bookmark", KIcon::Toolbar, 16); + setFixedSize(icon.width() + 4, icon.height() + 4); + setPixmap(icon); + setTextLabel(i18n("BookMan II"), true); + setPopupDelay(10); // 0.01 seconds press + setAcceptDrops(false); + + acmBookmarks = new KActionMenu(i18n("Bookmarks"), "bookmark", 0, 0); + acmBookmarks->setDelayed(false); + acmBookmarks->popupMenu()->setKeyboardShortcutsEnabled(true); + acmBookmarks->popupMenu()->setKeyboardShortcutsExecute(true); + + setPopup(acmBookmarks->popupMenu()); + connect(this, SIGNAL(pressed()), this, SLOT(populate())); + populate(); +} + +void KrBookmarkButton::populate() { + krBookMan->populate(static_cast(popup())); +} + +void KrBookmarkButton::openPopup() { + populate(); + popup()->exec(mapToGlobal(QPoint(0, height()))); +} + +#include "krbookmarkbutton.moc" diff --git a/krusader/BookMan/krbookmarkbutton.h b/krusader/BookMan/krbookmarkbutton.h new file mode 100644 index 0000000..1267871 --- /dev/null +++ b/krusader/BookMan/krbookmarkbutton.h @@ -0,0 +1,23 @@ +#ifndef KRBOOKMARK_BUTTON_H +#define KRBOOKMARK_BUTTON_H + +#include +#include "krbookmarkhandler.h" + +class KrBookmarkButton: public QToolButton { + Q_OBJECT +public: + KrBookmarkButton(QWidget *parent); + void openPopup(); + +signals: + void openUrl(const KURL &url); + +protected slots: + void populate(); + +private: + KActionMenu *acmBookmarks; +}; + +#endif // KRBOOKMARK_BUTTON_H diff --git a/krusader/BookMan/krbookmarkhandler.cpp b/krusader/BookMan/krbookmarkhandler.cpp new file mode 100644 index 0000000..9f1413b --- /dev/null +++ b/krusader/BookMan/krbookmarkhandler.cpp @@ -0,0 +1,576 @@ +#include "krbookmarkhandler.h" +#include "kraddbookmarkdlg.h" +#include "../krusader.h" +#include "../krslots.h" +#include "../Dialogs/popularurls.h" +#include "../VFS/vfs.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SPECIAL_BOOKMARKS true + +// ------------------------ for internal use +#define BOOKMARKS_FILE "krusader/krbookmarks.xml" +#define CONNECT_BM(X) { disconnect(X, SIGNAL(activated(const KURL&)), 0, 0); connect(X, SIGNAL(activated(const KURL&)), this, SLOT(slotActivated(const KURL&))); } + +KrBookmarkHandler::KrBookmarkHandler(): QObject(0), _middleClick(false), _mainBookmarkPopup( 0 ), _specialBookmarkIDs(), _bookmarkIDTable() { + // create our own action collection and make the shortcuts apply only to parent + _privateCollection = new KActionCollection(krApp, "private collection"); + _collection = krApp->actionCollection(); + + // create _root: father of all bookmarks. it is a dummy bookmark and never shown + _root = new KrBookmark(i18n("Bookmarks")); + + _bookmarkIDTable.setAutoDelete( true ); + + // load bookmarks + importFromFile(); + + // hack + manager = KBookmarkManager::managerForFile(locateLocal( "data", BOOKMARKS_FILE ), false); + connect(manager, SIGNAL(changed(const QString&, const QString& )), this, SLOT(bookmarksChanged(const QString&, const QString& ))); +} + +KrBookmarkHandler::~KrBookmarkHandler() { + delete manager; + delete _privateCollection; +} + +void KrBookmarkHandler::menuOperation(int id) { + switch (id) { + case BookmarkCurrent: + bookmarkCurrent(ACTIVE_PANEL->virtualPath()); + break; + case ManageBookmarks: + manager->slotEditBookmarks(); + break; + } +} + +void KrBookmarkHandler::bookmarkCurrent(KURL url) { + KrAddBookmarkDlg dlg(krApp, url); + if (dlg.exec() == KDialog::Accepted) { + KrBookmark *bm = new KrBookmark(dlg.name(), dlg.url(), _collection); + addBookmark(bm, dlg.folder()); + } +} + +void KrBookmarkHandler::addBookmark(KrBookmark *bm, KrBookmark *folder) { + if (folder == 0) + folder = _root; + + // add to the list (bottom) + folder->children().append(bm); + + exportToFile(); +} + +void KrBookmarkHandler::deleteBookmark(KrBookmark *bm) { + if( bm->isFolder() ) + clearBookmarks( bm ); // remove the child bookmarks + removeReferences( _root, bm ); + bm->unplugAll(); + delete bm; + + exportToFile(); +} + +void KrBookmarkHandler::removeReferences( KrBookmark *root, KrBookmark *bmToRemove ) { + int index = root->children().find( bmToRemove ); + if( index >= 0 ) + root->children().take( index ); + + KrBookmark *bm = root->children().first(); + while (bm) { + if (bm->isFolder()) + removeReferences(bm, bmToRemove); + bm = root->children().next(); + } +} + +void KrBookmarkHandler::exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm) { + if( bm->isSeparator() ) { + QDomElement bookmark = doc.createElement("separator"); + where.appendChild(bookmark); + } + else { + QDomElement bookmark = doc.createElement("bookmark"); + // url + bookmark.setAttribute("href", bm->url().prettyURL()); + // icon + bookmark.setAttribute("icon", bm->icon()); + // title + QDomElement title = doc.createElement("title"); + title.appendChild(doc.createTextNode(bm->text())); + bookmark.appendChild(title); + + where.appendChild(bookmark); + } +} + +void KrBookmarkHandler::exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder) { + for (KrBookmark *bm = folder->children().first(); bm; bm = folder->children().next()) { + if (bm->isFolder()) { + QDomElement newFolder = doc.createElement("folder"); + newFolder.setAttribute("icon", bm->icon()); + parent.appendChild(newFolder); + QDomElement title = doc.createElement("title"); + title.appendChild(doc.createTextNode(bm->text())); + newFolder.appendChild(title); + exportToFileFolder(doc, newFolder, bm); + } else { + exportToFileBookmark(doc, parent, bm); + } + } +} + +// export to file using the xbel standard +// +// +// Developer Web Site +// +// Title of this folder +// KDE Web Site +// +// My own bookmarks +// KOffice Web Site +// +// KDevelop Web Site +// +// +// +void KrBookmarkHandler::exportToFile() { + QDomDocument doc( "xbel" ); + QDomElement root = doc.createElement( "xbel" ); + doc.appendChild( root ); + + exportToFileFolder(doc, root, _root); + if (!doc.firstChild().isProcessingInstruction()) { + // adding: if not already present + QDomProcessingInstruction instr = doc.createProcessingInstruction( "xml", + "version=\"1.0\" encoding=\"UTF-8\" "); + doc.insertBefore( instr, doc.firstChild() ); + } + + + QString filename = locateLocal( "data", BOOKMARKS_FILE ); + QFile file(filename); + if ( file.open( IO_WriteOnly ) ) { + QTextStream stream( &file ); + stream.setEncoding(stream.UnicodeUTF8); + stream << doc.toString(); + file.close(); + } else { + KMessageBox::error(krApp, i18n("Unable to write to %1").arg(filename), i18n("Error")); + } +} + +bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, KrBookmark *parent, QString path, QString *errorMsg) { + QString url, name, icon; + // verify tag + if (e.tagName() != "bookmark") { + *errorMsg = e.tagName() + i18n(" instead of ")+"bookmark"; + return false; + } + // verify href + if (!e.hasAttribute("href")) { + *errorMsg = i18n("missing tag ")+ "href"; + return false; + } else url = e.attribute("href"); + // verify title + QDomElement te = e.firstChild().toElement(); + if (te.tagName() != "title") { + *errorMsg = i18n("missing tag ")+"title"; + return false; + } else name = te.text(); + // do we have an icon? + if (e.hasAttribute("icon")) { + icon=e.attribute("icon"); + } + // ok: got name and url, let's add a bookmark + KrBookmark *bm = KrBookmark::getExistingBookmark(path+name, _collection); + if (!bm) { + bm = new KrBookmark(name, vfs::fromPathOrURL( url ), _collection, icon, path+name); + parent->children().append(bm); + } + + return true; +} + +bool KrBookmarkHandler::importFromFileFolder(QDomNode &first, KrBookmark *parent, QString path, QString *errorMsg) { + QString name; + QDomNode n = first; + while (!n.isNull()) { + QDomElement e = n.toElement(); + if (e.tagName() == "bookmark") { + if (!importFromFileBookmark(e, parent, path, errorMsg)) + return false; + } else if (e.tagName() == "folder") { + QString iconName = ""; + if (e.hasAttribute("icon")) iconName=e.attribute("icon"); + // the title is the first child of the folder + QDomElement tmp = e.firstChild().toElement(); + if (tmp.tagName() != "title") { + *errorMsg = i18n("missing tag ")+"title"; + return false; + } else name = tmp.text(); + KrBookmark *folder = new KrBookmark(name, iconName); + parent->children().append(folder); + + QDomNode nextOne = tmp.nextSibling(); + if (!importFromFileFolder(nextOne, folder, path + name + "/", errorMsg)) + return false; + } else if (e.tagName() == "separator") { + parent->children().append(KrBookmark::separator()); + } + n = n.nextSibling(); + } + return true; +} + + +void KrBookmarkHandler::importFromFile() { + clearBookmarks(_root); + + QString filename = locateLocal( "data", BOOKMARKS_FILE ); + QFile file( filename ); + if ( !file.open(IO_ReadOnly)) + return; // no bookmarks file + + QString errorMsg; + QDomNode n; + QDomElement e; + QDomDocument doc( "xbel" ); + if ( !doc.setContent( &file, &errorMsg ) ) { + goto ERROR; + } + // iterate through the document: first child should be "xbel" (skip all until we find it) + n = doc.firstChild(); + while (!n.isNull() && n.toElement().tagName()!="xbel") + n = n.nextSibling(); + + if (n.isNull() || n.toElement().tagName()!="xbel") { + errorMsg = i18n("%1 doesn't seem to be a valid Bookmarks file").arg(filename); + goto ERROR; + } else n = n.firstChild(); // skip the xbel part + importFromFileFolder(n, _root, "", &errorMsg); + goto SUCCESS; + +ERROR: + KMessageBox::error(krApp, i18n("Error reading bookmarks file: %1").arg(errorMsg), i18n( "Error" )); + +SUCCESS: + file.close(); +} + +void KrBookmarkHandler::populate(KPopupMenu *menu) { + _mainBookmarkPopup = menu; + menu->clear(); + _bookmarkIDTable.clear(); + _specialBookmarkIDs.clear(); + buildMenu(_root, menu); +} + +void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) { + static int inSecondaryMenu = 0; // used to know if we're on the top menu + + // run the loop twice, in order to put the folders on top. stupid but easy :-) + // note: this code drops the separators put there by the user + for (KrBookmark *bm = parent->children().first(); bm; bm = parent->children().next()) { + if (!bm->isFolder()) continue; + KPopupMenu *newMenu = new KPopupMenu(menu); + int id = menu->insertItem(QIconSet(krLoader->loadIcon(bm->icon(), KIcon::Small)), + bm->text(), newMenu, -1 /* dummy id */, -1 /* end of list */); + + if( !_bookmarkIDTable.find( menu ) ) + _bookmarkIDTable.insert( menu, new QMap ); + (*_bookmarkIDTable[ menu ])[ id ] = bm; + + ++inSecondaryMenu; + buildMenu(bm, newMenu); + --inSecondaryMenu; + } + for (KrBookmark *bm = parent->children().first(); bm; bm = parent->children().next()) { + if (bm->isFolder()) continue; + if (bm->isSeparator() ) { + menu->insertSeparator(); + continue; + } + int itemIndex = bm->plug(menu, -1 /* end of list */); + CONNECT_BM(bm); + + int id = bm->itemId( itemIndex ); + if( !_bookmarkIDTable.find( menu ) ) + _bookmarkIDTable.insert( menu, new QMap ); + (*_bookmarkIDTable[ menu ])[ id ] = bm; + } + + if (!inSecondaryMenu) { + krConfig->setGroup( "Private" ); + bool hasPopularURLs = krConfig->readBoolEntry( "BM Popular URLs", true ); + bool hasDevices = krConfig->readBoolEntry( "BM Devices", true ); + bool hasLan = krConfig->readBoolEntry( "BM Lan", true ); + bool hasVirtualFS = krConfig->readBoolEntry( "BM Virtual FS", true ); + bool hasJumpback = krConfig->readBoolEntry( "BM Jumpback", true ); + + int itemIndex; + + if( hasPopularURLs ) { + menu->insertSeparator(); + + // add the popular links submenu + KPopupMenu *newMenu = new KPopupMenu(menu); + itemIndex = menu->insertItem(QIconSet(krLoader->loadIcon("bookmark_folder", KIcon::Small)), + i18n("Popular URLs"), newMenu, -1 /* dummy id */, -1 /* end of list */); + _specialBookmarkIDs.append( itemIndex ); + // add the top 15 urls + #define MAX 15 + KURL::List list = krApp->popularUrls->getMostPopularUrls(MAX); + KURL::List::Iterator it; + for (it = list.begin(); it != list.end(); ++it) { + QString name; + if ((*it).isLocalFile()) name = (*it).path(); + else name = (*it).prettyURL(); + // note: these bookmark are put into the private collection + // as to not spam the general collection + KrBookmark *bm = KrBookmark::getExistingBookmark(name, _privateCollection); + if (!bm) + bm = new KrBookmark(name, *it, _privateCollection); + bm->plug(newMenu); + CONNECT_BM(bm); + } + + newMenu->insertSeparator(); + krPopularUrls->plug(newMenu); + newMenu->installEventFilter(this); + } + + // do we need to add special bookmarks? + if (SPECIAL_BOOKMARKS) { + if( hasDevices || hasLan || hasVirtualFS || hasJumpback ) + menu->insertSeparator(); + + KrBookmark *bm; + + // note: special bookmarks are not kept inside the _bookmarks list and added ad-hoc + if( hasDevices ) { + bm = KrBookmark::devices(_collection); + itemIndex = bm->plug(menu); + _specialBookmarkIDs.append( bm->itemId( itemIndex ) ); + CONNECT_BM(bm); + } + + if( hasLan ) { + bm = KrBookmark::lan(_collection); + itemIndex = bm->plug(menu); + _specialBookmarkIDs.append( bm->itemId( itemIndex ) ); + CONNECT_BM(bm); + } + + if( hasVirtualFS ) { + bm = KrBookmark::virt(_collection); + itemIndex = bm->plug(menu); + _specialBookmarkIDs.append( bm->itemId( itemIndex ) ); + CONNECT_BM(bm); + } + + if( hasJumpback ) { + // add the jump-back button + itemIndex = krJumpBack->plug(menu); + _specialBookmarkIDs.append( krJumpBack->itemId( itemIndex ) ); + menu->insertSeparator(); + itemIndex = krSetJumpBack->plug(menu); + _specialBookmarkIDs.append( krSetJumpBack->itemId( itemIndex ) ); + } + } + + if( !hasJumpback ) + menu->insertSeparator(); + + itemIndex = menu->insertItem(krLoader->loadIcon("bookmark_add", KIcon::Small), + i18n("Bookmark Current"), BookmarkCurrent); + _specialBookmarkIDs.append( itemIndex ); + itemIndex = menu->insertItem(krLoader->loadIcon("bookmark", KIcon::Small), + i18n("Manage Bookmarks"), ManageBookmarks); + _specialBookmarkIDs.append( itemIndex ); + + // make sure the menu is connected to us + disconnect(menu, SIGNAL(activated(int)), 0, 0); + connect(menu, SIGNAL(activated(int)), this, SLOT(menuOperation(int))); + } + + menu->installEventFilter(this); +} + +void KrBookmarkHandler::clearBookmarks(KrBookmark *root) { + KrBookmark *bm = root->children().first(); + while (bm) { + if (bm->isFolder()) + clearBookmarks(bm); + else { + bm->unplugAll(); + delete bm; + } + + bm = root->children().next(); + } + root->children().clear(); +} + +void KrBookmarkHandler::bookmarksChanged(const QString&, const QString&) { + importFromFile(); +} + +bool KrBookmarkHandler::eventFilter( QObject *obj, QEvent *ev ) { + if (ev->type() == QEvent::MouseButtonRelease) { + switch (static_cast(ev)->button()) { + case RightButton: + _middleClick = false; + if( obj->inherits( "QPopupMenu" ) ) { + int id = static_cast(obj)->idAt( static_cast(ev)->pos() ); + + if( obj == _mainBookmarkPopup && _specialBookmarkIDs.contains( id ) ) { + rightClickOnSpecialBookmark(); + return true; + } + + if( _bookmarkIDTable.find( obj ) ) { + QMap * table = _bookmarkIDTable[ obj ]; + if( table && table->count( id ) ) { + KrBookmark *bm = (*table)[ id ]; + rightClicked( static_cast(obj), id, bm ); + return true; + } + } + } + case LeftButton: + _middleClick = false; + break; + case MidButton: + _middleClick = true; + break; + default: + break; + } + } + return QObject::eventFilter(obj, ev); +} + +#define POPULAR_URLS_ID 100100 +#define DEVICES_ID 100101 +#define LAN_ID 100103 +#define VIRTUAL_FS_ID 100102 +#define JUMP_BACK_ID 100104 + +void KrBookmarkHandler::rightClickOnSpecialBookmark() { + krConfig->setGroup( "Private" ); + bool hasPopularURLs = krConfig->readBoolEntry( "BM Popular URLs", true ); + bool hasDevices = krConfig->readBoolEntry( "BM Devices", true ); + bool hasLan = krConfig->readBoolEntry( "BM Lan", true ); + bool hasVirtualFS = krConfig->readBoolEntry( "BM Virtual FS", true ); + bool hasJumpback = krConfig->readBoolEntry( "BM Jumpback", true ); + + QPopupMenu menu( _mainBookmarkPopup ); + menu.setCaption( i18n( "Enable special bookmarks" ) ); + menu.setCheckable( true ); + + menu.insertItem( i18n( "Popular URLs" ), POPULAR_URLS_ID ); + menu.setItemChecked( POPULAR_URLS_ID, hasPopularURLs ); + menu.insertItem( i18n( "Devices" ), DEVICES_ID ); + menu.setItemChecked( DEVICES_ID, hasDevices ); + menu.insertItem( i18n( "Local Network" ), LAN_ID ); + menu.setItemChecked( LAN_ID, hasLan ); + menu.insertItem( i18n( "Virtual Filesystem" ), VIRTUAL_FS_ID ); + menu.setItemChecked( VIRTUAL_FS_ID, hasVirtualFS ); + menu.insertItem( i18n( "Jump back" ), JUMP_BACK_ID ); + menu.setItemChecked( JUMP_BACK_ID, hasJumpback ); + + connect( _mainBookmarkPopup, SIGNAL( highlighted( int ) ), &menu, SLOT( close() ) ); + connect( _mainBookmarkPopup, SIGNAL( activated( int ) ), &menu, SLOT( close() ) ); + + int result = menu.exec( QCursor::pos() ); + bool doCloseMain = true; + + krConfig->setGroup( "Private" ); + + switch( result ) { + case POPULAR_URLS_ID: + krConfig->writeEntry( "BM Popular URLs", !hasPopularURLs ); + break; + case DEVICES_ID: + krConfig->writeEntry( "BM Devices", !hasDevices ); + break; + case LAN_ID: + krConfig->writeEntry( "BM Lan", !hasLan ); + break; + case VIRTUAL_FS_ID: + krConfig->writeEntry( "BM Virtual FS", !hasVirtualFS ); + break; + case JUMP_BACK_ID: + krConfig->writeEntry( "BM Jumpback", !hasJumpback ); + break; + default: + doCloseMain = false; + break; + } + + menu.close(); + + if( doCloseMain && _mainBookmarkPopup ) + _mainBookmarkPopup->close(); +} + +#define OPEN_ID 100200 +#define OPEN_NEW_TAB_ID 100201 +#define DELETE_ID 100202 + +void KrBookmarkHandler::rightClicked( QPopupMenu *menu, int /*id*/, KrBookmark * bm ) { + QPopupMenu popup( _mainBookmarkPopup ); + + popup.insertItem( krLoader->loadIcon( "fileopen", KIcon::Panel ), i18n( "Open" ), OPEN_ID ); + popup.insertItem( krLoader->loadIcon( "tab_new", KIcon::Panel ), i18n( "Open in a new tab" ), OPEN_NEW_TAB_ID ); + popup.insertSeparator(); + popup.insertItem( krLoader->loadIcon( "editdelete", KIcon::Panel ), i18n( "Delete" ), DELETE_ID ); + + connect( menu, SIGNAL( highlighted( int ) ), &popup, SLOT( close() ) ); + connect( menu, SIGNAL( activated( int ) ), &popup, SLOT( close() ) ); + + int result = popup.exec( QCursor::pos() ); + + popup.close(); + if( _mainBookmarkPopup && result >= OPEN_ID && result <= DELETE_ID ) { + _mainBookmarkPopup->close(); + } + + switch( result ) { + case OPEN_ID: + SLOTS->refresh( bm->url() ); + break; + case OPEN_NEW_TAB_ID: + SLOTS->newTab( bm->url() ); + break; + case DELETE_ID: + deleteBookmark( bm ); + break; + } +} + +// used to monitor middle clicks. if mid is found, then the +// bookmark is opened in a new tab. ugly, but easier than overloading +// KAction and KActionCollection. +void KrBookmarkHandler::slotActivated(const KURL& url) { + if (_middleClick) + SLOTS->newTab(url); + else SLOTS->refresh(url); +} + + +#include "krbookmarkhandler.moc" diff --git a/krusader/BookMan/krbookmarkhandler.h b/krusader/BookMan/krbookmarkhandler.h new file mode 100644 index 0000000..c6bd9d9 --- /dev/null +++ b/krusader/BookMan/krbookmarkhandler.h @@ -0,0 +1,63 @@ +#ifndef KRBOOKMARK_HANDLER_H +#define KRBOOKMARK_HANDLER_H + +#include "krbookmark.h" +#include +#include +#include +#include +#include +#include +#include +#include + +class KActionCollection; +class KBookmarkManager; + +class KrBookmarkHandler: public QObject { + Q_OBJECT + friend class KrAddBookmarkDlg; + enum Actions { BookmarkCurrent=0, ManageBookmarks }; +public: + KrBookmarkHandler(); + ~KrBookmarkHandler(); + void populate(KPopupMenu *menu); + void addBookmark(KrBookmark *bm, KrBookmark *parent = 0); + void bookmarkCurrent(KURL url); + +protected: + void deleteBookmark(KrBookmark *bm); + void importFromFile(); + bool importFromFileBookmark(QDomElement &e, KrBookmark *parent, QString path, QString *errorMsg); + bool importFromFileFolder(QDomNode &first, KrBookmark *parent, QString path, QString *errorMsg); + void exportToFile(); + void exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder); + void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); + void clearBookmarks(KrBookmark *root); + void buildMenu(KrBookmark *parent, KPopupMenu *menu); + + bool eventFilter( QObject *obj, QEvent *ev ); + + void rightClicked( QPopupMenu *menu, int id, KrBookmark *bm ); + void rightClickOnSpecialBookmark(); + + void removeReferences( KrBookmark *root, KrBookmark *bmToRemove ); + +protected slots: + void menuOperation(int id); + void bookmarksChanged(const QString&, const QString&); + void slotActivated(const KURL& url); + +private: + KActionCollection *_collection, *_privateCollection; + KrBookmark *_root; + // the whole KBookmarkManager is an ugly hack. use it until we have our own + KBookmarkManager *manager; + bool _middleClick; // if true, the user clicked the middle button to open the bookmark + + QGuardedPtr _mainBookmarkPopup; // main bookmark popup menu + QValueList _specialBookmarkIDs; // the ID list of the special bookmarks + QPtrDict > _bookmarkIDTable; // the IDs of the bookmarks +}; + +#endif // KRBOOKMARK_HANDLER_H diff --git a/krusader/Dialogs/Makefile.am b/krusader/Dialogs/Makefile.am new file mode 100644 index 0000000..83cc13d --- /dev/null +++ b/krusader/Dialogs/Makefile.am @@ -0,0 +1,22 @@ +noinst_LIBRARIES = libDialogs.a + +INCLUDES = $(all_includes) + +libDialogs_a_METASOURCES = AUTO + +libDialogs_a_SOURCES = \ + krsqueezedtextlabel.cpp \ + krprogress.cpp \ + packgui.cpp \ + packguibase.cpp \ + newftpgui.cpp \ + krspwidgets.cpp \ + krspecialwidgets.cpp \ + krpleasewait.cpp \ + krmaskchoice.cpp \ + krdialogs.cpp \ + kurllistrequester.cpp \ + popularurls.cpp \ + checksumdlg.cpp \ + percentalsplitter.cpp \ + krkeydialog.cpp diff --git a/krusader/Dialogs/checksumdlg.cpp b/krusader/Dialogs/checksumdlg.cpp new file mode 100644 index 0000000..c79a66e --- /dev/null +++ b/krusader/Dialogs/checksumdlg.cpp @@ -0,0 +1,603 @@ +#include "checksumdlg.h" +#include "../krusader.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../krservices.h" +#include +#include +#include +#include + +class CS_Tool; // forward +typedef void PREPARE_PROC_FUNC(KProcess& proc, CS_Tool *self, const QStringList& files, + const QString checksumFile, bool recursive, const QString& stdoutFileName, + const QString& stderrFileName, const QString& type=QString::null); +typedef QStringList GET_FAILED_FUNC(const QStringList& stdOut, const QStringList& stdErr); + +class CS_Tool { +public: + enum Type { + MD5=0, SHA1, SHA256, TIGER, WHIRLPOOL, SFV, CRC, + SHA224, SHA384, SHA512, + NumOfTypes + }; + + Type type; + QString binary; + bool recursive; + bool standardFormat; + PREPARE_PROC_FUNC *create, *verify; + GET_FAILED_FUNC *failed; +}; + +class CS_ToolByType { +public: + QPtrList tools, r_tools; // normal and recursive tools +}; + +// handles md5sum and sha1sum +void sumCreateFunc(KProcess& proc, CS_Tool *self, const QStringList& files, + const QString, bool recursive, const QString& stdoutFileName, + const QString& stderrFileName, const QString&) { + proc.setUseShell(true, "/bin/bash"); + proc << KrServices::fullPathName( self->binary ); + Q_ASSERT(!recursive); + proc << files << "1>" << stdoutFileName << "2>" << stderrFileName; +} + +void sumVerifyFunc(KProcess& proc, CS_Tool *self, const QStringList& /* files */, + const QString checksumFile, bool recursive, const QString& stdoutFileName, + const QString& stderrFileName, const QString& /* type */) { + proc.setUseShell(true, "/bin/bash"); + proc << KrServices::fullPathName( self->binary ); + Q_ASSERT(!recursive); + proc << "-c" << checksumFile << "1>" << stdoutFileName << "2>" << stderrFileName; +} + +QStringList sumFailedFunc(const QStringList& stdOut, const QStringList& stdErr) { + // md5sum and sha1sum print "...: FAILED" for failed files and display + // the number of failures to stderr. so if stderr is empty, we'll assume all is ok + QStringList result; + if (stdErr.size()==0) return result; + result += stdErr; + // grep for the ":FAILED" substring + const QString tmp = QString(": FAILED").local8Bit(); + for (uint i=0; ibinary ); + if (recursive) proc << "-r"; + proc << "-l" << files << "1>" << stdoutFileName << "2>" << stderrFileName; +} + +void deepVerifyFunc(KProcess& proc, CS_Tool *self, const QStringList& files, + const QString checksumFile, bool recursive, const QString& stdoutFileName, + const QString& stderrFileName, const QString&) { + proc.setUseShell(true, "/bin/bash"); + proc << KrServices::fullPathName( self->binary ); + if (recursive) proc << "-r"; + proc << "-x" << checksumFile << files << "1>" << stdoutFileName << "2>" << stderrFileName; +} + +QStringList deepFailedFunc(const QStringList& stdOut, const QStringList&/* stdErr */) { + // *deep dumps (via -x) all failed hashes to stdout + return stdOut; +} + +// handles cfv binary +void cfvCreateFunc(KProcess& proc, CS_Tool *self, const QStringList& files, + const QString, bool recursive, const QString& stdoutFileName, + const QString& stderrFileName, const QString& type) { + proc.setUseShell(true, "/bin/bash"); + proc << KrServices::fullPathName( self->binary ) << "-C" << "-VV"; + if (recursive) proc << "-rr"; + proc << "-t" << type << "-f-" << "-U" << files << "1>" << stdoutFileName << "2>" << stderrFileName; +} + +void cfvVerifyFunc(KProcess& proc, CS_Tool *self, const QStringList& /* files */, + const QString checksumFile, bool recursive, const QString& stdoutFileName, + const QString& stderrFileName, const QString&type) { + proc.setUseShell(true, "/bin/bash"); + proc << KrServices::fullPathName( self->binary ) << "-M"; + if (recursive) proc << "-rr"; + proc << "-U" << "-VV" << "-t" << type << "-f" << checksumFile << "1>" << stdoutFileName << "2>" << stderrFileName;// << files; +} + +QStringList cfvFailedFunc(const QStringList& /* stdOut */, const QStringList& stdErr) { + // cfv dumps all failed hashes to stderr + return stdErr; +} + +// important: this table should be ordered like so that all md5 tools should be +// one after another, and then all sha1 and so on and so forth. they tools must be grouped, +// since the code in getTools() counts on it! +CS_Tool cs_tools[] = { + // type binary recursive stdFmt create_func verify_func failed_func + {CS_Tool::MD5, "md5sum", false, true, sumCreateFunc, sumVerifyFunc, sumFailedFunc}, + {CS_Tool::MD5, "md5deep", true, true, deepCreateFunc, deepVerifyFunc, deepFailedFunc}, + {CS_Tool::MD5, "cfv", true, true, cfvCreateFunc, cfvVerifyFunc, cfvFailedFunc}, + {CS_Tool::SHA1, "sha1sum", false, true, sumCreateFunc, sumVerifyFunc, sumFailedFunc}, + {CS_Tool::SHA1, "sha1deep", true, true, deepCreateFunc, deepVerifyFunc, deepFailedFunc}, + {CS_Tool::SHA1, "cfv", true, true, cfvCreateFunc, cfvVerifyFunc, cfvFailedFunc}, + {CS_Tool::SHA224, "sha224sum", false, true, sumCreateFunc, sumVerifyFunc, sumFailedFunc}, + {CS_Tool::SHA256, "sha256sum", false, true, sumCreateFunc, sumVerifyFunc, sumFailedFunc}, + {CS_Tool::SHA256, "sha256deep", true, true, deepCreateFunc, deepVerifyFunc, deepFailedFunc}, + {CS_Tool::SHA384, "sha384sum", false, true, sumCreateFunc, sumVerifyFunc, sumFailedFunc}, + {CS_Tool::SHA512, "sha512sum", false, true, sumCreateFunc, sumVerifyFunc, sumFailedFunc}, + {CS_Tool::TIGER, "tigerdeep", true, true, deepCreateFunc, deepVerifyFunc, deepFailedFunc}, + {CS_Tool::WHIRLPOOL, "whirlpooldeep", true, true, deepCreateFunc, deepVerifyFunc, deepFailedFunc}, + {CS_Tool::SFV, "cfv", true, false, cfvCreateFunc, cfvVerifyFunc, cfvFailedFunc}, + {CS_Tool::CRC, "cfv", true, false, cfvCreateFunc, cfvVerifyFunc, cfvFailedFunc}, +}; + +QMap cs_textToType; +QMap cs_typeToText; + +void initChecksumModule() { + // prepare the dictionaries - pity it has to be manually + cs_textToType["md5"]=CS_Tool::MD5; + cs_textToType["sha1"]=CS_Tool::SHA1; + cs_textToType["sha256"]=CS_Tool::SHA256; + cs_textToType["sha224"]=CS_Tool::SHA224; + cs_textToType["sha384"]=CS_Tool::SHA384; + cs_textToType["sha512"]=CS_Tool::SHA512; + cs_textToType["tiger"]=CS_Tool::TIGER; + cs_textToType["whirlpool"]=CS_Tool::WHIRLPOOL; + cs_textToType["sfv"]=CS_Tool::SFV; + cs_textToType["crc"]=CS_Tool::CRC; + + cs_typeToText[CS_Tool::MD5]="md5"; + cs_typeToText[CS_Tool::SHA1]="sha1"; + cs_typeToText[CS_Tool::SHA256]="sha256"; + cs_typeToText[CS_Tool::SHA224]="sha224"; + cs_typeToText[CS_Tool::SHA384]="sha384"; + cs_typeToText[CS_Tool::SHA512]="sha512"; + cs_typeToText[CS_Tool::TIGER]="tiger"; + cs_typeToText[CS_Tool::WHIRLPOOL]="whirlpool"; + cs_typeToText[CS_Tool::SFV]="sfv"; + cs_typeToText[CS_Tool::CRC]="crc"; + + // build the checksumFilter (for usage in KRQuery) + QMap::Iterator it; + for (it=cs_textToType.begin(); it!=cs_textToType.end(); ++it) + MatchChecksumDlg::checksumTypesFilter += ("*."+it.key()+" "); +} + +// -------------------------------------------------- + +// returns a list of tools which can work with recursive or non-recursive mode and are installed +// note: only 1 tool from each type is suggested +static QPtrList getTools(bool folders) { + QPtrList result; + uint i; + for (i=0; i < sizeof(cs_tools)/sizeof(CS_Tool); ++i) { + if (result.last() && result.last()->type == cs_tools[i].type) continue; // 1 from each type please + if (folders && !cs_tools[i].recursive) continue; + if (KrServices::cmdExist(cs_tools[i].binary)) + result.append(&cs_tools[i]); + } + + return result; +} + +// ------------- CreateChecksumDlg + +CreateChecksumDlg::CreateChecksumDlg(const QStringList& files, bool containFolders, const QString& path): + KDialogBase(Plain, i18n("Create Checksum"), Ok | Cancel, Ok, krApp) { + + QPtrList tools = getTools(containFolders); + + if (tools.count() == 0) { // nothing was suggested?! + QString error = i18n("Can't calculate checksum since no supported tool was found. " + "Please check the Dependencies page in Krusader's settings."); + if (containFolders) + error += i18n("Note: you've selected directories, and probably have no recursive checksum tool installed." + " Krusader currently supports md5deep, sha1deep, sha256deep, tigerdeep and cfv"); + KMessageBox::error(0, error); + return; + } + + QGridLayout *layout = new QGridLayout( plainPage(), 1, 1, + KDialogBase::marginHint(), KDialogBase::spacingHint()); + + int row=0; + + // title (icon+text) + QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint()); + QLabel *p = new QLabel(plainPage()); + p->setPixmap(krLoader->loadIcon("binary", KIcon::Desktop, 32)); + hlayout->addWidget(p); + QLabel *l1 = new QLabel(i18n("About to calculate checksum for the following files") + + (containFolders ? i18n(" and folders:") : ":"), plainPage()); + hlayout->addWidget(l1); + layout->addMultiCellLayout(hlayout, row, row, 0, 1, Qt::AlignLeft); + ++row; + + // file list + KListBox *lb = new KListBox(plainPage()); + lb->insertStringList(files); + layout->addMultiCellWidget(lb, row, row, 0, 1); + ++row; + + // checksum method + QHBoxLayout *hlayout2 = new QHBoxLayout(layout, KDialogBase::spacingHint()); + QLabel *l2 = new QLabel(i18n("Select the checksum method:"), plainPage()); + hlayout2->addWidget(l2); + KComboBox *method = new KComboBox(plainPage()); + // -- fill the combo with available methods + uint i; + for ( i=0; iinsertItem( cs_typeToText[tools.at(i)->type], i); + method->setFocus(); + hlayout2->addWidget(method); + layout->addMultiCellLayout(hlayout2, row, row, 0, 1, Qt::AlignLeft); + ++row; + + if (exec() != Accepted) return; + // else implied: run the process + tmpOut = new KTempFile(locateLocal("tmp", "krusader"), ".stdout" ); + tmpErr = new KTempFile(locateLocal("tmp", "krusader"), ".stderr" ); + KProcess proc; + CS_Tool *mytool = tools.at(method->currentItem()); + mytool->create(proc, mytool, KrServices::quote(files), QString::null, containFolders, + tmpOut->name(), tmpErr->name(), method->currentText()); + + krApp->startWaiting(i18n("Calculating checksums ..."), 0, true); + QApplication::setOverrideCursor( KCursor::waitCursor() ); + bool r = proc.start(KProcess::NotifyOnExit, KProcess::AllOutput); + if (r) while ( proc.isRunning() ) { + usleep( 500 ); + qApp->processEvents(); + if (krApp->wasWaitingCancelled()) { // user cancelled + proc.kill(); + QApplication::restoreOverrideCursor(); + return; + } + }; + krApp->stopWait(); + QApplication::restoreOverrideCursor(); + if (!r || !proc.normalExit()) { + KMessageBox::error(0, i18n("There was an error while running %1.").arg(mytool->binary)); + return; + } + + // suggest a filename + QString suggestedFilename = path + '/'; + if (files.count() > 1) suggestedFilename += ("checksum." + cs_typeToText[mytool->type]); + else suggestedFilename += (files[0] + '.' + cs_typeToText[mytool->type]); + // send both stdout and stderr + QStringList stdOut, stdErr; + if (!KrServices::fileToStringList(tmpOut->textStream(), stdOut) || + !KrServices::fileToStringList(tmpErr->textStream(), stdErr)) { + KMessageBox::error(krApp, i18n("Error reading stdout or stderr")); + return; + } + + ChecksumResultsDlg dlg( stdOut, stdErr, suggestedFilename, mytool->binary, cs_typeToText[mytool->type], mytool->standardFormat); + tmpOut->unlink(); delete tmpOut; + tmpErr->unlink(); delete tmpErr; +} + +// ------------- MatchChecksumDlg + +QString MatchChecksumDlg::checksumTypesFilter; + +MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders, + const QString& path, const QString& checksumFile): + KDialogBase(Plain, i18n("Verify Checksum"), Ok | Cancel, Ok, krApp) { + + QPtrList tools = getTools(containFolders); + + if (tools.count() == 0) { // nothing was suggested?! + QString error = i18n("Can't verify checksum since no supported tool was found. " + "Please check the Dependencies page in Krusader's settings."); + if (containFolders) + error += i18n("Note: you've selected directories, and probably have no recursive checksum tool installed." + " Krusader currently supports md5deep, sha1deep, sha256deep, tigerdeep and cfv"); + KMessageBox::error(0, error); + return; + } + + QGridLayout *layout = new QGridLayout( plainPage(), 1, 1, + KDialogBase::marginHint(), KDialogBase::spacingHint()); + + int row=0; + + // title (icon+text) + QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint()); + QLabel *p = new QLabel(plainPage()); + p->setPixmap(krLoader->loadIcon("binary", KIcon::Desktop, 32)); + hlayout->addWidget(p); + QLabel *l1 = new QLabel(i18n("About to verify checksum for the following files") + + (containFolders ? i18n(" and folders:") : ":"), plainPage()); + hlayout->addWidget(l1); + layout->addMultiCellLayout(hlayout, row, row, 0, 1, Qt::AlignLeft); + ++row; + + // file list + KListBox *lb = new KListBox(plainPage()); + lb->insertStringList(files); + layout->addMultiCellWidget(lb, row, row, 0, 1); + ++row; + + // checksum file + QHBoxLayout *hlayout2 = new QHBoxLayout(layout, KDialogBase::spacingHint()); + QLabel *l2 = new QLabel(i18n("Checksum file:"), plainPage()); + hlayout2->addWidget(l2); + KURLRequester *checksumFileReq = new KURLRequester( plainPage() ); + if (!checksumFile.isEmpty()) + checksumFileReq->setURL(checksumFile); + checksumFileReq->fileDialog()->setURL(path); + checksumFileReq->setFocus(); + hlayout2->addWidget(checksumFileReq); + layout->addMultiCellLayout(hlayout2, row, row, 0, 1, Qt::AlignLeft); + + if (exec() != Accepted) return; + QString file = checksumFileReq->url(); + QString extension; + if (!verifyChecksumFile(file, extension)) { + KMessageBox::error(0, i18n("Error reading checksum file %1.
Please specify a valid checksum file.
").arg(file)); + return; + } + + // do we have a tool for that extension? + uint i; + CS_Tool *mytool = 0; + for ( i=0; i < tools.count(); ++i ) + if (cs_typeToText[tools.at(i)->type] == extension.lower()) { + mytool = tools.at(i); + break; + } + if (!mytool) { + KMessageBox::error(0, i18n("Krusader can't find a checksum tool that handles %1 on your system. Please check the Dependencies page in Krusader's settings.").arg(extension)); + return; + } + + // else implied: run the process + tmpOut = new KTempFile(locateLocal("tmp", "krusader"), ".stdout" ); + tmpErr = new KTempFile(locateLocal("tmp", "krusader"), ".stderr" ); + KProcess proc; + mytool->verify(proc, mytool, KrServices::quote(files), KrServices::quote(file), containFolders, tmpOut->name(), tmpErr->name(), extension); + krApp->startWaiting(i18n("Verifying checksums ..."), 0, true); + QApplication::setOverrideCursor( KCursor::waitCursor() ); + bool r = proc.start(KProcess::NotifyOnExit, KProcess::AllOutput); + if (r) while ( proc.isRunning() ) { + usleep( 500 ); + qApp->processEvents(); + if (krApp->wasWaitingCancelled()) { // user cancelled + proc.kill(); + QApplication::restoreOverrideCursor(); + return; + } + }; + if (!r || !proc.normalExit()) { + KMessageBox::error(0, i18n("There was an error while running %1.").arg(mytool->binary)); + return; + } + QApplication::restoreOverrideCursor(); + krApp->stopWait(); + // send both stdout and stderr + QStringList stdOut,stdErr; + if (!KrServices::fileToStringList(tmpOut->textStream(), stdOut) || + !KrServices::fileToStringList(tmpErr->textStream(), stdErr)) { + KMessageBox::error(krApp, i18n("Error reading stdout or stderr")); + return; + } + VerifyResultDlg dlg(mytool->failed(stdOut, stdErr)); + tmpOut->unlink(); delete tmpOut; + tmpErr->unlink(); delete tmpErr; +} + +bool MatchChecksumDlg::verifyChecksumFile(QString path, QString& extension) { + QFileInfo f(path); + if (!f.exists() || f.isDir()) return false; + // find the extension + extension = path.mid(path.findRev(".")+1); + + // TODO: do we know the extension? if not, ask the user for one + + + return true; +} + +// ------------- VerifyResultDlg +VerifyResultDlg::VerifyResultDlg(const QStringList& failed): + KDialogBase(Plain, i18n("Verify Checksum"), Close, Close, krApp) { + QGridLayout *layout = new QGridLayout( plainPage(), 1, 1, + KDialogBase::marginHint(), KDialogBase::spacingHint()); + + bool errors = failed.size()>0; + int row = 0; + + // create the icon and title + QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint()); + QLabel p(plainPage()); + p.setPixmap(krLoader->loadIcon(errors ? "messagebox_critical" : "messagebox_info", KIcon::Desktop, 32)); + hlayout->addWidget(&p); + + QLabel *l1 = new QLabel((errors ? i18n("Errors were detected while verifying the checksums") : + i18n("Checksums were verified successfully")), plainPage()); + hlayout->addWidget(l1); + layout->addMultiCellLayout(hlayout,row,row,0,1, Qt::AlignLeft); + ++row; + + if (errors) { + QLabel *l3 = new QLabel(i18n("The following files have failed:"), plainPage()); + layout->addMultiCellWidget(l3, row, row, 0, 1); + ++row; + KListBox *lb2 = new KListBox(plainPage()); + lb2->insertStringList(failed); + layout->addMultiCellWidget(lb2, row, row, 0, 1); + ++row; + } + + exec(); +} + +// ------------- ChecksumResultsDlg + +ChecksumResultsDlg::ChecksumResultsDlg(const QStringList& stdOut, const QStringList& stdErr, + const QString& suggestedFilename, const QString& binary, const QString& /* type */, bool standardFormat): + KDialogBase(Plain, i18n("Create Checksum"), Ok | Cancel, Ok, krApp), _binary(binary) { + QGridLayout *layout = new QGridLayout( plainPage(), 1, 1, + KDialogBase::marginHint(), KDialogBase::spacingHint()); + + // md5 tools display errors into stderr, so we'll use that to determine the result of the job + bool errors = stdErr.size()>0; + bool successes = stdOut.size()>0; + int row = 0; + + // create the icon and title + QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint()); + QLabel p(plainPage()); + p.setPixmap(krLoader->loadIcon(errors ? "messagebox_critical" : "messagebox_info", KIcon::Desktop, 32)); + hlayout->addWidget(&p); + + QLabel *l1 = new QLabel((errors ? i18n("Errors were detected while creating the checksums") : + i18n("Checksums were created successfully")), plainPage()); + hlayout->addWidget(l1); + layout->addMultiCellLayout(hlayout,row,row,0,1, Qt::AlignLeft); + ++row; + + if (successes) { + if (errors) { + QLabel *l2 = new QLabel(i18n("Here are the calculated checksums:"), plainPage()); + layout->addMultiCellWidget(l2, row, row, 0, 1); + ++row; + } + KListView *lv = new KListView(plainPage()); + if(standardFormat){ + lv->addColumn(i18n("Hash")); + lv->addColumn(i18n("File")); + lv->setAllColumnsShowFocus(true); + } else { + lv->addColumn(i18n("File and hash")); + } + for ( QStringList::ConstIterator it = stdOut.begin(); it != stdOut.end(); ++it ) { + QString line = (*it); + if(standardFormat) { + int space = line.find(' '); + new KListViewItem(lv, line.left(space), line.mid(space+2)); + } else { + new KListViewItem(lv, line); + } + } + layout->addMultiCellWidget(lv, row, row, 0, 1); + ++row; + } + + if (errors) { + QFrame *line1 = new QFrame( plainPage() ); + line1->setGeometry( QRect( 60, 210, 501, 20 ) ); + line1->setFrameShape( QFrame::HLine ); + line1->setFrameShadow( QFrame::Sunken ); + layout->addMultiCellWidget(line1, row, row, 0, 1); + ++row; + + QLabel *l3 = new QLabel(i18n("Here are the errors received:"), plainPage()); + layout->addMultiCellWidget(l3, row, row, 0, 1); + ++row; + KListBox *lb = new KListBox(plainPage()); + lb->insertStringList(stdErr); + layout->addMultiCellWidget(lb, row, row, 0, 1); + ++row; + } + + // save checksum to disk, if any hashes are found + KURLRequester *checksumFile=0; + QCheckBox *saveFileCb=0; + if (successes) { + QHBoxLayout *hlayout2 = new QHBoxLayout(layout, KDialogBase::spacingHint()); + saveFileCb = new QCheckBox(i18n("Save checksum to file:"), plainPage()); + saveFileCb->setChecked(true); + hlayout2->addWidget(saveFileCb); + + checksumFile = new KURLRequester( suggestedFilename, plainPage() ); + hlayout2->addWidget(checksumFile, Qt::AlignLeft); + layout->addMultiCellLayout(hlayout2, row, row,0,1, Qt::AlignLeft); + ++row; + connect(saveFileCb, SIGNAL(toggled(bool)), checksumFile, SLOT(setEnabled(bool))); + checksumFile->setFocus(); + } + + QCheckBox *onePerFile=0; + if (stdOut.size() > 1 && standardFormat) { + onePerFile = new QCheckBox(i18n("Checksum file for each source file"), plainPage()); + onePerFile->setChecked(false); + // clicking this, disables the 'save as' part + connect(onePerFile, SIGNAL(toggled(bool)), saveFileCb, SLOT(toggle())); + connect(onePerFile, SIGNAL(toggled(bool)), saveFileCb, SLOT(setDisabled(bool))); + connect(onePerFile, SIGNAL(toggled(bool)), checksumFile, SLOT(setDisabled(bool))); + layout->addMultiCellWidget(onePerFile, row, row,0,1, Qt::AlignLeft); + ++row; + } + + if (exec() == Accepted && successes) { + if (stdOut.size()>1 && standardFormat && onePerFile->isChecked()) { + savePerFile(stdOut, suggestedFilename.mid(suggestedFilename.findRev('.'))); + } else if (saveFileCb->isEnabled() && saveFileCb->isChecked() && !checksumFile->url().simplifyWhiteSpace().isEmpty()) { + saveChecksum(stdOut, checksumFile->url()); + } + } +} + +bool ChecksumResultsDlg::saveChecksum(const QStringList& data, QString filename) { + if (QFile::exists(filename) && + KMessageBox::warningContinueCancel(this, + i18n("File %1 already exists.\nAre you sure you want to overwrite it?").arg(filename), + i18n("Warning"), i18n("Overwrite")) != KMessageBox::Continue) { + // find a better name to save to + filename = KFileDialog::getSaveFileName(QString::null, "*", 0, i18n("Select a file to save to")); + if (filename.simplifyWhiteSpace().isEmpty()) return false; + } + QFile file(filename); + if (!file.open(IO_WriteOnly)) { + KMessageBox::detailedError(0, i18n("Error saving file %1").arg(filename), + file.errorString()); + return false; + } + QTextStream stream(&file); + for ( QStringList::ConstIterator it = data.constBegin(); it != data.constEnd(); ++it) + stream << *it << "\n"; + file.close(); + return true; +} + +void ChecksumResultsDlg::savePerFile(const QStringList& data, const QString& type) { + krApp->startWaiting(i18n("Saving checksum files..."), 0); + for ( QStringList::ConstIterator it = data.begin(); it != data.end(); ++it ) { + QString line = (*it); + QString filename = line.mid(line.find(' ')+2)+type; + if (!saveChecksum(*it, filename)) { + KMessageBox::error(0, i18n("Errors occured while saving multiple checksums. Stopping")); + krApp->stopWait(); + return; + } + } + krApp->stopWait(); +} diff --git a/krusader/Dialogs/checksumdlg.h b/krusader/Dialogs/checksumdlg.h new file mode 100644 index 0000000..41bb1ad --- /dev/null +++ b/krusader/Dialogs/checksumdlg.h @@ -0,0 +1,54 @@ +#ifndef CHECKSUMDLG_H +#define CHECKSUMDLG_H + +#include +#include + +class KTempFile; +extern void initChecksumModule(); + +class CreateChecksumDlg: public KDialogBase { +public: + CreateChecksumDlg(const QStringList& files, bool containFolders, const QString& path); + +private: + KTempFile *tmpOut, *tmpErr; +}; + + +class MatchChecksumDlg: public KDialogBase { +public: + MatchChecksumDlg(const QStringList& files, bool containFolders, + const QString& path, const QString& checksumFile=QString::null); + + static QString checksumTypesFilter; + +protected: + bool verifyChecksumFile(QString path, QString& extension); + +private: + KTempFile *tmpOut, *tmpErr; +}; + + +class ChecksumResultsDlg: public KDialogBase { +public: + ChecksumResultsDlg(const QStringList& stdOut, const QStringList& stdErr, + const QString& suggestedFilename, const QString& binary, const QString& type, + bool standardFormat); + +protected: + bool saveChecksum(const QStringList& data, QString filename); + void savePerFile(const QStringList& data, const QString& type); + +private: + QString _binary; +}; + + +class VerifyResultDlg: public KDialogBase { +public: + VerifyResultDlg(const QStringList& failed); +}; + +#endif // CHECKSUMDLG_H diff --git a/krusader/Dialogs/krdialogs.cpp b/krusader/Dialogs/krdialogs.cpp new file mode 100644 index 0000000..cbcc294 --- /dev/null +++ b/krusader/Dialogs/krdialogs.cpp @@ -0,0 +1,255 @@ +/*************************************************************************** + krdialogs.cpp + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + + +// Krusader includes +#include "krdialogs.h" +// QT includes +#include +#include +#include +#include +#include +// KDE includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// Krusader includes +#include "../krusader.h" +#include "../resources.h" +#include "../VFS/vfs.h" +#include "../defaults.h" +#include + +KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd) { + KURLRequesterDlg *dlg = new KURLRequesterDlg( vfs::pathOrURL( url, 1 ),text,krApp,""); + dlg->urlRequester()->completionObject()->setDir(cwd.url()); + KURL u; + if (dlg->exec() == QDialog::Accepted) { + u = vfs::fromPathOrURL(dlg->urlRequester()->completionObject()->replacedPath( + dlg->urlRequester()->lineEdit()->text())); + if (u.isRelativeURL(u.url())) { + KURL temp = u; + u = cwd; + u.addPath(temp.url()); + u.cleanPath(); + if( u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso" ) { + if( QDir( u.path() ).exists() ) + u.setProtocol( "file" ); + } + } + } + delete dlg; + return u; +} + +KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &preserveAttrs ) { + KURLRequesterDlgForCopy *dlg = new KURLRequesterDlgForCopy( vfs::pathOrURL( url, 1 ),text, preserveAttrs, krApp,"" ); + dlg->urlRequester()->completionObject()->setDir(cwd.url()); + KURL u; + if (dlg->exec() == QDialog::Accepted) { + u = vfs::fromPathOrURL(dlg->urlRequester()->completionObject()->replacedPath( + dlg->urlRequester()->lineEdit()->text())); + if (u.isRelativeURL(u.url())) { + KURL temp = u; + u = cwd; + u.addPath(temp.url()); + u.cleanPath(); + if( u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso" ) { + if( QDir( u.path() ).exists() ) + u.setProtocol( "file" ); + } + } + } + preserveAttrs = dlg->preserveAttrs(); + delete dlg; + return u; +} + +KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &preserveAttrs, KURL &baseURL ) { + KURLRequesterDlgForCopy *dlg = new KURLRequesterDlgForCopy( vfs::pathOrURL( url, 1 ),text, preserveAttrs, krApp,"", true, baseURL ); + dlg->urlRequester()->completionObject()->setDir(cwd.url()); + KURL u; + if (dlg->exec() == QDialog::Accepted) { + u = vfs::fromPathOrURL(dlg->urlRequester()->completionObject()->replacedPath( + dlg->urlRequester()->lineEdit()->text())); + if (u.isRelativeURL(u.url())) { + KURL temp = u; + u = cwd; + u.addPath(temp.url()); + u.cleanPath(); + if( u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso" ) { + if( QDir( u.path() ).exists() ) + u.setProtocol( "file" ); + } + } + + if( dlg->copyDirStructure() ) { + baseURL = dlg->baseURL(); + } else { + baseURL = KURL(); + } + } + preserveAttrs = dlg->preserveAttrs(); + delete dlg; + return u; +} + +KURLRequesterDlgForCopy::KURLRequesterDlgForCopy( const QString& urlName, const QString& _text, bool presAttrs, QWidget *parent, + const char *name, bool modal, KURL baseURL ) + : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name, modal, true, KStdGuiItem::clear() ), + baseUrlCombo( 0 ), copyDirStructureCB( 0 ) { + + QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0, spacingHint() ); + + QLabel * label = new QLabel( _text, plainPage() ); + topLayout->addWidget( label ); + + urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" ); + urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 ); + topLayout->addWidget( urlRequester_ ); + preserveAttrsCB = new QCheckBox(i18n("Preserve attributes (only for local targets)"), plainPage()); + preserveAttrsCB->setChecked( presAttrs ); + topLayout->addWidget( preserveAttrsCB ); + if( !baseURL.isEmpty() ) { + QFrame *line = new QFrame( plainPage(), "sepLine" ); + line->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + topLayout->addWidget( line ); + copyDirStructureCB = new QCheckBox(i18n("Keep virtual directory structure"), plainPage()); + connect( copyDirStructureCB, SIGNAL( toggled( bool ) ), this, SLOT( slotDirStructCBChanged() ) ); + copyDirStructureCB->setChecked( false ); + topLayout->addWidget( copyDirStructureCB ); + QHBox * hbox = new QHBox( plainPage(), "copyDirStructure" ); + new QLabel( i18n("Base URL:"), hbox, "baseURLLabel" ); + + baseUrlCombo = new QComboBox( hbox, "baseUrlRequester" ); + baseUrlCombo->setMinimumWidth( baseUrlCombo->sizeHint().width() * 3 ); + baseUrlCombo->setEnabled( copyDirStructureCB->isChecked() ); + KURL temp = baseURL, tempOld; + do { + QString baseURLText = vfs::pathOrURL( temp ); + baseUrlCombo->insertItem( baseURLText ); + tempOld = temp; + temp = temp.upURL(); + }while( !tempOld.equals( temp, true ) ); + baseUrlCombo->setCurrentItem( 0 ); + + topLayout->addWidget( hbox ); + } + urlRequester_->setFocus(); + connect( urlRequester_->lineEdit(), SIGNAL(textChanged(const QString&)), + SLOT(slotTextChanged(const QString&)) ); + bool state = !urlName.isEmpty(); + enableButtonOK( state ); + enableButton( KDialogBase::User1, state ); + connect( this, SIGNAL( user1Clicked() ), SLOT( slotClear() ) ); +} + +KURLRequesterDlgForCopy::KURLRequesterDlgForCopy() { +} + +bool KURLRequesterDlgForCopy::preserveAttrs() { + return preserveAttrsCB->isChecked(); +} + +bool KURLRequesterDlgForCopy::copyDirStructure() { + if( copyDirStructureCB == 0 ) + return false; + return copyDirStructureCB->isChecked(); +} + +void KURLRequesterDlgForCopy::slotTextChanged(const QString & text) { + bool state = !text.stripWhiteSpace().isEmpty(); + enableButtonOK( state ); + enableButton( KDialogBase::User1, state ); +} + +void KURLRequesterDlgForCopy::slotClear() { + urlRequester_->clear(); +} + +void KURLRequesterDlgForCopy::slotDirStructCBChanged() { + baseUrlCombo->setEnabled( copyDirStructureCB->isChecked() ); +} + +KURL KURLRequesterDlgForCopy::selectedURL() const { + if ( result() == QDialog::Accepted ) { + KURL url = KURL::fromPathOrURL( urlRequester_->url() ); + if( url.isValid() ) + KRecentDocument::add(url); + return url; + } + else + return KURL(); +} + +KURLRequester * KURLRequesterDlgForCopy::urlRequester() { + return urlRequester_; +} + +KURL KURLRequesterDlgForCopy::baseURL() const { + if( baseUrlCombo == 0 ) + return KURL(); + return vfs::fromPathOrURL( baseUrlCombo->currentText() ); +} + +KRGetDate::KRGetDate(QDate date, QWidget *parent, const char *name) : KDialog(parent, name,true,WStyle_DialogBorder) { + dateWidget = new KDatePicker(this, date); + dateWidget->resize(dateWidget->sizeHint()); + setMinimumSize(dateWidget->sizeHint()); + setMaximumSize(dateWidget->sizeHint()); + resize(minimumSize()); + connect(dateWidget, SIGNAL(dateSelected(QDate)), this, SLOT(setDate(QDate))); + connect(dateWidget, SIGNAL(dateEntered(QDate)), this, SLOT(setDate(QDate))); + + // keep the original date - incase ESC is pressed + originalDate = date; +} + +QDate KRGetDate::getDate() { + if (exec() == QDialog::Rejected) chosenDate.setYMD(0,0,0); + hide(); + return chosenDate; +} + +void KRGetDate::setDate(QDate date) { + chosenDate = date; + accept(); +} + +#include "krdialogs.moc" diff --git a/krusader/Dialogs/krdialogs.h b/krusader/Dialogs/krdialogs.h new file mode 100644 index 0000000..9f85131 --- /dev/null +++ b/krusader/Dialogs/krdialogs.h @@ -0,0 +1,115 @@ +/*************************************************************************** + krdialogs.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + email : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef KCHOSEDIR_H +#define KCHOSEDIR_H + +// KDE includes +#include +#include +#include +#include +#include +// QT includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** \class KChooseDir + * Used for asking the user for a folder. + * example: + * \code + * KURL u = KChooseDir::getDir("target folder", "/suggested/path", ACTIVE_PANEL->virtualPath()); + * if (u.isEmpty()) { + * // user canceled (either by pressing cancel, or esc + * } else { + * // do you thing here: you've got a safe url to use + * } + * \endcode + */ +class KChooseDir { +public: + /** + * \param text - description of the info requested from the user + * \param url - a suggested url to appear in the box as a default choice + * \param cwd - a path which is the current working directory (usually ACTIVE_PANEL->virtualPath()). + * this is used for completion of partial urls + */ + static KURL getDir(QString text,const KURL& url, const KURL& cwd); + static KURL getDir(QString text,const KURL& url, const KURL& cwd, bool & preserveAttrs ); + static KURL getDir(QString text,const KURL& url, const KURL& cwd, bool & preserveAttrs, KURL &baseURL ); +}; + +class KURLRequesterDlgForCopy : public KDialogBase { + Q_OBJECT +public: + KURLRequesterDlgForCopy( const QString& url, const QString& text, bool presAttrs, + QWidget *parent, const char *name, bool modal=true, KURL baseURL = KURL() ); + KURLRequesterDlgForCopy(); + + KURL selectedURL() const; + KURL baseURL() const; + bool preserveAttrs(); + bool copyDirStructure(); + + KURLRequester *urlRequester(); +private slots: + void slotClear(); + void slotTextChanged(const QString &); + void slotDirStructCBChanged(); +private: + KURLRequester *urlRequester_; + QComboBox *baseUrlCombo; + QCheckBox *preserveAttrsCB; + QCheckBox *copyDirStructureCB; +}; + +class KRGetDate : public KDialog { + Q_OBJECT +public: + KRGetDate(QDate date=QDate::currentDate(), QWidget *parent = 0, const char *name = 0); + QDate getDate(); + +private slots: + void setDate(QDate); + +private: + KDatePicker *dateWidget; + QDate chosenDate, originalDate; +}; + +#endif diff --git a/krusader/Dialogs/krkeydialog.cpp b/krusader/Dialogs/krkeydialog.cpp new file mode 100644 index 0000000..70e6273 --- /dev/null +++ b/krusader/Dialogs/krkeydialog.cpp @@ -0,0 +1,157 @@ +// +// C++ Implementation: krkeydialog +// +// Description: +// +// +// Author: Jonas Bähr , (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "krkeydialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../krusader.h" + +//This is the filter in the KFileDialog of Import/Export: +static const char* FILE_FILTER = I18N_NOOP("*.keymap|Krusader keymaps\n*|all files"); + + +KrKeyDialog::KrKeyDialog( QWidget * parent ) : KKeyDialog( false /* allow letter shortcuts */, parent ) { + insert( krApp->actionCollection() ); + + // HACK This fetches the layout of the buttonbox from KDialogBase, although it is not accessable with KDialogBase's API + // None the less it's quite save to use since this implementation hasn't changed since KDE-3.3 (I haven't looked at earlier + // versions since we don't support them) and now all work is done in KDE-4. + QWidget* buttonBox = static_cast( actionButton(KDialogBase::Ok)->parent() ); + QBoxLayout* buttonBoxLayout = static_cast( buttonBox->layout() ); + + KPushButton* importButton = new KPushButton( i18n("Import shortcuts"), buttonBox ); + QWhatsThis::add( importButton, i18n( "Load a keybinding profile, e.g., total_commander.keymap" ) ); + buttonBoxLayout->insertWidget( 1, importButton ); // the defaults-button should stay on position 0 + connect( importButton, SIGNAL( clicked() ), SLOT( slotImportShortcuts() ) ); + + KPushButton* exportButton = new KPushButton( i18n("Export shortcuts"), buttonBox ); + QWhatsThis::add( exportButton, i18n( "Save current keybindings in a keymap file." ) ); + buttonBoxLayout->insertWidget( 2, exportButton ); + connect( exportButton, SIGNAL( clicked() ), SLOT( slotExportShortcuts() ) ); + + // Also quite HACK 'isch but unfortunately KKeyDialog don't giveus access to this widget + _chooser = static_cast( mainWidget() ); + + configure( true /* SaveSettings */ ); // this runs the dialog +} + +KrKeyDialog::~KrKeyDialog() { +} + +void KrKeyDialog::slotImportShortcuts() { + // find $KDEDIR/share/apps/krusader + QString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap"); + // let the user select a file to load + QString filename = KFileDialog::getOpenFileName(basedir, i18n(FILE_FILTER), 0, i18n("Select a keymap file")); + if ( filename.isEmpty() ) + return; + + KConfig conf( filename, true /*read only*/, false /*no KDEGlobal*/ ); + if ( ! conf.hasGroup("Shortcuts") ) { + int answer = KMessageBox::warningContinueCancel( this, //parent + i18n("This file does not seem to be a valid keymap.\n" + "It may be a keymap using a legacy format. The import can't be undone!"), //text + i18n("Try to import legacy format?"), //caption + i18n("Import anyway"), //Label for the continue-button + "Confirm Import Legacy Shortcuts" //dontAskAgainName (for the config-file) + ); + if ( answer == KMessageBox::Continue ) + importLegacyShortcuts( filename ); + else + return; + } + else + _chooser->syncToConfig( "Shortcuts", &conf, false /* don't delete shortcuts of actions not listed in conf */ ); +} + +void KrKeyDialog::importLegacyShortcuts( const QString& file ) { +/* + * This is basicaly Shie's code. It's copied from Kronfigurator's loog&feel page and adapted to the dialog + */ + // check if there's an info file with the keymap + QFile info(file+".info"); + if (info.open(IO_ReadOnly)) { + QTextStream stream(&info); + QStringList infoText = QStringList::split("\n", stream.read()); + if (KMessageBox::questionYesNoList(krApp, i18n("The following information was attached to the keymap. Do you really want to import this keymap?"), infoText)!=KMessageBox::Yes) + return; + } + + // ok, import away + QFile f(file); + if (!f.open(IO_ReadOnly)) { + krOut << "Error opening " << file << endl; + return; + } + char *actionName; + QDataStream stream(&f); + int key; + KAction *action; + while (!stream.atEnd()) { + stream >> actionName >> key; + action = krApp->actionCollection()->action(actionName); + if (action) { + action->setShortcut(key); +// krOut << "set shortcut for " << actionName <File %1 already exists. Do you really want to overwrite it?").arg(filename), + i18n("Warning"), i18n("Overwrite") ) + != KMessageBox::Continue) + return; + if ( f.open( IO_WriteOnly ) ) + // This is the only way to detect if the file is writable since we don't get feetback from KConfig's sync + // Additionaly this prevents merging if the file already contains some shortcuts + f.close(); + else { + KMessageBox::error( this, i18n("Can't open %1 for writing!").arg(filename) ); + return; + } + + KConfig conf( filename, false /*read only*/, false /*no KDEGlobal*/ ); + + // unfortunately we can't use this function since it only writes the actions which are different from default. + //krApp->actionCollection()->writeShortcutSettings( "Shortcuts", &conf ); + KActionShortcutList list( krApp->actionCollection() ); + list.writeSettings( "Shortcuts", &conf, true /* write all actions */ ); + // That does KActionShortcutList::writeSettings for us + //conf.sync(); // write back all changes +} + +#include "krkeydialog.moc" diff --git a/krusader/Dialogs/krkeydialog.h b/krusader/Dialogs/krkeydialog.h new file mode 100644 index 0000000..3731ce5 --- /dev/null +++ b/krusader/Dialogs/krkeydialog.h @@ -0,0 +1,37 @@ +// +// C++ Interface: krkeydialog +// +// Description: +// +// +// Author: Jonas Bähr , (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef KRKEYDIALOG_H +#define KRKEYDIALOG_H + +#include + +/** + * @short KDE's KKeyDialog extended by the ability to export/import shortcuts + * @author Jonas Bähr + */ +class KrKeyDialog : protected KKeyDialog +{ +Q_OBJECT +public: + KrKeyDialog( QWidget* parent = 0 ); + ~KrKeyDialog(); + +private slots: + void slotImportShortcuts(); + void slotExportShortcuts(); + +private: + void importLegacyShortcuts( const QString& file ); + KKeyChooser* _chooser; +}; + +#endif diff --git a/krusader/Dialogs/krmaskchoice.cpp b/krusader/Dialogs/krmaskchoice.cpp new file mode 100644 index 0000000..6e55518 --- /dev/null +++ b/krusader/Dialogs/krmaskchoice.cpp @@ -0,0 +1,179 @@ +/*************************************************************************** + krmaskchoice.cpp + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#include "krmaskchoice.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a KRMaskChoice which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +KRMaskChoice::KRMaskChoice( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ) +{ + if ( !name ) + setName( "KRMaskChoice" ); + resize( 401, 314 ); + setCaption( i18n( "Choose Files" ) ); + setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5 ) ); + + selection = new QComboBox( FALSE, this, "selection" ); + int height = QFontMetrics( selection->font() ).height(); + height = height + 5*(height > 14) + 6; + selection->setGeometry( QRect( 12, 48, 377, height) ); + selection->setEditable( TRUE ); + selection->setInsertionPolicy( QComboBox::AtTop ); + selection->setAutoCompletion( TRUE ); + + QWidget* Layout7 = new QWidget( this, "Layout7" ); + Layout7->setGeometry( QRect( 10, 10, 380, 30 ) ); + hbox = new QHBoxLayout( Layout7 ); + hbox->setSpacing( 6 ); + hbox->setMargin( 0 ); + + PixmapLabel1 = new QLabel( Layout7, "PixmapLabel1" ); + PixmapLabel1->setScaledContents( TRUE ); + PixmapLabel1->setMaximumSize( QSize( 31, 31 ) ); + // now, add space for the pixmap + hbox->addWidget( PixmapLabel1 ); + + label = new QLabel( Layout7, "label" ); + label->setText( i18n( "Select the following files:" ) ); + hbox->addWidget( label ); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setGeometry( QRect( 11, 77, 379, 190 ) ); + GroupBox1->setTitle( i18n( "Predefined Selections" ) ); + + QWidget* Layout6 = new QWidget( GroupBox1, "Layout6" ); + Layout6->setGeometry( QRect( 10, 20, 360, 160 ) ); + hbox_2 = new QHBoxLayout( Layout6 ); + hbox_2->setSpacing( 6 ); + hbox_2->setMargin( 0 ); + + preSelections = new QListBox( Layout6, "preSelections" ); + preSelections->setVScrollBarMode( QListBox::AlwaysOn ); + QWhatsThis::add( preSelections, i18n( "A predefined selection is a file-mask which you use often.\nSome examples are: \"*.c, *.h\", \"*.c, *.o\", etc.\nYou can add these masks to the list by typing them and pressing the Add button.\nDelete removes a predefined selection and Clear removes all of them.\nNotice that the line in which you edit the mask has it's own history, you can scroll it, if needed." ) ); + hbox_2->addWidget( preSelections ); + + vbox = new QVBoxLayout; + vbox->setSpacing( 6 ); + vbox->setMargin( 0 ); + + PushButton7 = new QPushButton( Layout6, "PushButton7" ); + PushButton7->setText( i18n( "Add" ) ); + QToolTip::add( PushButton7, i18n( "Adds the selection in the line-edit to the list" ) ); + vbox->addWidget( PushButton7 ); + + PushButton7_2 = new QPushButton( Layout6, "PushButton7_2" ); + PushButton7_2->setText( i18n( "Delete" ) ); + QToolTip::add( PushButton7_2, i18n( "Delete the marked selection from the list" ) ); + vbox->addWidget( PushButton7_2 ); + + PushButton7_3 = new QPushButton( Layout6, "PushButton7_3" ); + PushButton7_3->setText( i18n( "Clear" ) ); + QToolTip::add( PushButton7_3, i18n( "Clears the entire list of selections" ) ); + vbox->addWidget( PushButton7_3 ); + QSpacerItem* spacer = new QSpacerItem( 20, 54, QSizePolicy::Fixed, QSizePolicy::Expanding ); + vbox->addItem( spacer ); + hbox_2->addLayout( vbox ); + + QWidget* Layout18 = new QWidget( this, "Layout18" ); + Layout18->setGeometry( QRect( 10, 280, 379, 30 ) ); + hbox_3 = new QHBoxLayout( Layout18 ); + hbox_3->setSpacing( 6 ); + hbox_3->setMargin( 0 ); + QSpacerItem* spacer_2 = new QSpacerItem( 205, 20, QSizePolicy::Expanding, QSizePolicy::Fixed ); + hbox_3->addItem( spacer_2 ); + + PushButton3 = new QPushButton( Layout18, "PushButton3" ); + PushButton3->setText( i18n( "OK" ) ); + hbox_3->addWidget( PushButton3 ); + + PushButton3_2 = new QPushButton( Layout18, "PushButton3_2" ); + PushButton3_2->setText( i18n( "Cancel" ) ); + hbox_3->addWidget( PushButton3_2 ); + + // signals and slots connections + connect( PushButton3_2, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( PushButton3, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( PushButton7, SIGNAL( clicked() ), this, SLOT( addSelection() ) ); + connect( PushButton7_2, SIGNAL( clicked() ), this, SLOT( deleteSelection() ) ); + connect( PushButton7_3, SIGNAL( clicked() ), this, SLOT( clearSelections() ) ); + connect( selection, SIGNAL( activated(const QString&) ), selection, SLOT( setEditText(const QString &) ) ); + connect( selection->lineEdit(), SIGNAL( returnPressed() ), this, SLOT( accept() )); + connect( preSelections, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( acceptFromList(QListBoxItem *) ) ); + connect( preSelections, SIGNAL( highlighted(const QString&) ), selection, SLOT( setEditText(const QString &) ) ); + connect( preSelections, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( acceptFromList(QListBoxItem *) ) ); +} + +/* + * Destroys the object and frees any allocated resources + */ +KRMaskChoice::~KRMaskChoice() +{ + // no need to delete child widgets, Qt does it all for us +} + +void KRMaskChoice::addSelection() +{ + qWarning( "KRMaskChoice::addSelection(): Not implemented yet!" ); +} + +void KRMaskChoice::clearSelections() +{ + qWarning( "KRMaskChoice::clearSelections(): Not implemented yet!" ); +} + +void KRMaskChoice::deleteSelection() +{ + qWarning( "KRMaskChoice::deleteSelection(): Not implemented yet!" ); +} + +void KRMaskChoice::acceptFromList(QListBoxItem *) +{ + qWarning( "KRMaskChoice::acceptFromList(QListBoxItem *): Not implemented yet!" ); +} + +#include "krmaskchoice.moc" diff --git a/krusader/Dialogs/krmaskchoice.h b/krusader/Dialogs/krmaskchoice.h new file mode 100644 index 0000000..16be845 --- /dev/null +++ b/krusader/Dialogs/krmaskchoice.h @@ -0,0 +1,76 @@ +/*************************************************************************** + krmaskchoice.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + email : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#ifndef KRMASKCHOICE_H +#define KRMASKCHOICE_H + +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QComboBox; +class QGroupBox; +class QLabel; +class QListBox; +class QListBoxItem; +class QPushButton; + +class KRMaskChoice : public QDialog +{ + Q_OBJECT + +public: + KRMaskChoice( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~KRMaskChoice(); + + QComboBox* selection; + QLabel* PixmapLabel1; + QLabel* label; + QGroupBox* GroupBox1; + QListBox* preSelections; + QPushButton* PushButton7; + QPushButton* PushButton7_2; + QPushButton* PushButton7_3; + QPushButton* PushButton3; + QPushButton* PushButton3_2; + +public slots: + virtual void addSelection(); + virtual void clearSelections(); + virtual void deleteSelection(); + virtual void acceptFromList(QListBoxItem *); + +protected: + QHBoxLayout* hbox; + QHBoxLayout* hbox_2; + QHBoxLayout* hbox_3; + QVBoxLayout* vbox; +}; + +#endif // KRMASKCHOICE_H diff --git a/krusader/Dialogs/krpleasewait.cpp b/krusader/Dialogs/krpleasewait.cpp new file mode 100644 index 0000000..c61b61a --- /dev/null +++ b/krusader/Dialogs/krpleasewait.cpp @@ -0,0 +1,153 @@ +/*************************************************************************** + krpleasewait.cpp + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "krpleasewait.h" +#include +#include +#include +#include +#include +#include "../krusader.h" +#include "klocale.h" +#include + +KRPleaseWait::KRPleaseWait( QString msg, int count, bool cancel ): + QProgressDialog( cancel ? 0 : krApp,0, !cancel) , inc(true) { + + timer = new QTimer(this); + setCaption( i18n( "Krusader::Wait" ) ); + + setMinimumDuration(500); + setAutoClose(false); + setAutoReset(false); + + connect( timer,SIGNAL(timeout()), this, SLOT(cycleProgress())); + + QProgressBar* progress = new QProgressBar(count,this); + progress->setCenterIndicator(true); + setBar(progress); + + QLabel* label = new QLabel(this); + setLabel(label); + + QPushButton* btn = new QPushButton(i18n("&Cancel"),this); + setCancelButton(btn); + + btn->setEnabled(canClose = cancel); + setLabelText(msg); + + show(); +} + +void KRPleaseWait::closeEvent ( QCloseEvent * e ) +{ + if( canClose ) { + emit cancelled(); + e->accept(); + } else /* if cancel is not allowed, we disable */ + e->ignore(); /* the window closing [x] also */ +} + +void KRPleaseWait::incProgress(int howMuch){ + setProgress(progress()+howMuch); +} + +void KRPleaseWait::cycleProgress(){ + if (inc) setProgress(progress()+1); + else setProgress(progress()-1); + if ( progress() >= 9 ) inc = false; + if ( progress() <= 0 ) inc = true; +} + +KRPleaseWaitHandler::KRPleaseWaitHandler() : QObject(), job(), dlg( 0 ) { +} + +void KRPleaseWaitHandler::stopWait(){ + if( dlg != 0 ) delete dlg; + dlg=0; + cycleMutex=incMutex=false; + // return cursor to normal arrow + krApp->setCursor(KCursor::arrowCursor()); +} + + +void KRPleaseWaitHandler::startWaiting( QString msg, int count , bool cancel){ + if ( dlg == 0 ){ + dlg = new KRPleaseWait( msg , count, cancel); + connect( dlg,SIGNAL(cancelled()),this,SLOT(killJob()) ); + } + incMutex=cycleMutex=_wasCancelled=false; + dlg->setProgress(0); + + dlg->setLabelText(msg); + if ( count == 0) { + dlg->setTotalSteps(10); + cycle = true ; + cycleProgress(); + } + else { + dlg->setTotalSteps(count); + cycle = false; + } +} + +void KRPleaseWaitHandler::cycleProgress(){ + if (cycleMutex) return; + cycleMutex=true; + if (dlg) dlg->cycleProgress(); + if (cycle) QTimer::singleShot(2000,this,SLOT(cycleProgress())); + cycleMutex=false; +} + +void KRPleaseWaitHandler::killJob(){ + if( !job.isNull() ) job->kill(false); + stopWait(); + _wasCancelled = true; +} + +void KRPleaseWaitHandler::setJob(KIO::Job* j){ job=j; } + +void KRPleaseWaitHandler::incProgress(int i){ + if (incMutex) return; + incMutex=true; + if(dlg) dlg->incProgress(i); + incMutex=false; +} + +void KRPleaseWaitHandler::incProgress( KProcess *, char *buffer, int buflen ) { + int howMuch = 0; + for ( int i = 0 ; i < buflen; ++i ) + if ( buffer[ i ] == '\n' ) + ++howMuch; + + incProgress( howMuch ); +} + +#include "krpleasewait.moc" diff --git a/krusader/Dialogs/krpleasewait.h b/krusader/Dialogs/krpleasewait.h new file mode 100644 index 0000000..30b19f8 --- /dev/null +++ b/krusader/Dialogs/krpleasewait.h @@ -0,0 +1,82 @@ +/*************************************************************************** + krpleasewait.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef KRPLEASEWAIT_H +#define KRPLEASEWAIT_H + +#include +#include +#include +#include + +class KProcess; +class KRPleaseWait; + +class KRPleaseWaitHandler : public QObject { + Q_OBJECT + +public: + KRPleaseWaitHandler(); + +public slots: + + void startWaiting(QString msg, int count = 0, bool cancel = false); + void stopWait(); + void cycleProgress(); + void incProgress(int i); + void incProgress( KProcess *, char *buffer, int buflen ); + void killJob(); + void setJob(KIO::Job* j); + bool wasCancelled() const { return _wasCancelled; } + +private: + QGuardedPtr job; + KRPleaseWait * dlg; + bool cycle, cycleMutex, incMutex, _wasCancelled; +}; + + +class KRPleaseWait : public QProgressDialog { + Q_OBJECT +public: + KRPleaseWait( QString msg, int count = 0 ,bool cancel = false ); + +public slots: + void incProgress(int howMuch); + void cycleProgress(); + +protected: + bool inc; + QTimer* timer; + virtual void closeEvent ( QCloseEvent * e ); + bool canClose; +}; + +#endif diff --git a/krusader/Dialogs/krprogress.cpp b/krusader/Dialogs/krprogress.cpp new file mode 100644 index 0000000..94f8c8c --- /dev/null +++ b/krusader/Dialogs/krprogress.cpp @@ -0,0 +1,270 @@ +/* This file is part of the KDE libraries + Copyright (C) 2000 Matej Koss + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "krprogress.h" +#include "../krusader.h" + +KrProgress::KrProgress( KIO::Job* job ) + : ProgressBase( krApp ), + m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0), + m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0){ + +#ifdef Q_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS + // Set a useful icon for this window! + KWin::setIcons( winId(), + KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ), + KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) ); +#endif + + QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(), + KDialog::spacingHint() ); + topLayout->addStrut( 360 ); // makes dlg at least that wide + + QGridLayout *grid = new QGridLayout( 2, 3 ); + topLayout->addLayout(grid); + grid->addColSpacing(1, KDialog::spacingHint()); + // filenames or action name + grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0); + + sourceLabel = new KSqueezedTextLabel(this); + grid->addWidget(sourceLabel, 0, 2); + + destInvite = new QLabel(i18n("Destination:"), this); + grid->addWidget(destInvite, 1, 0); + + destLabel = new KSqueezedTextLabel(this); + grid->addWidget(destLabel, 1, 2); + + m_pProgressBar = new KProgress(this); + topLayout->addWidget( m_pProgressBar ); + + // processed info + QHBoxLayout *hBox = new QHBoxLayout(); + topLayout->addLayout(hBox); + + sizeLabel = new QLabel(this); + hBox->addWidget(sizeLabel); + + resumeLabel = new QLabel(this); + hBox->addWidget(resumeLabel); + + progressLabel = new QLabel( this ); +/* progressLabel->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, + QSizePolicy::Preferred ) );*/ + progressLabel->setAlignment( QLabel::AlignRight ); + hBox->addWidget( progressLabel ); + + hBox = new QHBoxLayout(); + topLayout->addLayout(hBox); + + speedLabel = new QLabel(this); + hBox->addWidget(speedLabel, 1); + + QFrame *line = new QFrame( this ); + line->setFrameShape( QFrame::HLine ); + line->setFrameShadow( QFrame::Sunken ); + topLayout->addWidget( line ); + + hBox = new QHBoxLayout(); + topLayout->addLayout(hBox); + + hBox->addStretch(1); + + KPushButton *pb = new KPushButton( KStdGuiItem::cancel(), this ); + connect( pb, SIGNAL( clicked() ), SLOT( slotStop() ) ); + hBox->addWidget( pb ); + + resize( sizeHint() ); + setMaximumHeight(sizeHint().height()); + + setCaption(i18n("Krusader Progress")); // show something better than kio_uiserver + + setJob(job); + setOnlyClean(false); + setStopOnClose(true); + // Connect global progress info signals + connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ), + SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); + connect( job, SIGNAL( infoMessage( KIO::Job*, const QString & ) ), + SLOT( slotInfoMessage( KIO::Job*, const QString & ) ) ); + connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), + SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) ); + connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), + SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) ); + connect( job, SIGNAL( speed( KIO::Job*, unsigned long ) ), + SLOT( slotSpeed( KIO::Job*, unsigned long ) ) ); + + // change to modal & move to Krusader's center + QPoint center((krApp->width()-width())/2,(krApp->height()-height())/2); + center = center+(krApp->pos()); + reparent(krApp,WType_Modal,center); + //setWFlags(WType_Modal); + //move((krApp->width()-width())/2,(krApp->height()-height())/2); + show(); +} + +KrProgress::~KrProgress(){} + +void KrProgress::slotTotalSize( KIO::Job*, KIO::filesize_t bytes ){ + m_iTotalSize = bytes; +} + + +void KrProgress::slotTotalFiles( KIO::Job*, unsigned long files ){ + m_iTotalFiles = files; + showTotals(); +} + + +void KrProgress::slotTotalDirs( KIO::Job*, unsigned long dirs ){ + m_iTotalDirs = dirs; + showTotals(); +} + +void KrProgress::showTotals(){ + // Show the totals in the progress label, if we still haven't + // processed anything. This is useful when the stat'ing phase + // of CopyJob takes a long time (e.g. over networks). + if ( m_iProcessedFiles == 0 && m_iProcessedDirs == 0 ) + { + QString tmps; + if ( m_iTotalDirs > 1 ) + // that we have a singular to translate looks weired but is only logical + tmps = i18n("%n directory", "%n directories", m_iTotalDirs) + " "; + tmps += i18n("%n file", "%n files", m_iTotalFiles); + progressLabel->setText( tmps ); + } +} + +void KrProgress::slotPercent( KIO::Job*, unsigned long percent ){ + QString tmp(i18n( "%1% of %2 ").arg( percent ).arg( KIO::convertSize(m_iTotalSize))); + m_pProgressBar->setValue( percent ); + tmp.append(i18n(" (Reading)")); + + setCaption( tmp ); +} + + +void KrProgress::slotInfoMessage( KIO::Job*, const QString & msg ) +{ + speedLabel->setText( msg ); + speedLabel->setAlignment( speedLabel->alignment() & ~Qt::WordBreak ); +} + + +void KrProgress::slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ) { + m_iProcessedSize = bytes; + + QString tmp; + tmp = i18n( "%1 of %2 complete").arg( KIO::convertSize(bytes) ).arg( KIO::convertSize(m_iTotalSize)); + sizeLabel->setText( tmp ); +} + + +void KrProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs ) +{ + m_iProcessedDirs = dirs; + + QString tmps; + tmps = i18n("%1 / %n directory", "%1 / %n directories", m_iTotalDirs).arg( m_iProcessedDirs ); + tmps += " "; + tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles ); + progressLabel->setText( tmps ); +} + + +void KrProgress::slotProcessedFiles( KIO::Job*, unsigned long files ) +{ + m_iProcessedFiles = files; + + QString tmps; + if ( m_iTotalDirs > 1 ) { + tmps = i18n("%1 / %n directory", "%1 / %n directories", m_iTotalDirs).arg( m_iProcessedDirs ); + tmps += " "; + } + tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles ); + progressLabel->setText( tmps ); +} + + +void KrProgress::slotSpeed( KIO::Job*, unsigned long bytes_per_second ) +{ + if ( bytes_per_second == 0 ) { + speedLabel->setText( i18n( "Working") ); + } else { +#if KDE_IS_VERSION(3,4,0) + unsigned int seconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second ); + QString remaining = KIO::convertSeconds(seconds); +#else + QString remaining = KIO::calculateRemaining( m_iTotalSize, m_iProcessedSize, bytes_per_second ).toString(); +#endif + speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( KIO::convertSize( bytes_per_second )).arg( remaining ) ); + } +} + + +void KrProgress::setDestVisible( bool visible ) +{ + // We can't hide the destInvite/destLabel labels, + // because it screws up the QGridLayout. + if (visible) + { + destInvite->setText( i18n("Destination:") ); + } + else + { + destInvite->setText( QString::null ); + destLabel->setText( QString::null ); + } +} + +void KrProgress::virtual_hook( int id, void* data ){ + ProgressBase::virtual_hook( id, data ); +} + +void KrProgress::slotStop(){ + if ( m_pJob ) { + m_pJob->kill(false); // this will call slotFinished + m_pJob = 0L; + } else { + slotFinished( 0 ); // here we call it ourselves + } + + emit stopped(); +} + +void KrProgress::closeEvent( QCloseEvent* ) { hide(); slotStop(); } + +#include "krprogress.moc" diff --git a/krusader/Dialogs/krprogress.h b/krusader/Dialogs/krprogress.h new file mode 100644 index 0000000..a8731b1 --- /dev/null +++ b/krusader/Dialogs/krprogress.h @@ -0,0 +1,86 @@ +/* This file is part of the KDE libraries + Copyright (C) 2000 Matej Koss + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +/** This file was modified for Krusader by Shie Erlich & Rafi Yanai **/ + +#ifndef __kr_progress_h__ +#define __kr_progress_h__ + +#include + +#include + +#include +#include + +#include + +#include + +class KrProgress : public KIO::ProgressBase { + Q_OBJECT +public: + + KrProgress(KIO::Job* job); + virtual ~KrProgress(); + +public slots: + virtual void slotTotalSize( KIO::Job*, KIO::filesize_t bytes ); + virtual void slotTotalFiles( KIO::Job*, unsigned long files ); + virtual void slotTotalDirs( KIO::Job*, unsigned long dirs ); + + virtual void slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ); + virtual void slotProcessedFiles( KIO::Job*, unsigned long files ); + virtual void slotProcessedDirs( KIO::Job*, unsigned long dirs ); + + virtual void slotSpeed( KIO::Job*, unsigned long bytes_per_second ); + virtual void slotPercent( KIO::Job*, unsigned long percent ); + virtual void slotInfoMessage( KIO::Job*, const QString & msg ); + + virtual void slotStop(); + virtual void closeEvent( QCloseEvent* ); + +protected: + void showTotals(); + void setDestVisible( bool visible ); + + KSqueezedTextLabel* sourceLabel; + KSqueezedTextLabel* destLabel; + QLabel* progressLabel; + QLabel* destInvite; + QLabel* speedLabel; + QLabel* sizeLabel; + QLabel* resumeLabel; + + KProgress* m_pProgressBar; + + KIO::filesize_t m_iTotalSize; + unsigned long m_iTotalFiles; + unsigned long m_iTotalDirs; + + KIO::filesize_t m_iProcessedSize; + unsigned long m_iProcessedDirs; + unsigned long m_iProcessedFiles; + +protected: + virtual void virtual_hook( int id, void* data ); +}; + + +#endif // __kr_progress_h__ + diff --git a/krusader/Dialogs/krspecialwidgets.cpp b/krusader/Dialogs/krspecialwidgets.cpp new file mode 100644 index 0000000..f7027de --- /dev/null +++ b/krusader/Dialogs/krspecialwidgets.cpp @@ -0,0 +1,239 @@ +/*************************************************************************** + krspecialwidgets.cpp + ------------------- +copyright : (C) 2000 by Shie Erlich & Rafi Yanai +e-mail : krusader@users.sourceforge.net +web site : http://krusader.sourceforge.net +--------------------------------------------------------------------------- +Description +*************************************************************************** + +A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + +*************************************************************************** +* * +* 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. * +* * +***************************************************************************/ + + + +#include "krspecialwidgets.h" +#include "krmaskchoice.h" +#include "newftpgui.h" +#include "../krusader.h" +#include "../MountMan/kmountman.h" +#include +#include +#include +#include +#include + +///////////////////////////////////////////////////////////////////////////// +/////////////////////// Pie related widgets ///////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// The pie-related widgets use hard-coded coordinates to create the look. +// This is ok since the whole widget is fitted into an existing view and thus +// no re-alignments are needed. + +#define LEFT 10 +#define BOTTOM 150 +#define WIDTH 120 +#define HEIGHT 40 +#define Z_HEIGHT 10 +#define STARTANGLE 0 +#define DEG(x) (16*(x)) + +QColor KRPie::colors[ 12 ] = {Qt::red, Qt::blue, Qt::green, Qt::cyan, Qt::magenta, Qt::gray, + Qt::black, Qt::white, Qt::darkRed, Qt::darkBlue, Qt::darkMagenta, + Qt::darkCyan}; + +////////////////////////////////////////////////////////////////////////////// +/////////////// KRFSDisplay - Filesystem / Freespace Display ///////////////// +////////////////////////////////////////////////////////////////////////////// +// This is the full constructor: use it for a mounted filesystem +KRFSDisplay::KRFSDisplay( QWidget *parent, QString _alias, QString _realName, + KIO::filesize_t _total, KIO::filesize_t _free ) : QWidget( parent ), totalSpace( _total ), + freeSpace( _free ), alias( _alias ), realName( _realName ), mounted( true ), +empty( false ), supermount( false ) { + resize( 150, 200 ); + show(); +} + +// Use this one for an unmounted filesystem +KRFSDisplay::KRFSDisplay( QWidget *parent, QString _alias, QString _realName, bool sm ) : + QWidget( parent ), alias( _alias ), realName( _realName ), mounted( false ), +empty( false ), supermount( sm ) { + resize( 150, 200 ); + show(); +} + +// This is used only when an empty widget needs to be displayed (for example: +// when filesystem statistics haven't been calculated yet) +KRFSDisplay::KRFSDisplay( QWidget *parent ) : QWidget( parent ), empty( true ) { + resize( 150, 200 ); + show(); +} + + +// The main painter! +void KRFSDisplay::paintEvent( QPaintEvent * ) { + QPainter paint( this ); + if ( !empty ) { + // create the text + // first, name and location + paint.setFont( QFont( "helvetica", 12, QFont::Bold ) ); + paint.drawText( 10, 20, alias ); + paint.setFont( QFont( "helvetica", 12, QFont::Normal ) ); + paint.drawText( 10, 37, "(" + realName + ")" ); + if ( mounted ) { // incase the filesystem is already mounted + // second, the capacity + paint.drawText( 10, 70, i18n( "Capacity: " ) + KIO::convertSizeFromKB( totalSpace ) ); + // third, the 2 boxes (used, free) + QPen systemPen = paint.pen(); + paint.setPen( Qt::black ); + paint.drawRect( 10, 90, 10, 10 ); + paint.fillRect( 11, 91, 8, 8, QBrush( Qt::gray ) ); + paint.drawRect( 10, 110, 10, 10 ); + paint.fillRect( 11, 111, 8, 8, QBrush( Qt::white ) ); + // now, the text for the boxes + paint.setPen( systemPen ); + paint.drawText( 25, 100, i18n( "Used: " ) + KIO::convertSizeFromKB( totalSpace - freeSpace ) ); + paint.drawText( 25, 120, i18n( "Free: " ) + KIO::convertSizeFromKB( freeSpace ) ); + // first, create the empty pie + // bottom... + paint.setPen( Qt::black ); + paint.setBrush( Qt::white ); + paint.drawPie( LEFT, BOTTOM, WIDTH, HEIGHT, STARTANGLE, DEG( 360 ) ); + // body... + paint.setPen( Qt::lightGray ); + for ( int i = 1; i < Z_HEIGHT; ++i ) + paint.drawPie( LEFT, BOTTOM - i, WIDTH, HEIGHT, STARTANGLE, DEG( 360 ) ); + // side lines... + paint.setPen( Qt::black ); + paint.drawLine( LEFT, BOTTOM + HEIGHT / 2, LEFT, BOTTOM + HEIGHT / 2 - Z_HEIGHT ); + paint.drawLine( LEFT + WIDTH, BOTTOM + HEIGHT / 2, LEFT + WIDTH, BOTTOM + HEIGHT / 2 - Z_HEIGHT ); + // top of the pie + paint.drawPie( LEFT, BOTTOM - Z_HEIGHT, WIDTH, HEIGHT, STARTANGLE, DEG( 360 ) ); + // the "used space" slice + float i = ( ( float ) ( totalSpace - freeSpace ) / ( totalSpace ) ) * 360.0; + paint.setBrush( Qt::gray ); + paint.drawPie( LEFT, BOTTOM - Z_HEIGHT, WIDTH, HEIGHT, STARTANGLE, ( int ) DEG( i ) ); + // if we need to draw a 3d stripe ... + if ( i > 180.0 ) { + for ( int j = 1; j < Z_HEIGHT; ++j ) + paint.drawArc( LEFT, BOTTOM - j, WIDTH, HEIGHT, STARTANGLE - 16 * 180, ( int ) ( DEG( i - 180.0 ) ) ); + } + } else { // if the filesystem is unmounted... + paint.setFont( QFont( "helvetica", 12, QFont::Bold ) ); + paint.drawText( 10, 60, i18n( "Not mounted." ) ); + } + } else { // if the widget is in empty situation... + + } +} + +//////////////////////////////////////////////////////////////////////////////// +KRPie::KRPie( KIO::filesize_t _totalSize, QWidget *parent ) : QWidget( parent, 0 ), totalSize( _totalSize ) { + slices.setAutoDelete( true ); // kill items when they are removed + slices.append( new KRPieSlice( 100, Qt::yellow, "DEFAULT" ) ); + sizeLeft = totalSize; + resize( 300, 300 ); +} + +void KRPie::paintEvent( QPaintEvent * ) { + QPainter paint( this ); + // now create the slices + KRPieSlice *slice; + float sAngle = STARTANGLE; + for ( slice = slices.first(); slice != 0; slice = slices.next() ) { + paint.setBrush( slice->getColor() ); + paint.setPen( slice->getColor() ); + // angles are negative to create a clock-wise drawing of slices + float angle = -( slice->getPerct() / 100 * 360 ) * 16; + for ( int i = 1; i < Z_HEIGHT; ++i ) + paint.drawPie( LEFT, BOTTOM + i, WIDTH, HEIGHT, ( int ) sAngle, ( int ) angle ); + sAngle += angle; + } + paint.setPen( Qt::yellow ); // pen + paint.setBrush( Qt::yellow ); // fill + // for (int i=1; igetColor() ); + paint.setPen( slice->getColor() ); + // angles are negative to create a clock-wise drawing of slices + float angle = -( slice->getPerct() / 100 * 360 ) * 16; + paint.drawPie( LEFT, BOTTOM, WIDTH, HEIGHT, ( int ) sAngle, ( int ) angle ); + sAngle += angle; + } + + + paint.setPen( Qt::black ); + // the pie + // paint.drawPie(LEFT,BOTTOM,WIDTH,HEIGHT,STARTANGLE,360*16); + ///////////////////////// end of empty pie ///////////////////////// + // now, the pie is ready to draw slices on... + // to make a good look on the perimiter, draw another black circle + paint.setPen( Qt::black ); + paint.drawArc( LEFT, BOTTOM, WIDTH, HEIGHT, STARTANGLE, 360 * 16 ); + +} + +void KRPie::addSlice( KIO::filesize_t size, QString label ) { + int i = ( slices.count() % 12 ); + slices.removeLast(); + slices.append( new KRPieSlice( size * 100 / totalSize, colors[ i ], label ) ); + sizeLeft -= size; + slices.append( new KRPieSlice( sizeLeft * 100 / totalSize, Qt::yellow, "DEFAULT" ) ); +} + +//////////////////////////////////////////////////// +/////////////////// KrQuickSearch ///////////////// +//////////////////////////////////////////////////// +KrQuickSearch::KrQuickSearch( QWidget *parent, const char * name ) : KLineEdit( parent, name ) {} + +void KrQuickSearch::myKeyPressEvent( QKeyEvent *e ) { + switch ( e->key() ) { + case Key_Escape: + emit stop( 0 ); + break; + case Key_Return: + case Key_Enter: + case Key_Tab: + case Key_Right: + case Key_Left: + emit stop( e ); + break; + case Key_Down: + otherMatching( text(), 1 ); + break; + case Key_Up: + otherMatching( text(), -1 ); + break; + case Key_Insert: + case Key_Home: + case Key_End: + process( e ); + break; + default: + keyPressEvent( e ); + } +} + + + +#include "krspecialwidgets.moc" diff --git a/krusader/Dialogs/krspecialwidgets.h b/krusader/Dialogs/krspecialwidgets.h new file mode 100644 index 0000000..9d0a36a --- /dev/null +++ b/krusader/Dialogs/krspecialwidgets.h @@ -0,0 +1,126 @@ +/*************************************************************************** + krspecialwidgets.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net +--------------------------------------------------------------------------- +Description +*************************************************************************** + +A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + +*************************************************************************** +* * +* 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. * +* * +***************************************************************************/ + + +#ifndef KRSPECIALWIDGETS_H +#define KRSPECIALWIDGETS_H + +#include +#include +#include +#include +#include +#include +#include + +class KRPieSlice; + +class KRPie : public QWidget { + Q_OBJECT + public: + KRPie( KIO::filesize_t _totalSize, QWidget *parent = 0 ); + void addSlice( KIO::filesize_t size, QString label ); + + protected: + void paintEvent( QPaintEvent * ); + + private: + QList slices; + KIO::filesize_t totalSize, sizeLeft; + static QColor colors[ 12 ]; +}; + +class KRFSDisplay : public QWidget { + Q_OBJECT + public: + // this constructor is used for a mounted filesystem + KRFSDisplay( QWidget *parent, QString _alias, QString _realName, + KIO::filesize_t _total, KIO::filesize_t _free ); + // this one is for an unmounted/supermount file system + KRFSDisplay( QWidget *parent, QString _alias, QString _realName, bool sm = false ); + // the last one is used inside MountMan(R), when no filesystem is selected + KRFSDisplay( QWidget *parent ); + inline void setTotalSpace( KIO::filesize_t t ) { totalSpace = t; } + inline void setFreeSpace( KIO::filesize_t t ) { freeSpace = t; } + inline void setAlias( QString a ) { alias = a; } + inline void setRealName( QString r ) { realName = r; } + inline void setMounted( bool m ) { mounted = m; } + inline void setEmpty( bool e ) { empty = e; } + inline void setSupermount( bool s ) { supermount = s; } + + protected: + void paintEvent( QPaintEvent * ); + + private: + KIO::filesize_t totalSpace, freeSpace; + QString alias, realName; + bool mounted, empty, supermount; +}; + +class KRPieSlice { + public: + KRPieSlice( float _perct, QColor _color, QString _label ) : + perct( _perct ), color( _color ), label( _label ) {} + inline QColor getColor() { return color; } + inline float getPerct() { return perct; } + inline QString getLabel() { return label; } + inline void setPerct( float _perct ) { perct = _perct; } + inline void setLabel( QString _label ) { label = _label; } + + private: + float perct; + QColor color; + QString label; +}; + +class KrQuickSearch: public KLineEdit { + Q_OBJECT + public: + KrQuickSearch(QWidget *parent, const char * name = 0); + void addText(const QString &str) { setText(text()+str); } + void myKeyPressEvent(QKeyEvent *e); + void myIMStartEvent(QIMEvent* e) { + imStartEvent(e); + } + void myIMEndEvent(QIMEvent* e) { + imEndEvent(e); + } + void myIMComposeEvent(QIMEvent* e) { + imComposeEvent(e); + } + + signals: + void stop(QKeyEvent *e); + void process(QKeyEvent *e); + void otherMatching(const QString &, int); + +}; + +#endif diff --git a/krusader/Dialogs/krspwidgets.cpp b/krusader/Dialogs/krspwidgets.cpp new file mode 100644 index 0000000..64da41f --- /dev/null +++ b/krusader/Dialogs/krspwidgets.cpp @@ -0,0 +1,316 @@ +/*************************************************************************** + krspwidgets.cpp + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "krspwidgets.h" +#include "../krusader.h" +#include "../krusaderview.h" +#include "../Panel/listpanel.h" +#include "../kicons.h" +#include "../Filter/filtertabs.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../resources.h" + +///////////////////// initiation of the static members //////////////////////// +QStrList KRSpWidgets::maskList; + +/////////////////////////////////////////////////////////////////////////////// + +KRSpWidgets::KRSpWidgets(){ +} + +KRQuery KRSpWidgets::getMask(QString caption, bool nameOnly ) { + if( !nameOnly ) { + return FilterTabs::getQuery(); + } + else { + KRMaskChoiceSub *p=new KRMaskChoiceSub(); + p->setCaption(caption); + p->exec(); + if (p->selection->currentText()=="") return KRQuery(); + else return KRQuery( p->selection->currentText() ); + } +} + +/////////////////////////// newFTP //////////////////////////////////////// +KURL KRSpWidgets::newFTP() { + newFTPSub *p=new newFTPSub(); + p->exec(); + if (p->url->currentText()=="") return KURL(); // empty url + KURL url; + + QString protocol = p->prefix->currentText(); + protocol.truncate(protocol.length() - 3); // remove the trailing :// + QString username = p->username->text().simplifyWhiteSpace(); + QString password = p->password->text().simplifyWhiteSpace(); + QString uri = p->url->currentText(); + + int uriStart = uri.findRev( '@' ); /* lets the user enter user and password in the URI field */ + if( uriStart != -1 ) { + QString uriUser = uri.left( uriStart ); + QString uriPsw = QString::null; + uri = uri.mid( uriStart + 1 ); + + int pswStart = uriUser.find( ':' ); /* getting the password name from the URL */ + if( pswStart != -1 ) { + uriPsw = uriUser.mid( pswStart + 1 ); + uriUser = uriUser.left( pswStart ); + } + + if( !uriUser.isEmpty() ) /* handling the ftp proxy username and password also */ + username = username.isEmpty() ? uriUser : username + "@" + uriUser; + + if( !uriPsw.isEmpty() ) /* handling the ftp proxy username and password also */ + password = password.isEmpty() ? uriPsw : password + "@" + uriPsw; + } + + QString host = uri; /* separating the hostname and path from the uri */ + QString path = QString::null; + int pathStart = uri.find( "/" ); + if( pathStart != -1 ) { + path = host.mid( pathStart ); + host = host.left( pathStart ); + } + + /* setting the parameters of the URL */ + url.setProtocol(protocol); + url.setHost( host ); + url.setPath( path ); + if ( protocol == "ftp" || protocol == "fish" || protocol == "sftp" ) + url.setPort(p->port->cleanText().toInt()); + if (!username.isEmpty()) + url.setUser( username ); + if (!password.isEmpty()) + url.setPass( password ); + + return url; +} + +newFTPSub::newFTPSub() : newFTPGUI(0,0,true) { + url->setFocus(); + setGeometry(krApp->x()+krApp->width()/2-width()/2,krApp->y()+krApp->height()/2-height()/2,width(),height()); +} + +void newFTPSub::accept() { + url->addToHistory( url->currentText() ); + // save the history and completion list when the history combo is + // destroyed + krConfig->setGroup("Private"); + QStringList list = url->completionObject()->items(); + krConfig->writeEntry( "newFTP Completion list", list ); + list = url->historyItems(); + krConfig->writeEntry( "newFTP History list", list ); + + newFTPGUI::accept(); +} + +void newFTPSub::reject() { + url->setCurrentText(""); + newFTPGUI::reject(); +} + +/////////////////////////// KRMaskChoiceSub /////////////////////////////// +KRMaskChoiceSub::KRMaskChoiceSub() : KRMaskChoice(0,0,true) { + PixmapLabel1->setPixmap(krLoader->loadIcon("kr_select", KIcon::Desktop, 32)); + label->setText(i18n("Enter a selection:")); + // the predefined selections list + krConfig->setGroup("Private"); + QStrList lst; + int i=krConfig->readListEntry("Predefined Selections",lst); + if (i>0) preSelections->insertStrList(lst); + // the combo-box tweaks + selection->setDuplicatesEnabled(false); + selection->insertStrList(KRSpWidgets::maskList); + selection->lineEdit()->setText("*"); + selection->lineEdit()->selectAll(); + selection->setFocus(); +} + +void KRMaskChoiceSub::reject() { + selection->clear(); + KRMaskChoice::reject(); +} + +void KRMaskChoiceSub::accept() { + bool add = true; + char *tmp; + // make sure we don't have that already + for ( tmp = KRSpWidgets::maskList.first(); tmp ; tmp = KRSpWidgets::maskList.next() ) + if (QString(tmp).simplifyWhiteSpace() == selection->currentText().simplifyWhiteSpace()) { + // break if we found one such as this + add = false; + break; + } + + if (add) + KRSpWidgets::maskList.insert(0,selection->currentText().local8Bit()); + // write down the predefined selections list + QStrList list; + QListBoxItem *i=preSelections->firstItem(); + while (i!=0) { + if (i->text().find(i18n("compare mode"))==-1) + list.append(i->text().local8Bit()); + i=i->next(); + } + krConfig->setGroup("Private"); + krConfig->writeEntry("Predefined Selections",list); + KRMaskChoice::accept(); +} + +void KRMaskChoiceSub::addSelection() { + QString temp=selection->currentText(); + bool itemExists=false; + QListBoxItem *i=preSelections->firstItem(); + // check if the selection already exists + while (i!=0) + if (i->text()==temp) { + itemExists=true; + break; + } else i=i->next(); + if (temp!="" && !itemExists) { + preSelections->insertItem(selection->currentText()); + preSelections->update(); + } +} + +void KRMaskChoiceSub::deleteSelection() { + if (preSelections->currentItem()!=-1 && + preSelections->currentText().find(i18n("compare mode"))==-1) { + preSelections->removeItem(preSelections->currentItem()); + preSelections->update(); + } +} + +void KRMaskChoiceSub::clearSelections() { + preSelections->clear(); + preSelections->update(); +} + +void KRMaskChoiceSub::acceptFromList(QListBoxItem *i) { + selection->insertItem(i->text(),0); + accept(); +} + +////////////////////////// QuickNavLineEdit //////////////////// + +QuickNavLineEdit::QuickNavLineEdit(const QString &string, QWidget *parent, const char *name): + KLineEdit(string, parent, name) { init(); } + +QuickNavLineEdit::QuickNavLineEdit(QWidget *parent, const char *name): + KLineEdit(parent, name) { init(); } + +int QuickNavLineEdit::findCharFromPos(const QString & str, const QFontMetrics & metrics, int pos) +{ + if (pos < 0) + return -1; + for (int i = 1; i <= (int)str.length(); ++i) + if (metrics.width(str, i) > pos) + return i; + return str.length(); +} + +void QuickNavLineEdit::init() { + _numOfSelectedChars=0; + _dummyDisplayed=false; + _pop=0; + //setCompletionMode( KGlobalSettings::CompletionPopupAuto ); ==> removed by public demand +} + +void QuickNavLineEdit::leaveEvent(QEvent *) { + clearAll(); +} + +void QuickNavLineEdit::mousePressEvent( QMouseEvent *m ) { + if (m->state()!=ControlButton) clearAll(); + else + { + if (!_numOfSelectedChars) + { + _numOfSelectedChars = charCount(m); + if (_numOfSelectedChars < 0) + _numOfSelectedChars = 0; + } + if (_numOfSelectedChars) + emit returnPressed(text().left(_numOfSelectedChars)); + } + KLineEdit::mousePressEvent(m); +} + +int QuickNavLineEdit::charCount(const QMouseEvent * const m,QString * const str) { + // find how much of the string we've selected (approx) + // and select from from the start to the closet slash (on the right) + const QString tx = text().simplifyWhiteSpace(); + if (tx.isEmpty()) { + clearAll(); + return -1; + } + + int numOfChars = findCharFromPos(tx, fontMetrics(), m->x() - 5); + if(str) *str=tx; + return tx.find('/', numOfChars); +} + +void QuickNavLineEdit::mouseMoveEvent( QMouseEvent *m) { + if (m->state()!=ControlButton) { // works only with ctrl pressed + clearAll(); + KLineEdit::mouseMoveEvent(m); + return; + } + QString tx; + int idx=charCount(m,&tx); + if (idx == -1 && !_dummyDisplayed) { // pointing on or after the current directory + if (_pop) delete _pop; + _pop = KPassivePopup::message( i18n("Quick Navigation"), + "" + i18n("Already at %1").arg(tx.left(idx)) + "", + *(KCursor::handCursor().bitmap()), this); + + _dummyDisplayed=true; + _numOfSelectedChars=0; + } else if (idx>0 && idx!=_numOfSelectedChars) { + _numOfSelectedChars=idx; + if (_pop) delete _pop; + _dummyDisplayed=false; + + _pop = KPassivePopup::message( i18n("Quick Navigation"), + "" + i18n("Click to go to %1").arg(tx.left(idx)) + "", + *(KCursor::handCursor().bitmap()), this ); + } + KLineEdit::mouseMoveEvent(m); +} + diff --git a/krusader/Dialogs/krspwidgets.h b/krusader/Dialogs/krspwidgets.h new file mode 100644 index 0000000..d1466cb --- /dev/null +++ b/krusader/Dialogs/krspwidgets.h @@ -0,0 +1,110 @@ +/*************************************************************************** + krspwidgets.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#ifndef KRSPWIDGETS_H +#define KRSPWIDGETS_H + +#include +#include +#include "krmaskchoice.h" +#include "newftpgui.h" +#include "../VFS/krquery.h" +#include +#include + +class newFTPGUI; + +class KRMaskChoiceSub; + +class KRSpWidgets { + friend class KRMaskChoiceSub; + +public: + KRSpWidgets(); + + static KRQuery getMask( QString caption, bool nameOnly=false ); // get file-mask for (un)selecting files + static KURL newFTP(); + +private: + static QStrList maskList; // used by KRMaskChoiceSub +}; + +/////////////////////////// newFTPSub /////////////////////////////////////// +class newFTPSub : public newFTPGUI { +public: + newFTPSub(); + +protected: + void reject(); + void accept(); +}; + +/////////////////////////// KRMaskChoiceSub ///////////////////////////////// +// Inherits KRMaskChoice's generated code to fully implement the functions // +///////////////////////////////////////////////////////////////////////////// +class KRMaskChoiceSub : public KRMaskChoice { +public: + KRMaskChoiceSub(); + +public slots: + void addSelection(); + void deleteSelection(); + void clearSelections(); + void acceptFromList(QListBoxItem *i); + +protected: + void reject(); + void accept(); +}; + +/////////////////////////// QuickNavLineEdit ////////////////////////// +// same as line edit, but hold ctrl while pointing to it... and see! // +/////////////////////////////////////////////////////////////////////// + +class QuickNavLineEdit: public KLineEdit { +public: + QuickNavLineEdit(const QString &string, QWidget *parent, const char *name=0); + QuickNavLineEdit(QWidget *parent=0, const char *name=0); + virtual ~QuickNavLineEdit() {} + static int findCharFromPos(const QString &, const QFontMetrics &, int pos); +protected: + void mouseMoveEvent( QMouseEvent *m); + void leaveEvent( QEvent * ); + void mousePressEvent( QMouseEvent *m ); + inline void clearAll() { _numOfSelectedChars = 0; if (_pop) delete _pop; _dummyDisplayed=false; } + void init(); + +private: + int charCount(const QMouseEvent * const , QString* const =0) ; + int _numOfSelectedChars; + bool _dummyDisplayed; + QGuardedPtr _pop; +}; + +#endif diff --git a/krusader/Dialogs/krsqueezedtextlabel.cpp b/krusader/Dialogs/krsqueezedtextlabel.cpp new file mode 100644 index 0000000..5d93269 --- /dev/null +++ b/krusader/Dialogs/krsqueezedtextlabel.cpp @@ -0,0 +1,80 @@ +#include "krsqueezedtextlabel.h" +#include +#include +#include + +KrSqueezedTextLabel::KrSqueezedTextLabel(QWidget *parent, const char *name): + KSqueezedTextLabel(parent, name), acceptDrops( false ), _index(-1), _length(-1) { +} + + +KrSqueezedTextLabel::~KrSqueezedTextLabel() { +} + +void KrSqueezedTextLabel::mousePressEvent(QMouseEvent *) { + emit clicked(); + +} + +void KrSqueezedTextLabel::enableDrops( bool flag ) +{ + setAcceptDrops( acceptDrops = flag ); +} + +void KrSqueezedTextLabel::dropEvent(QDropEvent *e) { + emit dropped(e); +} + +void KrSqueezedTextLabel::dragEnterEvent(QDragEnterEvent *e) { + if( acceptDrops ) + e->accept( KURLDrag::canDecode( e ) ); + else + KSqueezedTextLabel::dragEnterEvent( e ); +} + +void KrSqueezedTextLabel::squeezeTextToLabel(int index, int length) { + if (index==-1 || length==-1) + KSqueezedTextLabel::squeezeTextToLabel(); + else { + QString sqtext=fullText; + QFontMetrics fm(fontMetrics()); + int labelWidth = size().width(); + int textWidth = fm.width(sqtext); + if (textWidth > labelWidth) { + int avgCharSize = textWidth / sqtext.length(); + int numOfExtraChars = (textWidth-labelWidth)/avgCharSize; + int delta; + + // remove as much as possible from the left, and then from the right + if (index>3) { + delta=QMIN(index, numOfExtraChars); + numOfExtraChars -= delta; + sqtext.replace(0, delta, "..."); + } + + if (numOfExtraChars>0 && ((int)sqtext.length() > length+3)) { + delta = QMIN(numOfExtraChars, (int)sqtext.length() - (length+3)); + sqtext.replace(sqtext.length()-delta, delta, "..."); + } + QLabel::setText(sqtext); + + QToolTip::remove( this ); + QToolTip::add( this, fullText ); + } else { + QLabel::setText(fullText); + + QToolTip::remove( this ); + QToolTip::hide(); + } + } +} + +void KrSqueezedTextLabel::setText( const QString &text, int index, int length ) { + _index=index; + _length=length; + fullText = text; + squeezeTextToLabel(_index,_length); +} + +#include "krsqueezedtextlabel.moc" + diff --git a/krusader/Dialogs/krsqueezedtextlabel.h b/krusader/Dialogs/krsqueezedtextlabel.h new file mode 100644 index 0000000..8f81389 --- /dev/null +++ b/krusader/Dialogs/krsqueezedtextlabel.h @@ -0,0 +1,44 @@ +#ifndef KRSQUEEZEDTEXTLABEL_H +#define KRSQUEEZEDTEXTLABEL_H + +#include + +class QMouseEvent; +class QDropEvent; +class QDragEnterEvent; + +/** +This class overloads KSqueezedTextLabel and simply adds a clicked signal, +so that users will be able to click the label and switch focus between panels. + +NEW: a special setText() method allows to choose which part of the string should + be displayed (example: make sure that search results won't be cut out) +*/ +class KrSqueezedTextLabel : public KSqueezedTextLabel { +Q_OBJECT + public: + KrSqueezedTextLabel(QWidget *parent = 0, const char *name = 0); + ~KrSqueezedTextLabel(); + + void enableDrops( bool flag ); + + public slots: + void setText( const QString &text, int index=-1, int length=-1 ); + + signals: + void clicked(); /**< emitted when someone clicks on the label */ + void dropped(QDropEvent *); /**< emitted when someone drops URL onto the label */ + + protected: + void resizeEvent( QResizeEvent * ) { squeezeTextToLabel(_index, _length); } + virtual void mousePressEvent(QMouseEvent *e); + virtual void dropEvent(QDropEvent *e); + virtual void dragEnterEvent(QDragEnterEvent *e); + void squeezeTextToLabel(int index=-1, int length=-1); + + private: + bool acceptDrops; + int _index, _length; +}; + +#endif diff --git a/krusader/Dialogs/kurllistrequester.cpp b/krusader/Dialogs/kurllistrequester.cpp new file mode 100644 index 0000000..4575555 --- /dev/null +++ b/krusader/Dialogs/kurllistrequester.cpp @@ -0,0 +1,202 @@ +/*************************************************************************** + kurllistrequester.cpp - description + ------------------- + copyright : (C) 2005 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "kurllistrequester.h" +#include "../VFS/vfs.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define DELETE_ITEM_ID 100 + +KURLListRequester::KURLListRequester( QWidget *parent, const char * name ) : QWidget( parent, name ) +{ + KIconLoader *iconLoader = new KIconLoader(); + QPixmap imageAdd = iconLoader->loadIcon( "1downarrow", KIcon::Panel, 16 ); + QPixmap imageFolder = iconLoader->loadIcon( "folder", KIcon::Panel, 16 ); + + // Creating the widget + + QGridLayout *urlListRequesterGrid = new QGridLayout( this ); + urlListRequesterGrid->setSpacing( 0 ); + urlListRequesterGrid->setMargin( 0 ); + + urlLineEdit = new KLineEdit( this, "urlLineEdit" ); + urlListRequesterGrid->addWidget( urlLineEdit, 0, 0 ); + + urlListBox = new QListBox( this, "urlListBox" ); + urlListBox->setSelectionMode( QListBox::Extended ); + urlListRequesterGrid->addMultiCellWidget( urlListBox, 1, 1, 0, 2 ); + + urlAddBtn = new QToolButton( this, "urlAddBtn" ); + urlAddBtn->setText( "" ); + urlAddBtn->setPixmap( imageAdd ); + urlListRequesterGrid->addWidget( urlAddBtn, 0, 1 ); + + urlBrowseBtn = new QToolButton( this, "urlBrowseBtn" ); + urlBrowseBtn->setText( "" ); + urlBrowseBtn->setPixmap( imageFolder ); + urlListRequesterGrid->addWidget( urlBrowseBtn, 0, 2 ); + + // add shell completion + + completion.setMode( KURLCompletion::FileCompletion ); + urlLineEdit->setCompletionObject( &completion ); + + // connection table + + connect( urlAddBtn, SIGNAL( clicked() ), this, SLOT( slotAdd() ) ); + connect( urlBrowseBtn, SIGNAL( clicked() ), this, SLOT( slotBrowse() ) ); + connect( urlLineEdit, SIGNAL( returnPressed(const QString&) ), this, SLOT( slotAdd() ) ); + connect( urlListBox, SIGNAL( rightButtonClicked ( QListBoxItem *, const QPoint & ) ), this, + SLOT( slotRightClicked( QListBoxItem * ) ) ); +} + +void KURLListRequester::slotAdd() +{ + QString text = urlLineEdit->text().simplifyWhiteSpace(); + if( text.length() ) + { + QString error = QString::null; + emit checkValidity( text, error ); + + if( !error.isNull() ) + KMessageBox::error( this, error ); + else + { + urlListBox->insertItem( text ); + urlLineEdit->clear(); + } + } +} + +void KURLListRequester::slotBrowse() +{ + KURL url = KFileDialog::getExistingURL( QString::null, this ); + if( !url.isEmpty()) + urlLineEdit->setText( vfs::pathOrURL( url ) ); + urlLineEdit->setFocus(); +} + +void KURLListRequester::keyPressEvent(QKeyEvent *e) +{ + if( e->key() == Key_Delete ) + { + if( urlListBox->hasFocus() ) + { + deleteSelectedItems(); + return; + } + } + + QWidget::keyPressEvent( e ); +} + +void KURLListRequester::deleteSelectedItems() +{ + int i=0; + QListBoxItem *item; + + while( (item = urlListBox->item(i)) ) + { + if( item->isSelected() ) + { + urlListBox->removeItem( i ); + continue; + } + i++; + } +} + +void KURLListRequester::slotRightClicked( QListBoxItem *item ) +{ + if( item == 0 ) + return; + + KPopupMenu popupMenu( this ); + popupMenu.insertItem( i18n( "Delete" ), DELETE_ITEM_ID ); + + switch( popupMenu.exec( QCursor::pos() ) ) + { + case DELETE_ITEM_ID: + if( item->isSelected() ) + deleteSelectedItems(); + else + urlListBox->removeItem( urlListBox->index( item ) ); + break; + } +} + +KURL::List KURLListRequester::urlList() +{ + KURL::List urls; + + QString text = urlLineEdit->text().simplifyWhiteSpace(); + if (!text.isEmpty()) + { + QString error = QString::null; + emit checkValidity( text, error ); + if( error.isNull() ) + urls.append( vfs::fromPathOrURL( text ) ); + } + + QListBoxItem *item = urlListBox->firstItem(); + while ( item ) + { + QString text = item->text().simplifyWhiteSpace(); + + QString error = QString::null; + emit checkValidity( text, error ); + if( error.isNull() ) + urls.append( vfs::fromPathOrURL( text ) ); + + item = item->next(); + } + + return urls; +} + +void KURLListRequester::setUrlList( KURL::List urlList ) +{ + urlLineEdit->clear(); + urlListBox->clear(); + + KURL::List::iterator it; + + for ( it = urlList.begin(); it != urlList.end(); ++it ) + urlListBox->insertItem( vfs::pathOrURL(*it) ); +} + +#include "kurllistrequester.moc" diff --git a/krusader/Dialogs/kurllistrequester.h b/krusader/Dialogs/kurllistrequester.h new file mode 100644 index 0000000..06afe52 --- /dev/null +++ b/krusader/Dialogs/kurllistrequester.h @@ -0,0 +1,76 @@ +/*************************************************************************** + kurllistrequester.h - description + ------------------- + copyright : (C) 2005 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __KURLLISTREQUESTER_H__ +#define __KURLLISTREQUESTER_H__ + +#include +#include +#include +#include +#include +#include + +class KURLListRequester : public QWidget +{ + Q_OBJECT + +public: + KURLListRequester( QWidget *parent = 0, const char * name = 0 ); + + KURL::List urlList(); + void setUrlList( KURL::List ); + + KLineEdit *lineEdit() {return urlLineEdit;} + QListBox *listBox() {return urlListBox;} + + void setCompletionDir( QString dir ) { completion.setDir( dir ); } + +signals: + void checkValidity( QString &text, QString &error ); + +protected slots: + void slotAdd(); + void slotBrowse(); + void slotRightClicked( QListBoxItem * ); + +protected: + virtual void keyPressEvent(QKeyEvent *e); + void deleteSelectedItems(); + + KLineEdit *urlLineEdit; + QListBox *urlListBox; + QToolButton *urlAddBtn; + QToolButton *urlBrowseBtn; + + KURLCompletion completion; +}; + +#endif /* __KURLLISTREQUESTER_H__ */ diff --git a/krusader/Dialogs/newftpgui.cpp b/krusader/Dialogs/newftpgui.cpp new file mode 100644 index 0000000..1e8c3ed --- /dev/null +++ b/krusader/Dialogs/newftpgui.cpp @@ -0,0 +1,185 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'newftpgui.ui' +** +** Created: Fri Oct 27 23:47:10 2000 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "newftpgui.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../krusader.h" + + +/* + * Constructs a newFTPGUI which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ + + #define SIZE_MINIMUM QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0 ) + +newFTPGUI::newFTPGUI( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ){ + + QVBoxLayout * layout = new QVBoxLayout( this, 11, 6, "newFTPGUI_layout" ); + layout->setAutoAdd(true); + + if ( !name ) + setName( "newFTPGUI" ); + resize( 342, 261 ); + setCaption( i18n( "New Network Connection" ) ); +// setSizeGripEnabled( TRUE ); + setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, sizePolicy().hasHeightForWidth() ) ); + setMinimumSize( QSize( 342, 261 ) ); + + + QHBox* hbox_image = new QHBox( this, "hbox_image" ); + hbox_image->setSpacing( 6 ); + + PixmapLabel1 = new QLabel( hbox_image, "PixmapLabel1" ); + PixmapLabel1->setPixmap( krLoader->loadIcon("network", KIcon::Desktop, 32) ); + PixmapLabel1->setSizePolicy( SIZE_MINIMUM ); + + TextLabel3 = new QLabel( i18n( "About to connect to..." ), hbox_image, "TextLabel3" ); + QFont TextLabel3_font( TextLabel3->font() ); + TextLabel3_font.setBold( TRUE ); + TextLabel3->setFont( TextLabel3_font ); + + + QGrid* grid_host = new QGrid( 3, this, "grid_host" ); + + TextLabel1 = new QLabel( i18n( "Protocol:" ), grid_host, "TextLabel1" ); + TextLabel1_22 = new QLabel( i18n( "Host:"), grid_host, "TextLabel_2" ); + TextLabel1_3 = new QLabel( i18n( "Port:" ), grid_host, "TextLabel1_3" ); + + QStringList protocols = KProtocolInfo::protocols(); + + prefix = new KComboBox( FALSE, grid_host, "protocol" ); + if( protocols.contains("ftp") ) + prefix->insertItem( i18n( "ftp://" ) ); + if( protocols.contains("smb") ) + prefix->insertItem( i18n( "smb://" ) ); + if( protocols.contains("fish") ) + prefix->insertItem( i18n( "fish://" )); + if( protocols.contains("sftp") ) + prefix->insertItem( i18n( "sftp://" )); + prefix->setAcceptDrops( FALSE ); + prefix->setEnabled( TRUE ); + prefix->setSizePolicy( SIZE_MINIMUM ); + connect( prefix,SIGNAL(activated(const QString& )), + this,SLOT(slotTextChanged(const QString& ))); + + url = new KHistoryCombo( grid_host, "url" ); + url->setMaximumHeight( 20 ); + url->setMaxCount( 25 ); + url->setDuplicatesEnabled( false ); + connect( url, SIGNAL( activated( const QString& )), + url, SLOT( addToHistory( const QString& ))); + // load the history and completion list after creating the history combo + krConfig->setGroup("Private"); + QStringList list = krConfig->readListEntry( "newFTP Completion list" ); + url->completionObject()->setItems( list ); + list = krConfig->readListEntry( "newFTP History list" ); + url->setHistoryItems( list ); + + port = new QSpinBox( grid_host, "port" ); + port->setMaxValue( 65535 ); +#if QT_VERSION < 300 + port->setFrameShadow( QSpinBox::Sunken ); +#endif + port->setValue( 21 ); + port->setSizePolicy( SIZE_MINIMUM ); + + + TextLabel1_2 = new QLabel( i18n( "Username:" ), this, "TextLabel1_2" ); + username = new QLineEdit( this, "username" ); + TextLabel1_2_2 = new QLabel( i18n( "Password:" ), this, "TextLabel1_2_2" ); + password = new QLineEdit( this, "password" ); + password->setEchoMode( QLineEdit::Password ); + + + QWidget* Layout6 = new QWidget( this, "Layout6" ); + hbox = new QHBoxLayout( Layout6 ); + hbox->setSpacing( 6 ); + hbox->setMargin( 0 ); + + hbox->addItem(new QSpacerItem(1,1,QSizePolicy::Expanding)); + + connectBtn = new QPushButton( i18n( "&Connect" ), Layout6, "connectBtn" ); + connectBtn->setAutoDefault( TRUE ); + connectBtn->setDefault( TRUE ); + hbox->addWidget( connectBtn ); + + //saveBtn = new QPushButton( i18n( "&Save" ), Layout6, "saveBtn" ); + //saveBtn->setAutoDefault( TRUE ); + //hbox->addWidget( saveBtn ); + + cancelBtn = new QPushButton( i18n( "&Cancel" ), Layout6, "cancelBtn" ); + cancelBtn->setAutoDefault( TRUE ); + hbox->addWidget( cancelBtn ); + + // signals and slots connections + connect( connectBtn, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) ); + + // tab order + setTabOrder( url, username ); + setTabOrder( username, password ); + setTabOrder( password, connectBtn ); + setTabOrder( connectBtn, cancelBtn ); + setTabOrder( cancelBtn, prefix ); + setTabOrder( prefix, url ); +} + +/* + * Destroys the object and frees any allocated resources + */ +newFTPGUI::~newFTPGUI(){ + // no need to delete child widgets, Qt does it all for us +} + +void newFTPGUI::slotTextChanged(const QString& string){ + if( string.startsWith("ftp") || string.startsWith("sftp") || string.startsWith("fish") ) + { + if( port->value() == 21 || port->value() == 22 ) + port->setValue( string.startsWith("ftp") ? 21 : 22 ); + port->setEnabled(true); + } + else + port->setEnabled(false); +} + +/* + * Main event handler. Reimplemented to handle application + * font changes + */ +bool newFTPGUI::event( QEvent* ev ) { + bool ret = QDialog::event( ev ); + if ( ev->type() == QEvent::ApplicationFontChange ) { + QFont TextLabel3_font( TextLabel3->font() ); + TextLabel3_font.setBold( TRUE ); + TextLabel3->setFont( TextLabel3_font ); + } + return ret; +} + +#include "newftpgui.moc" diff --git a/krusader/Dialogs/newftpgui.h b/krusader/Dialogs/newftpgui.h new file mode 100644 index 0000000..2291d4f --- /dev/null +++ b/krusader/Dialogs/newftpgui.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'newftpgui.ui' +** +** Created: Fri Oct 27 23:47:08 2000 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef NEWFTPGUI_H +#define NEWFTPGUI_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QLabel; +class QLineEdit; +class QPushButton; +class QSpinBox; +class KComboBox; +class KHistoryCombo; + +class newFTPGUI : public QDialog { + Q_OBJECT +public: + newFTPGUI( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~newFTPGUI(); + + QLabel* TextLabel1; + KComboBox* prefix; + QLabel* TextLabel1_2_2; + QLabel* TextLabel1_22; + QLabel* TextLabel1_2; + QLabel* TextLabel1_3; + QSpinBox* port; + QLineEdit* password; + QPushButton* connectBtn; + QPushButton* saveBtn; + QPushButton* cancelBtn; + QLabel* PixmapLabel1; + QLabel* TextLabel3; + QLineEdit* username; + KHistoryCombo* url; + +public slots: + void slotTextChanged(const QString& string); + +protected: + QHBoxLayout* hbox; + bool event( QEvent* ); +}; + +#endif // NEWFTPGUI_H diff --git a/krusader/Dialogs/packgui.cpp b/krusader/Dialogs/packgui.cpp new file mode 100644 index 0000000..7036a3e --- /dev/null +++ b/krusader/Dialogs/packgui.cpp @@ -0,0 +1,120 @@ +/*************************************************************************** + packgui.cpp + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "packgui.h" +#include +#include "../krusader.h" +#include "../defaults.h" +#include +#include +#include +#include +#include + +#define PS(x) lst.contains(x)>0 + +// clear the statics first +QString PackGUI::filename=0; +QString PackGUI::destination=0; +QString PackGUI::type=0; +QMap PackGUI::extraProps; + +PackGUI::PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QString filename) : + PackGUIBase(0,0,true) { + // first, fill the WhatToPack textfield with information + if(noOfFiles == 1) + TextLabel1->setText( i18n("Pack %1").arg(filename) ); + else + TextLabel1->setText( i18n("Pack %n file", "Pack %n files", noOfFiles) ); + + // now, according to the Konfigurator, fill the combobox with the information + // about what kind of packing we can do + krConfig->setGroup("Archives"); + QStringList lst=krConfig->readListEntry("Supported Packers"); + // now, clear the type combo and begin... + typeData->clear(); + if (PS("tar")) typeData->insertItem("tar"); + if (PS("tar") && PS("gzip")) typeData->insertItem("tar.gz"); + if (PS("tar") && PS("bzip2")) typeData->insertItem("tar.bz2"); + if (PS("zip")) typeData->insertItem("zip"); + if (PS("rar")) typeData->insertItem("rar"); + if (PS("lha")) typeData->insertItem("lha"); + if (PS("arj")) typeData->insertItem("arj"); + if (PS("7z")) typeData->insertItem("7z"); + // set the last used packer as the top one + QString tmp=krConfig->readEntry("lastUsedPacker",QString::null); + if (tmp!=QString::null) { + for (unsigned int i=0; i< typeData->listBox()->count(); ++i) + if (typeData->listBox()->item(i)->text() == tmp) { + typeData->listBox()->removeItem(i); + typeData->listBox()->insertItem(tmp,0); + break; + } + } + checkConsistency(); + + // and go on with the normal stuff + dirData->setText(defaultPath); + nameData->setText(defaultName); + nameData->setFocus(); + if (typeData->listBox()->count()==0) // if no packers are availble + okButton->setEnabled(false); + setGeometry(krApp->x()+krApp->width()/2-width()/2,krApp->y()+krApp->height()/2-height()/2,width(),height()); + exec(); +} + +void PackGUI::browse() { + QString temp=KFileDialog::getExistingDirectory(dirData->text(),0,i18n("Please select a directory")); + if (temp != QString::null) + dirData->setText(temp); +} + +void PackGUI::accept() { + if( !extraProperties( extraProps ) ) + return; + + filename=nameData->text(); + destination=dirData->text(); + type=typeData->currentText(); + // write down the packer chosen, to be lastUsedPacker + krConfig->setGroup("Archives"); + krConfig->writeEntry("lastUsedPacker",type); + krConfig->sync(); + PackGUIBase::accept(); +} + +void PackGUI::reject() { + filename=QString::null; + destination=QString::null; + type=QString::null; + PackGUIBase::reject(); +} + +#include "packgui.moc" diff --git a/krusader/Dialogs/packgui.h b/krusader/Dialogs/packgui.h new file mode 100644 index 0000000..d88c831 --- /dev/null +++ b/krusader/Dialogs/packgui.h @@ -0,0 +1,53 @@ +/*************************************************************************** + packgui.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef PACKGUI_H +#define PACKGUI_H + +#include "packguibase.h" + +class PackGUI : public PackGUIBase { + Q_OBJECT +public: + PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QString filename=""); + +public slots: + void browse(); + +protected slots: + void accept(); + void reject(); + +public: + static QString filename, destination, type; + static QMap extraProps; +}; + +#endif diff --git a/krusader/Dialogs/packguibase.cpp b/krusader/Dialogs/packguibase.cpp new file mode 100644 index 0000000..ace6078 --- /dev/null +++ b/krusader/Dialogs/packguibase.cpp @@ -0,0 +1,468 @@ +/*************************************************************************** + packguibase.cpp + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#include "packguibase.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../krusader.h" + +/* + * Constructs a PackGUIBase which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +PackGUIBase::PackGUIBase( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ), expanded( false ) +{ + if ( !name ) + setName( "PackGUIBase" ); + resize( 430, 140 ); + setCaption( i18n( "Pack" ) ); + grid = new QGridLayout( this ); + grid->setSpacing( 6 ); + grid->setMargin( 11 ); + + hbox = new QHBoxLayout; + hbox->setSpacing( 6 ); + hbox->setMargin( 0 ); + + TextLabel3 = new QLabel( this, "TextLabel3" ); + TextLabel3->setText( i18n( "To archive" ) ); + hbox->addWidget( TextLabel3 ); + + nameData = new QLineEdit( this, "nameData" ); + hbox->addWidget( nameData ); + + typeData = new QComboBox( FALSE, this, "typeData" ); + typeData->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0 ) ); + connect( typeData, SIGNAL( activated( const QString & ) ), this, SLOT( checkConsistency() ) ); + connect( typeData, SIGNAL( highlighted( const QString & ) ), this, SLOT( checkConsistency() ) ); + hbox->addWidget( typeData ); + + grid->addLayout( hbox, 1, 0 ); + + hbox_2 = new QHBoxLayout; + hbox_2->setSpacing( 6 ); + hbox_2->setMargin( 0 ); + + TextLabel5 = new QLabel( this, "TextLabel5" ); + TextLabel5->setText( i18n( "In directory" ) ); + hbox_2->addWidget( TextLabel5 ); + + dirData = new QLineEdit( this, "dirData" ); + hbox_2->addWidget( dirData ); + + browseButton = new QToolButton( this, "browseButton" ); + browseButton->setIconSet( SmallIcon( "fileopen" ) ); + hbox_2->addWidget( browseButton ); + QSpacerItem* spacer = new QSpacerItem( 48, 20, QSizePolicy::Fixed, QSizePolicy::Fixed ); + hbox_2->addItem( spacer ); + + grid->addLayout( hbox_2, 2, 0 ); + + hbox_3 = new QHBoxLayout; + hbox_3->setSpacing( 6 ); + hbox_3->setMargin( 0 ); + + PixmapLabel1 = new QLabel( this, "PixmapLabel1" ); + PixmapLabel1->setPixmap( krLoader->loadIcon("package", KIcon::Desktop, 32) ); + PixmapLabel1->setScaledContents( TRUE ); + PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0 ) ); + hbox_3->addWidget( PixmapLabel1 ); + + TextLabel1 = new QLabel( this, "TextLabel1" ); + TextLabel1->setText( i18n( "Pack" ) ); + hbox_3->addWidget( TextLabel1 ); + + grid->addLayout( hbox_3, 0, 0 ); + + + hbox_4 = new QHBoxLayout; + hbox_4->setSpacing( 6 ); + hbox_4->setMargin( 0 ); + + QSpacerItem* spacer_3 = new QSpacerItem( 20, 26, QSizePolicy::Fixed, QSizePolicy::Expanding ); + hbox_4->addItem( spacer_3 ); + grid->addLayout( hbox_4, 3, 0 ); + + advancedWidget = new QWidget( this, "advancedWidget" ); + + hbox_5 = new QGridLayout( advancedWidget ); + hbox_5->setSpacing( 6 ); + hbox_5->setMargin( 0 ); + + + QVBoxLayout *compressLayout = new QVBoxLayout; + compressLayout->setSpacing( 6 ); + compressLayout->setMargin( 0 ); + + multipleVolume = new QCheckBox( i18n( "Multiple volume archive" ), advancedWidget, "multipleVolume" ); + connect( multipleVolume, SIGNAL( toggled( bool ) ), this, SLOT( checkConsistency() ) ); + compressLayout->addWidget( multipleVolume, 0, 0 ); + + QHBoxLayout * volumeHbox = new QHBoxLayout; + + QSpacerItem* spacer_5 = new QSpacerItem( 20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed ); + volumeHbox->addItem( spacer_5 ); + + TextLabel7 = new QLabel( i18n("Size:" ), advancedWidget, "TextLabel7" ); + volumeHbox->addWidget( TextLabel7 ); + + volumeSpinBox = new QSpinBox( advancedWidget, "volumeSpinBox" ); + volumeSpinBox->setMinValue( 1 ); + volumeSpinBox->setMaxValue( 9999 ); + volumeSpinBox->setValue( 1440 ); + volumeHbox->addWidget( volumeSpinBox ); + + volumeUnitCombo = new QComboBox( FALSE, advancedWidget, "volumeUnitCombo" ); + volumeUnitCombo->insertItem( "B" ); + volumeUnitCombo->insertItem( "KB" ); + volumeUnitCombo->insertItem( "MB" ); + volumeUnitCombo->setCurrentItem( 1 ); + volumeHbox->addWidget( volumeUnitCombo ); + + compressLayout->addLayout ( volumeHbox ); + + setCompressionLevel = new QCheckBox( i18n( "Set compression level" ), advancedWidget, "multipleVolume" ); + connect( setCompressionLevel, SIGNAL( toggled( bool ) ), this, SLOT( checkConsistency() ) ); + compressLayout->addWidget( setCompressionLevel, 0, 0 ); + + QHBoxLayout * sliderHbox = new QHBoxLayout; + + QSpacerItem* spacer_6 = new QSpacerItem( 20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed ); + sliderHbox->addItem( spacer_6 ); + + QVBox * sliderVBox = new QVBox( advancedWidget ); + + compressionSlider = new QSlider( 1, 9, 1, 5, Qt::Horizontal, sliderVBox, "compressionSlider" ); + compressionSlider->setTickmarks( QSlider::Below ); + + QHBox * minmaxHBox = new QHBox( sliderVBox ); + minLabel = new QLabel( i18n("MIN"), minmaxHBox ); + maxLabel = new QLabel( i18n("MAX"), minmaxHBox ); + maxLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + + sliderHbox->addWidget( sliderVBox ); + + compressLayout->addLayout( sliderHbox ); + + compressLayout->addStretch( 0 ); + hbox_5->addLayout( compressLayout, 0, 0 ); + + QFrame *vline = new QFrame( advancedWidget, "vline" ); + vline->setFrameStyle( QFrame::VLine | QFrame::Sunken ); + vline->setMinimumWidth( 20 ); + hbox_5->addWidget( vline, 0, 1 ); + + + QGridLayout * passwordGrid = new QGridLayout; + passwordGrid->setSpacing( 6 ); + passwordGrid->setMargin( 0 ); + + TextLabel4 = new QLabel( advancedWidget, "TextLabel4" ); + TextLabel4->setText( i18n( "Password" ) ); + passwordGrid->addWidget( TextLabel4, 0, 0 ); + + password = new QLineEdit( advancedWidget, "password" ); + password->setEchoMode( QLineEdit::Password ); + connect( password, SIGNAL( textChanged ( const QString & ) ), this, SLOT( checkConsistency() ) ); + + passwordGrid->addWidget( password, 0, 1 ); + + TextLabel6 = new QLabel( advancedWidget, "TextLabel6" ); + TextLabel6->setText( i18n( "Again" ) ); + passwordGrid->addWidget( TextLabel6, 1, 0 ); + + passwordAgain = new QLineEdit( advancedWidget, "password" ); + passwordAgain->setEchoMode( QLineEdit::Password ); + connect( passwordAgain, SIGNAL( textChanged ( const QString & ) ), this, SLOT( checkConsistency() ) ); + + passwordGrid->addWidget( passwordAgain, 1, 1 ); + + QHBoxLayout *consistencyHbox = new QHBoxLayout; + + QSpacerItem* spacer_cons = new QSpacerItem( 48, 20, QSizePolicy::Expanding, QSizePolicy::Fixed ); + consistencyHbox->addItem( spacer_cons ); + + passwordConsistencyLabel = new QLabel( advancedWidget, "passwordConsistencyLabel" ); + consistencyHbox->addWidget( passwordConsistencyLabel ); + passwordGrid->addMultiCellLayout ( consistencyHbox, 2, 2, 0, 1 ); + + encryptHeaders = new QCheckBox( i18n( "Encrypt headers" ), advancedWidget, "encryptHeaders" ); + passwordGrid->addMultiCellWidget ( encryptHeaders, 3, 3, 0, 1 ); + + QSpacerItem* spacer_psw = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Expanding ); + passwordGrid->addItem( spacer_psw, 4, 0 ); + + hbox_5->addLayout( passwordGrid, 0, 2 ); + + hbox_7 = new QHBoxLayout; + hbox_7->setSpacing( 6 ); + hbox_7->setMargin( 0 ); + + TextLabel8 = new QLabel( i18n( "Command line switches:" ), advancedWidget, "TextLabel8" ); + TextLabel8->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + hbox_7->addWidget( TextLabel8 ); + + commandLineSwitches = new KHistoryCombo( advancedWidget, "commandLineSwitches" ); + commandLineSwitches->setMaxCount(25); // remember 25 items + commandLineSwitches->setDuplicatesEnabled(false); + krConfig->setGroup("Archives"); + QStringList list = krConfig->readListEntry("Command Line Switches"); + commandLineSwitches->setHistoryItems(list); + + hbox_7->addWidget( commandLineSwitches ); + + hbox_5->addMultiCellLayout( hbox_7, 1, 1, 0, 2 ); + + + advancedWidget->hide(); + checkConsistency(); + + grid->addWidget( advancedWidget, 4, 0 ); + + hbox_6 = new QHBoxLayout; + hbox_6->setSpacing( 6 ); + hbox_6->setMargin( 0 ); + + advancedButton = new QPushButton( this, "advancedButton" ); + advancedButton->setText( i18n( "&Advanced" ) + " >>" ); + hbox_6->addWidget( advancedButton ); + + QSpacerItem* spacer_2 = new QSpacerItem( 140, 20, QSizePolicy::Expanding, QSizePolicy::Fixed ); + hbox_6->addItem( spacer_2 ); + + okButton = new QPushButton( this, "okButton" ); + okButton->setText( i18n( "Ok" ) ); + okButton->setDefault( true ); + hbox_6->addWidget( okButton ); + + cancelButton = new QPushButton( this, "cancelButton" ); + cancelButton->setText( i18n( "Cancel" ) ); + hbox_6->addWidget( cancelButton ); + + grid->addLayout( hbox_6, 6, 0 ); + + // signals and slots connections + connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( advancedButton, SIGNAL( clicked() ), this, SLOT( expand() ) ); + connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( browseButton, SIGNAL( clicked() ), this, SLOT( browse() ) ); +} + +/* + * Destroys the object and frees any allocated resources + */ +PackGUIBase::~PackGUIBase() +{ + // no need to delete child widgets, Qt does it all for us +} + +void PackGUIBase::browse() +{ + qWarning( "PackGUIBase::browse(): Not implemented yet!" ); +} + +void PackGUIBase::expand() { + expanded = !expanded; + + advancedButton->setText( i18n( "&Advanced" ) + ( expanded ? " <<" : " >>" ) ); + + if( expanded ) + advancedWidget->show(); + else { + advancedWidget->hide(); + layout()->activate(); + QSize minSize = minimumSize(); + resize( width(), minSize.height() ); + } + show(); +} + +void PackGUIBase::checkConsistency() { + if( password->text().isEmpty() && passwordAgain->text().isEmpty()) { + passwordConsistencyLabel->setPaletteForegroundColor( KGlobalSettings::textColor() ); + passwordConsistencyLabel->setText( i18n( "No password specified" ) ); + } + else + if( password->text() == passwordAgain->text() ) { + passwordConsistencyLabel->setPaletteForegroundColor( KGlobalSettings::textColor() ); + passwordConsistencyLabel->setText( i18n( "The passwords are equal" ) ); + } + else { + passwordConsistencyLabel->setPaletteForegroundColor( Qt::red ); + passwordConsistencyLabel->setText( i18n( "The passwords are different" ) ); + } + + QString packer = typeData->currentText(); + + bool passworded = false; + if( packer == "7z" || packer == "rar" || packer == "zip" || packer == "arj" ) + passworded = true; + + passwordConsistencyLabel->setEnabled( passworded ); + password->setEnabled( passworded ); + passwordAgain->setEnabled( passworded ); + TextLabel4->setEnabled( passworded ); + TextLabel6->setEnabled( passworded ); + + encryptHeaders->setEnabled( packer == "rar" ); + + multipleVolume->setEnabled( packer == "rar" || packer == "arj" ); + bool volumeEnabled = multipleVolume->isEnabled() && multipleVolume->isChecked(); + volumeSpinBox->setEnabled( volumeEnabled ); + volumeUnitCombo->setEnabled( volumeEnabled ); + TextLabel7->setEnabled( volumeEnabled ); + + /* TODO */ + setCompressionLevel->setEnabled( packer == "rar" || packer == "arj" || packer == "zip" || + packer == "7z" ); + bool sliderEnabled = setCompressionLevel->isEnabled() && setCompressionLevel->isChecked(); + compressionSlider->setEnabled( sliderEnabled ); + minLabel->setEnabled( sliderEnabled ); + maxLabel->setEnabled( sliderEnabled ); +} + +bool PackGUIBase::extraProperties( QMap & inMap ) { + inMap.clear(); + + if( password->isEnabled() && passwordAgain->isEnabled() ) { + if( password->text() != passwordAgain->text() ) { + KMessageBox::error( this, i18n( "Cannot pack! The passwords are different!" ) ); + return false; + } + + if( !password->text().isEmpty() ) { + inMap[ "Password" ] = password->text(); + + if( encryptHeaders->isEnabled() && encryptHeaders->isChecked() ) + inMap[ "EncryptHeaders" ] = "1"; + } + } + + if( multipleVolume->isEnabled() && multipleVolume->isChecked() ) { + KIO::filesize_t size = volumeSpinBox->value(); + + switch( volumeUnitCombo->currentItem() ) { + case 2: + size *= 1000; + case 1: + size *= 1000; + default: + break; + } + + if( size < 10000 ) { + KMessageBox::error( this, i18n( "Invalid volume size!" ) ); + return false; + } + + QString sbuffer; + sbuffer.sprintf("%llu",size); + + inMap[ "VolumeSize" ] = sbuffer; + } + + if( setCompressionLevel->isEnabled() && setCompressionLevel->isChecked() ) { + inMap[ "CompressionLevel" ] = QString("%1").arg( compressionSlider->value() ); + } + + QString cmdArgs = commandLineSwitches->currentText().stripWhiteSpace(); + if( !cmdArgs.isEmpty() ) { + bool firstChar = true; + QChar quote = '\0'; + + for( unsigned i=0; i < cmdArgs.length(); i++ ) { + QChar ch( cmdArgs[ i ] ); + if( ch.isSpace() ) + continue; + + if( ch == quote ) { + quote = '\0'; + continue; + } + + if( firstChar && ch != '-' ) { + KMessageBox::error( this, i18n( "Invalid command line switch!\nSwitch must start with '-'!" ) ); + return false; + } + + firstChar = false; + + if( quote == '"' ) + continue; + if( quote == '\0' && ( ch == '\'' || ch == '"' ) ) + quote = ch; + if( ch == '\\' ) { + if( i == cmdArgs.length() - 1 ) { + KMessageBox::error( this, i18n( "Invalid command line switch!\nBackslash cannot be the last character" ) ); + return false; + } + i++; + } + } + + if( quote != '\0' ) { + KMessageBox::error( this, i18n( "Invalid command line switch!\nUnclosed quotation mark!" ) ); + return false; + } + + commandLineSwitches->addToHistory( cmdArgs ); + QStringList list = commandLineSwitches->historyItems(); + krConfig->setGroup("Archives"); + krConfig->writeEntry("Command Line Switches", list); + + inMap[ "CommandLineSwitches" ] = cmdArgs; + } + return true; +} + +#include "packguibase.moc" diff --git a/krusader/Dialogs/packguibase.h b/krusader/Dialogs/packguibase.h new file mode 100644 index 0000000..74364a6 --- /dev/null +++ b/krusader/Dialogs/packguibase.h @@ -0,0 +1,109 @@ +/*************************************************************************** + packguibase.h + ------------------- + copyright : (C) 2000 by Shie Erlich & Rafi Yanai + email : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ +#ifndef PACKGUIBASE_H +#define PACKGUIBASE_H + +#include +#include +#include + + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QCheckBox; +class QComboBox; +class QLabel; +class QLineEdit; +class QPushButton; +class QToolButton; +class QSpinBox; +class QSlider; +class KHistoryCombo; + +class PackGUIBase : public QDialog +{ + Q_OBJECT + +public: + PackGUIBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~PackGUIBase(); + + QLabel* TextLabel3; + QLineEdit* nameData; + QComboBox* typeData; + QLabel* TextLabel5; + QLineEdit* dirData; + QToolButton* browseButton; + QWidget* advancedWidget; + QLabel* PixmapLabel1; + QLabel* TextLabel1; + QLabel* TextLabel4; + QLabel* TextLabel6; + QLabel* TextLabel7; + QLabel* TextLabel8; + QLabel* minLabel; + QLabel* maxLabel; + QLineEdit* password; + QLineEdit* passwordAgain; + QLabel* passwordConsistencyLabel; + QPushButton* okButton; + QPushButton* cancelButton; + QPushButton* advancedButton; + QCheckBox* encryptHeaders; + QCheckBox* multipleVolume; + QSpinBox* volumeSpinBox; + QComboBox* volumeUnitCombo; + QCheckBox* setCompressionLevel; + QSlider* compressionSlider; + KHistoryCombo *commandLineSwitches; + +public slots: + virtual void browse(); + virtual bool extraProperties( QMap & ); + + void expand(); + void checkConsistency(); + +protected: + QHBoxLayout* hbox; + QHBoxLayout* hbox_2; + QHBoxLayout* hbox_3; + QHBoxLayout* hbox_4; + QGridLayout* hbox_5; + QHBoxLayout* hbox_6; + QHBoxLayout* hbox_7; + QGridLayout* grid; + +private: + bool expanded; +}; + +#endif // PACKGUIBASE_H diff --git a/krusader/Dialogs/percentalsplitter.cpp b/krusader/Dialogs/percentalsplitter.cpp new file mode 100644 index 0000000..3a1354f --- /dev/null +++ b/krusader/Dialogs/percentalsplitter.cpp @@ -0,0 +1,193 @@ +/*************************************************************************** + percentalsplitter.h - description + ------------------- + copyright : (C) 2006 + by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "percentalsplitter.h" +#include +#include +#include + +class PercentalSplitterToolTip : public QToolTip { +public: + PercentalSplitterToolTip( QWidget * parent ) : QToolTip( parent ) { + } + + virtual ~PercentalSplitterToolTip() { + remove( parentWidget() ); + } + + void maybeTip( const QPoint & point ) { + if( parentWidget()->inherits( "PercentalSplitter" ) ) { + PercentalSplitter *splitter = (PercentalSplitter *)parentWidget(); + + QString tipString = splitter->toolTipString(); + QRect rect = QRect( parentWidget()->rect() ); + + if( splitter->orientation() == Qt::Vertical ) { + rect.setY( splitter->sizes()[ 0 ] ); + rect.setHeight( splitter->handleWidth() ); + } + else { + rect.setX( splitter->sizes()[ 0 ] ); + rect.setWidth( splitter->handleWidth() ); + } + if( rect.contains( point ) ) + tip( rect, tipString ); + } + } +}; + +PercentalSplitter::PercentalSplitter( QWidget * parent, const char * name ) : QSplitter( parent, name ), label( 0 ), opaqueOldPos( -1 ) { + toolTip = new PercentalSplitterToolTip( this ); +} + +PercentalSplitter::~PercentalSplitter() { + delete toolTip; +} + +QString PercentalSplitter::toolTipString( int p ) { + QValueList values = sizes(); + if( values.count() == 2 && ( values[ 0 ] + values[ 1 ] != 0 ) ) { + if( p < 0 ) + p = values[ 0 ]; + int percent = (int)(((double)p / (double)( values[ 0 ] + values[ 1 ] )) * 10000. + 0.5); + return QString( "%1.%2%3" ).arg( percent / 100 ).arg( ( percent / 10 )%10 ).arg( percent % 10 ) + "%"; + } + return QString::null; +} + +void PercentalSplitter::setRubberband ( int p ) { + if( p == opaqueOldPos ) + return; + + QPainter paint( this ); + paint.setPen( gray ); + paint.setBrush( gray ); + paint.setRasterOp( XorROP ); + QRect r = contentsRect(); + const int rBord = 3; // customizable? + int hw = handleWidth(); + + if( orientation() == Qt::Horizontal ) { + if ( opaqueOldPos >= 0 ) { + if( label == 0 ) + paint.drawRect( opaqueOldPos + hw / 2 - rBord, r.y(), 2 * rBord, r.height() ); + else { + QPoint labelLoc = mapFromGlobal( labelLocation ); + if( labelLoc.y() > r.y() ) + paint.drawRect( opaqueOldPos + hw / 2 - rBord, r.y(), 2 * rBord, labelLoc.y() ); + if( labelLoc.y() + label->height() < r.height() ) + paint.drawRect( opaqueOldPos + hw / 2 - rBord, labelLoc.y() + label->height(), 2 * rBord, r.height() - labelLoc.y() - label->height() ); + } + } + } else { + if ( opaqueOldPos >= 0 ) { + if( label == 0 ) + paint.drawRect( r.x(), opaqueOldPos + hw / 2 - rBord, r.width(), 2 * rBord ); + else { + QPoint labelLoc = mapFromGlobal( labelLocation ); + if( labelLoc.x() > r.x() ) + paint.drawRect( r.x(), opaqueOldPos + hw / 2 - rBord, labelLoc.x(), 2 * rBord ); + if( labelLoc.x() + label->width() < r.width() ) + paint.drawRect( labelLoc.x() + label->width(), opaqueOldPos + hw / 2 - rBord, r.width() - labelLoc.x() - label->width(), 2 * rBord ); + } + } + } + + if( p < 0 ) { + if( label ) { + delete label; + label = 0; + } + } + else { + int scr = QApplication::desktop()->screenNumber( this ); + + if( label == 0 ) { + label = new QLabel( QApplication::desktop()->screen( scr ), "SplitterPercent", WStyle_StaysOnTop | + WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); + label->setMargin(1); + label->setAutoMask( FALSE ); + label->setFrameStyle( QFrame::Plain | QFrame::Box ); + label->setLineWidth( 1 ); + label->setAlignment( AlignAuto | AlignTop ); + label->setIndent(0); + + QFontMetrics fm = label->fontMetrics(); + label->setMinimumWidth( fm.width( "99.99%" ) + 5 ); + + label->polish(); + } + + label->setText( toolTipString( p ) ); + label->adjustSize(); + + if( orientation() == Qt::Horizontal ) { + labelLocation = mapToGlobal( QPoint( p - label->width()/2, r.y() + r.height()/2 ) ); + if( labelLocation.x() < 0 ) + labelLocation.setX( 0 ); + } else { + labelLocation = mapToGlobal( QPoint( r.x() + r.width()/2, p - label->height()/2 ) ); + if( labelLocation.y() < 0 ) + labelLocation.setY( 0 ); + } + +#ifdef Q_WS_MAC + QRect screen = QApplication::desktop()->availableGeometry( scr ); +#else + QRect screen = QApplication::desktop()->screenGeometry( scr ); +#endif + + QPoint labelLoc = mapFromGlobal( labelLocation ); + if( orientation() == Qt::Horizontal ) { + if( labelLocation.x() + label->width() > screen.width() ) + labelLocation.setX( screen.width() - label->width() ); + label->move( labelLocation ); + label->show(); + + if( labelLoc.y() > r.y() ) + paint.drawRect( p + hw / 2 - rBord, r.y(), 2 * rBord, labelLoc.y() ); + if( labelLoc.y() + label->height() < r.height() ) + paint.drawRect( p + hw / 2 - rBord, labelLoc.y() + label->height(), 2 * rBord, r.height() - labelLoc.y() - label->height() ); + } else { + if( labelLocation.y() + label->height() > screen.height() ) + labelLocation.setY( screen.height() - label->height() ); + label->move( labelLocation ); + label->show(); + + if( labelLoc.x() > r.x() ) + paint.drawRect( r.x(), p + hw / 2 - rBord, labelLoc.x(), 2 * rBord ); + if( labelLoc.x() + label->width() < r.width() ) + paint.drawRect( labelLoc.x() + label->width(), p + hw / 2 - rBord, r.width() - labelLoc.x() - label->width(), 2 * rBord ); + } + } + opaqueOldPos = p; +} + +#include "percentalsplitter.moc" diff --git a/krusader/Dialogs/percentalsplitter.h b/krusader/Dialogs/percentalsplitter.h new file mode 100644 index 0000000..cdbfb4d --- /dev/null +++ b/krusader/Dialogs/percentalsplitter.h @@ -0,0 +1,58 @@ +/*************************************************************************** + percentalsplitter.h - description + ------------------- + copyright : (C) 2006 + by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __PERCENTAL_SPLITTER__ +#define __PERCENTAL_SPLITTER__ + +#include +#include + +class PercentalSplitterToolTip; + +class PercentalSplitter : public QSplitter { + Q_OBJECT + +public: + PercentalSplitter( QWidget * parent = 0, const char * name = 0 ); + virtual ~PercentalSplitter(); + + QString toolTipString( int p = -1 ); + +protected: + virtual void setRubberband ( int p ); + +private: + PercentalSplitterToolTip * toolTip; + QLabel * label; + int opaqueOldPos; + QPoint labelLocation; +}; + +#endif /* __PERCENTAL_SPLITTER__ */ diff --git a/krusader/Dialogs/popularurls.cpp b/krusader/Dialogs/popularurls.cpp new file mode 100644 index 0000000..45b6162 --- /dev/null +++ b/krusader/Dialogs/popularurls.cpp @@ -0,0 +1,307 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../krusader.h" +#include "../krslots.h" +#include "popularurls.h" + +#define STARTING_RANK 20 +#define INCREASE 2 +#define DECREASE 1 + +PopularUrls::PopularUrls(QObject *parent, const char *name) : QObject(parent, name), + head(0), tail(0), count(0) { + dlg = new PopularUrlsDlg(); +} + +PopularUrls::~PopularUrls() { + clearList(); + delete dlg; +} + +void PopularUrls::clearList() { + if (head) { + UrlNodeP p=head, tmp; + while (p) { + tmp = p; + p=p->next; + delete tmp; + } + } + ranks.clear(); + head = tail = 0; +} + +void PopularUrls::save() { + KConfigGroupSaver svr(krConfig, "Private"); + // prepare the string list containing urls and int list with ranks + QStringList urlList; + QValueList rankList; + UrlNodeP p = head; + while (p) { + urlList << p->url.prettyURL(); + rankList << p->rank; + p = p->next; + } + krConfig->writeEntry("PopularUrls", urlList); + krConfig->writeEntry("PopularUrlsRank", rankList); +} + +void PopularUrls::load() { + KConfigGroupSaver svr(krConfig, "Private"); + QStringList urlList = krConfig->readListEntry("PopularUrls"); + QValueList rankList = krConfig->readIntListEntry("PopularUrlsRank"); + if (urlList.count() != rankList.count()) { + KMessageBox::error(krApp, i18n("Saved 'Popular Urls' are invalid. List will be cleared")); + return; + } + clearList(); + count = 0; + // iterate through both lists and + QStringList::Iterator uit; + QValueList::Iterator rit; + for (uit=urlList.begin(), rit=rankList.begin(); uit!=urlList.end() && rit!=rankList.end(); ++uit, ++rit) { + UrlNodeP node = new UrlNode; + node->url = KURL::fromPathOrURL( *uit ); + node->rank = *rit; + appendNode(node); + ranks.insert(*uit, node); + } +} + + +// returns a url list with the 'max' top popular urls +KURL::List PopularUrls::getMostPopularUrls(int max) { + // get at most 'max' urls + KURL::List list; + UrlNodeP p = head; + int tmp = 0; + if (maxUrls < max) max = maxUrls; // don't give more than maxUrls + while (p && tmp < max) { + list << p->url; + p = p->next; + ++tmp; + } + + return list; +} + +// adds a url to the list, or increase rank of an existing url, making +// sure to bump it up the list if needed +void PopularUrls::addUrl(const KURL& url) { + KURL tmpurl = url; + tmpurl.adjustPath(1); // make a uniform trailing slash policy + UrlNodeP pnode; + + decreaseRanks(); + if (!head) { // if the list is empty ... (assumes dict to be empty as well) + pnode = new UrlNode; + pnode->rank = STARTING_RANK; + pnode->url = tmpurl; + appendNode(pnode); + ranks.insert(tmpurl.url(), head); + } else { + pnode = ranks.find(tmpurl.url()); + if (!pnode) { // is the added url new? if so, append it + pnode = new UrlNode; + pnode->rank = STARTING_RANK; + pnode->url = tmpurl; + appendNode(pnode); + ranks.insert(tmpurl.url(), pnode); + } else { + pnode->rank += INCREASE; + } + } + + // do we need to change location for this one? + relocateIfNeeded(pnode); + + // too many urls? + if (count > maxUrls) removeNode(tail); + + //dumpList(); +} + +// checks if 'node' needs to be bumped-up the ranking list and does it if needed +void PopularUrls::relocateIfNeeded(UrlNodeP node) { + if (node->prev && (node->prev->rank < node->rank)) { + // iterate until we find the correct place to put it + UrlNodeP tmp = node->prev->prev; + while (tmp) { + if (tmp->rank >= node->rank) + break; // found it! + else tmp = tmp->prev; + } + // now, if tmp isn't null, we need to move node to tmp->next + // else move it to become head + removeNode(node); + insertNode(node, tmp); + } +} + + +// iterate over the list, decreasing each url's rank +// this is very naive, but a 1..30 for loop is acceptable (i hope) +void PopularUrls::decreaseRanks() { + if (head) { + UrlNodeP p=head; + while (p) { + if (p->rank-DECREASE>=0) + p->rank -= DECREASE; + else p->rank = 0; + p=p->next; + } + } +} + +// removes a node from the list, but doesn't free memory! +// note: this will be buggy in case the list becomes empty (which should never happen) +void PopularUrls::removeNode(UrlNodeP node) { + if (node->prev) { + if (tail == node) tail = node->prev; + node->prev->next = node->next; + } + if (node->next) { + if (head == node) head = node->next; + node->next->prev = node->prev; + } + --count; +} + +void PopularUrls::insertNode(UrlNodeP node, UrlNodeP after) { + if (!after) { // make node head + node->next = head; + node->prev = 0; + head->prev = node; + head = node; + } else { + if (tail == after) tail = node; + node->prev = after; + node->next = after->next; + if( node->next ) { + after->next->prev = node; + after->next = node; + } + } + ++count; +} + +// appends 'node' to the end of the list, collecting garbage if needed +void PopularUrls::appendNode(UrlNodeP node) { + if (!tail) { // creating the first element + head = tail = node; + node->prev = node->next = 0; + } else { + node->next = 0; + node->prev = tail; + tail->next = node; + tail = node; + } + ++count; +} + +void PopularUrls::dumpList() { + UrlNodeP p = head; + printf("====start %d====\n",count); + while (p) { + printf("%d : %s\n", p->rank, p->url.url().latin1()); + p = p->next; + } + fflush(stdout); +} + +void PopularUrls::showDialog() { + KURL::List list = getMostPopularUrls(maxUrls); + dlg->run(list); + if (dlg->result() == -1) return; + SLOTS->refresh(list[dlg->result()]); + //printf("running %s\n", list[dlg->result()].url().latin1());fflush(stdout); +} + +// ===================================== PopularUrlsDlg ====================================== +PopularUrlsDlg::PopularUrlsDlg(): + KDialogBase(Plain, i18n("Popular Urls"), Close, KDialogBase::NoDefault, krApp) { + QGridLayout *layout = new QGridLayout( plainPage(), 0, KDialog::spacingHint() ); + + // listview to contain the urls + urls = new KListView(plainPage()); + urls->header()->hide(); + urls->addColumn(""); + urls->setSorting(-1); + urls->setVScrollBarMode(QScrollView::AlwaysOn); + + // quick search + QToolButton *btn = new QToolButton(plainPage()); + btn->setIconSet(SmallIcon("locationbar_erase")); + search = new KListViewSearchLine(plainPage(), urls); + search->setTrapReturnKey(true); + QLabel *lbl = new QLabel(search, i18n(" &Search: "), plainPage()); + + layout->addWidget(btn,0,0); + layout->addWidget(lbl,0,1); + layout->addWidget(search,0,2); + layout->addMultiCellWidget(urls,1,1,0,2); + setMaximumSize(600, 500); + + setTabOrder(search, urls); + setTabOrder(urls, actionButton(Close)); + + connect(urls, SIGNAL(executed(QListViewItem*)), + this, SLOT(slotItemSelected(QListViewItem*))); + connect(urls, SIGNAL(returnPressed(QListViewItem*)), + this, SLOT(slotItemSelected(QListViewItem*))); + connect(btn, SIGNAL(clicked()), search, SLOT(clear())); + connect(search, SIGNAL(returnPressed(const QString&)), + this, SLOT(slotSearchReturnPressed(const QString&))); +} + +void PopularUrlsDlg::slotItemSelected(QListViewItem *it) { + selection = urls->itemIndex(it); + accept(); +} + +void PopularUrlsDlg::slotSearchReturnPressed(const QString&) { + urls->setFocus(); + // select the first visible item + QListViewItemIterator it( urls ); + while ( it.current() ) { + if ( it.current()->isVisible() ) { + urls->setSelected(it.current(), true); + urls->setCurrentItem(it.current()); + break; + } else ++it; + } +} + +PopularUrlsDlg::~PopularUrlsDlg() { + delete search; + delete urls; +} + +void PopularUrlsDlg::run(KURL::List list) { + // populate the listview + urls->clear(); + KURL::List::Iterator it; + for (it = list.begin(); it!=list.end(); ++it) { + KListViewItem *item = new KListViewItem(urls, urls->lastItem()); + item->setText(0, (*it).isLocalFile() ? (*it).path() : (*it).prettyURL()); + item->setPixmap(0, (*it).isLocalFile() ? SmallIcon("folder") : SmallIcon("folder_html")); + } + //urls->setCurrentItem(urls->firstChild()); + //urls->setSelected(urls->firstChild(), true); + setMinimumSize(urls->sizeHint().width()+45, 400); + + search->clear(); + search->setFocus(); + selection = -1; + exec(); +} + +#include "popularurls.moc" diff --git a/krusader/Dialogs/popularurls.h b/krusader/Dialogs/popularurls.h new file mode 100644 index 0000000..4b908ab --- /dev/null +++ b/krusader/Dialogs/popularurls.h @@ -0,0 +1,84 @@ +#ifndef POPULARURLS_H +#define POPULARURLS_H + +#include +#include +#include +#include + +// the class holds a list of most popular links in a dual data structure +// * linked list, with head and tail: for fast append/prepend support +// * dictionary that maps urls to list nodes: to save the need to iterate +// over the list in order to find the correct node for each new url +// +// also, the class holds a maximum number of urls. two variables affect this: +// * maxUrls - the num. of urls the user can see +// * hardLimit - the actual number of urls kept. +// when the number of urls reaches hardLimit, a garbage collection is done and +// the bottom (hardLimit-maxUrls) entries are removed from the list +typedef struct _UrlNode* UrlNodeP; +typedef struct _UrlNode { + UrlNodeP prev; + KURL url; + int rank; + UrlNodeP next; +} UrlNode; + +class PopularUrlsDlg; + +class PopularUrls : public QObject { + Q_OBJECT +public: + PopularUrls(QObject *parent = 0, const char *name = 0); + ~PopularUrls(); + void save(); + void load(); + void addUrl(const KURL& url); + KURL::List getMostPopularUrls(int max); + +public slots: + void showDialog(); + +protected: + // NOTE: the following methods append/insert/remove a node to the list + // but NEVER free memory or allocate memory! + void appendNode(UrlNodeP node); + void insertNode(UrlNodeP node, UrlNodeP after); + void removeNode(UrlNodeP node); + void relocateIfNeeded(UrlNodeP node); + void clearList(); + void dumpList(); + void decreaseRanks(); + +private: + UrlNodeP head, tail; + QDict ranks; // actually holds UrlNode* + int count; + static const int maxUrls = 30; + PopularUrlsDlg *dlg; +}; + +class KListView; +class KListViewSearchLine; + +class PopularUrlsDlg: public KDialogBase { + Q_OBJECT +public: + PopularUrlsDlg(); + ~PopularUrlsDlg(); + void run(KURL::List list); // use this to open the dialog + inline int result() const { return selection; } // returns index 0 - topmost, or -1 + + +protected slots: + void slotSearchReturnPressed(const QString&); + void slotItemSelected(QListViewItem *it); + +private: + KListView *urls; + KListViewSearchLine *search; + int selection; +}; + + +#endif diff --git a/krusader/DiskUsage/Makefile.am b/krusader/DiskUsage/Makefile.am new file mode 100644 index 0000000..691d045 --- /dev/null +++ b/krusader/DiskUsage/Makefile.am @@ -0,0 +1,17 @@ +SUBDIRS = \ + radialMap \ + filelightParts + + +noinst_LIBRARIES = libDiskUsage.a + +INCLUDES = $(all_includes) + +libDiskUsage_a_METASOURCES = AUTO + +libDiskUsage_a_SOURCES = \ + diskusagegui.cpp \ + diskusage.cpp \ + dulistview.cpp \ + dulines.cpp \ + dufilelight.cpp diff --git a/krusader/DiskUsage/diskusage.cpp b/krusader/DiskUsage/diskusage.cpp new file mode 100644 index 0000000..b58f2d6 --- /dev/null +++ b/krusader/DiskUsage/diskusage.cpp @@ -0,0 +1,1147 @@ +/*************************************************************************** + diskusage.cpp - description + ------------------- + copyright : (C) 2004 + by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "diskusage.h" +#include "../VFS/krpermhandler.h" +#include "../VFS/krvfshandler.h" +#include "../kicons.h" +#include "../defaults.h" +#include "../krusader.h" +#include "../krusaderview.h" +#include "../Panel/listpanel.h" +#include "../Panel/panelfunc.h" +#include "filelightParts/Config.h" + +#include "dulines.h" +#include "dulistview.h" +#include "dufilelight.h" + +// these are the values that will exist in the menu +#define DELETE_ID 90 +#define EXCLUDE_ID 91 +#define PARENT_DIR_ID 92 +#define NEW_SEARCH_ID 93 +#define REFRESH_ID 94 +#define STEP_INTO_ID 95 +#define INCLUDE_ALL_ID 96 +#define VIEW_POPUP_ID 97 +#define LINES_VIEW_ID 98 +#define DETAILED_VIEW_ID 99 +#define FILELIGHT_VIEW_ID 100 +#define NEXT_VIEW_ID 101 +#define PREVIOUS_VIEW_ID 102 +#define ADDITIONAL_POPUP_ID 103 + +#define MAX_FILENUM 100 + +LoaderWidget::LoaderWidget( QWidget *parent, const char *name ) : QScrollView( parent, name ), cancelled( false ) +{ + viewport()->setEraseColor( Qt::white ); + widget = new QWidget( parent ); + + QGridLayout *loaderLayout = new QGridLayout( widget ); + loaderLayout->setSpacing( 0 ); + loaderLayout->setMargin( 0 ); + + QGroupBox *loaderBox = new QGroupBox( widget, "loaderGroupBox" ); + loaderBox->setFrameShape( QGroupBox::Box ); + loaderBox->setFrameShadow( QGroupBox::Sunken ); + loaderBox->setColumnLayout(0, Qt::Vertical ); + loaderBox->layout()->setSpacing( 0 ); + loaderBox->layout()->setMargin( 0 ); + loaderBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + loaderBox->setFrameStyle( QFrame::Panel + QFrame::Raised ); + loaderBox->setLineWidth( 2 ); + + QGridLayout *synchGrid = new QGridLayout( loaderBox->layout() ); + synchGrid->setSpacing( 6 ); + synchGrid->setMargin( 11 ); + + QLabel *titleLabel = new QLabel( i18n( "Loading Usage Information" ), loaderBox, "titleLabel" ); + titleLabel->setAlignment( Qt::AlignHCenter ); + synchGrid->addMultiCellWidget( titleLabel, 0, 0, 0, 1 ); + + QLabel *filesLabel = new QLabel( i18n( "Files:" ), loaderBox, "filesLabel" ); + filesLabel->setFrameShape( QLabel::StyledPanel ); + filesLabel->setFrameShadow( QLabel::Sunken ); + synchGrid->addWidget( filesLabel, 1, 0 ); + + QLabel *directoriesLabel = new QLabel( i18n( "Directories:" ), loaderBox, "directoriesLabel" ); + directoriesLabel->setFrameShape( QLabel::StyledPanel ); + directoriesLabel->setFrameShadow( QLabel::Sunken ); + synchGrid->addWidget( directoriesLabel, 2, 0 ); + + QLabel *totalSizeLabel = new QLabel( i18n( "Total Size:" ), loaderBox, "totalSizeLabel" ); + totalSizeLabel->setFrameShape( QLabel::StyledPanel ); + totalSizeLabel->setFrameShadow( QLabel::Sunken ); + synchGrid->addWidget( totalSizeLabel, 3, 0 ); + + files = new QLabel( loaderBox, "files" ); + files->setFrameShape( QLabel::StyledPanel ); + files->setFrameShadow( QLabel::Sunken ); + files->setAlignment( Qt::AlignRight ); + synchGrid->addWidget( files, 1, 1 ); + + directories = new QLabel( loaderBox, "directories" ); + directories->setFrameShape( QLabel::StyledPanel ); + directories->setFrameShadow( QLabel::Sunken ); + directories->setAlignment( Qt::AlignRight ); + synchGrid->addWidget( directories, 2, 1 ); + + totalSize = new QLabel( loaderBox, "totalSize" ); + totalSize->setFrameShape( QLabel::StyledPanel ); + totalSize->setFrameShadow( QLabel::Sunken ); + totalSize->setAlignment( Qt::AlignRight ); + synchGrid->addWidget( totalSize, 3, 1 ); + + int width; + searchedDirectory = new KSqueezedTextLabel( loaderBox, "searchedDirectory" ); + searchedDirectory->setFrameShape( QLabel::StyledPanel ); + searchedDirectory->setFrameShadow( QLabel::Sunken ); + searchedDirectory->setMinimumWidth( width = QFontMetrics(searchedDirectory->font()).width("W") * 30 ); + searchedDirectory->setMaximumWidth( width ); + synchGrid->addMultiCellWidget( searchedDirectory, 4, 4, 0, 1 ); + + QFrame *line = new QFrame( loaderBox, "duLine" ); + line->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + synchGrid->addMultiCellWidget( line, 5, 5, 0, 1 ); + + QHBox *hbox = new QHBox( loaderBox, "hbox" ); + QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ); + hbox->layout()->addItem( spacer ); + QPushButton *cancelButton = new QPushButton( hbox, "cancelButton" ); + cancelButton->setText( i18n( "Cancel" ) ); + synchGrid->addWidget( hbox, 6, 1 ); + + loaderLayout->addWidget( loaderBox, 0, 0 ); + + addChild( widget ); + + connect( cancelButton, SIGNAL( clicked() ), this, SLOT( slotCancelled() ) ); +} + +void LoaderWidget::resizeEvent ( QResizeEvent *e ) +{ + QScrollView::resizeEvent( e ); + + int x = ( viewport()->width() - widget->width() ) / 2; + int y = ( viewport()->height() - widget->height() ) / 2; + if( x < 0 ) x=0; + if( y < 0 ) y=0; + + moveChild( widget, x, y ); +} + +void LoaderWidget::init() +{ + cancelled = false; +} + +void LoaderWidget::setCurrentURL( KURL url ) +{ + searchedDirectory->setText( vfs::pathOrURL( url, 1) ); +} + +void LoaderWidget::setValues( int fileNum, int dirNum, KIO::filesize_t total ) +{ + files->setText( QString("%1").arg( fileNum ) ); + directories->setText( QString("%1").arg( dirNum ) ); + totalSize->setText( QString("%1").arg( KRpermHandler::parseSize( total ).stripWhiteSpace() ) ); +} + +void LoaderWidget::slotCancelled() +{ + cancelled = true; +} + +DiskUsage::DiskUsage( QString confGroup, QWidget *parent, char *name ) : QWidgetStack( parent, name ), + currentDirectory( 0 ), root( 0 ), configGroup( confGroup ), loading( false ), + abortLoading( false ), clearAfterAbort( false ), deleting( false ), searchVfs( 0 ) +{ + listView = new DUListView( this, "DU ListView" ); + lineView = new DULines( this, "DU LineView" ); + filelightView = new DUFilelight( this, "Filelight canvas" ); + loaderView = new LoaderWidget( this, "Loading view" ); + + addWidget( listView ); + addWidget( lineView ); + addWidget( filelightView ); + addWidget( loaderView ); + + setView( VIEW_LINES ); + + Filelight::Config::read(); + propertyMap.setAutoDelete( true ); + + connect( &loadingTimer, SIGNAL( timeout() ), this, SLOT( slotLoadDirectory() ) ); +} + +DiskUsage::~DiskUsage() +{ + if( root ) + delete root; + + if( listView ) // don't remove these lines. The module will crash at exit if removed + delete listView; + if( lineView ) + delete lineView; + if( filelightView ) + delete filelightView; +} + +void DiskUsage::load( KURL baseDir ) +{ + if( searchVfs && !searchVfs->vfs_canDelete() ) { + return; + } + + fileNum = dirNum = 0; + currentSize = 0; + + emit status( i18n( "Loading the disk usage information..." ) ); + + clear(); + + baseURL = baseDir; + baseURL.setPath( baseDir.path( -1 ) ); + + root = new Directory( baseURL.fileName(), vfs::pathOrURL( baseDir ) ); + + directoryStack.clear(); + parentStack.clear(); + + directoryStack.push( "" ); + parentStack.push( root ); + + if( searchVfs ) + { + delete searchVfs; + searchVfs = 0; + } + searchVfs = KrVfsHandler::getVfs( baseDir ); + if( searchVfs == 0 ) + { + loading = abortLoading = clearAfterAbort = false; + emit loadFinished( false ); + return; + } + + searchVfs->vfs_setQuiet( true ); + currentVfile = 0; + + if( !loading ) + { + viewBeforeLoad = activeView; + setView( VIEW_LOADER ); + } + + loading = true; + + loaderView->init(); + loaderView->setCurrentURL( baseURL ); + loaderView->setValues( fileNum, dirNum, currentSize ); + + loadingTimer.start( 0, true ); +} + +void DiskUsage::slotLoadDirectory() +{ + if( searchVfs && !searchVfs->vfs_canDelete() ) { // recursive call from slotLoadDirectory? + loadingTimer.start( 100, true ); // as it can cause crash, ignore it and wait while + return; // the recursion finishes + } + if( ( currentVfile == 0 && directoryStack.isEmpty() ) || loaderView->wasCancelled() || abortLoading ) + { + if( searchVfs ) + delete searchVfs; + + searchVfs = 0; + currentVfile = 0; + + setView( viewBeforeLoad ); + + if( clearAfterAbort ) + clear(); + else { + calculateSizes(); + changeDirectory( root ); + } + + emit loadFinished( !( loaderView->wasCancelled() || abortLoading ) ); + + loading = abortLoading = clearAfterAbort = false; + } + else if( loading ) + { + for( int counter = 0; counter != MAX_FILENUM; counter ++ ) + { + if( currentVfile == 0 ) + { + if( directoryStack.isEmpty() ) + break; + + dirToCheck = directoryStack.pop(); + currentParent = parentStack.pop(); + + contentMap.insert( dirToCheck, currentParent ); + + KURL url = baseURL; + + if( !dirToCheck.isEmpty() ) + url.addPath( dirToCheck ); + +#if defined(BSD) + if ( url.isLocalFile() && url.path().left( 7 ) == "/procfs" ) + break; +#else + if ( url.isLocalFile() && url.path().left( 5 ) == "/proc" ) + break; +#endif + + loaderView->setCurrentURL( url ); + + if( !searchVfs->vfs_refresh( url ) ) + break; + + dirNum++; + + currentVfile = searchVfs->vfs_getFirstFile(); + } + else + { + fileNum++; + File *newItem = 0; + + QString mime = currentVfile->vfile_getMime(true); // fast == not using mimetype magic + + if( currentVfile->vfile_isDir() && !currentVfile->vfile_isSymLink() ) + { + newItem = new Directory( currentParent, currentVfile->vfile_getName(), dirToCheck, currentVfile->vfile_getSize(), + currentVfile->vfile_getMode(), currentVfile->vfile_getOwner(), currentVfile->vfile_getGroup(), + currentVfile->vfile_getPerm(), currentVfile->vfile_getTime_t(), currentVfile->vfile_isSymLink(), + mime ); + directoryStack.push( (dirToCheck.isEmpty() ? "" : dirToCheck + "/" )+ currentVfile->vfile_getName() ); + parentStack.push( dynamic_cast( newItem ) ); + } + else + { + newItem = new File( currentParent, currentVfile->vfile_getName(), dirToCheck, currentVfile->vfile_getSize(), + currentVfile->vfile_getMode(), currentVfile->vfile_getOwner(), currentVfile->vfile_getGroup(), + currentVfile->vfile_getPerm(), currentVfile->vfile_getTime_t(), currentVfile->vfile_isSymLink(), + mime ); + currentSize += currentVfile->vfile_getSize(); + } + currentParent->append( newItem ); + + currentVfile = searchVfs->vfs_getNextFile(); + } + } + + loaderView->setValues( fileNum, dirNum, currentSize ); + loadingTimer.start( 0, true ); + } +} + +void DiskUsage::stopLoad() +{ + abortLoading = true; +} + +void DiskUsage::close() +{ + if( loading ) + { + abortLoading = true; + clearAfterAbort = true; + } +} + +void DiskUsage::dirUp() +{ + if( currentDirectory != 0 ) + { + if ( currentDirectory->parent() != 0 ) + changeDirectory( (Directory *)(currentDirectory->parent()) ); + else + { + KURL up = baseURL.upURL(); + + if( KMessageBox::questionYesNo( this, i18n( "Stepping into the parent directory requires " + "loading the content of the \"%1\" URL. Do you wish " + "to continue?" ) + .arg( vfs::pathOrURL( up ) ), + i18n( "Krusader::DiskUsage" ), KStdGuiItem::yes(), + KStdGuiItem::no(), "DiskUsageLoadParentDir" + ) == KMessageBox::Yes ) + load( up ); + } + } +} + +Directory * DiskUsage::getDirectory( QString dir ) +{ + while( dir.endsWith( "/" ) ) + dir.truncate( dir.length() - 1 ); + + if( dir.isEmpty() ) + return root; + + return contentMap.find( dir ); +} + +File * DiskUsage::getFile( QString path ) +{ + if( path == "" ) + return root; + + QString dir = path; + + int ndx = path.findRev( '/' ); + QString file = path.mid( ndx + 1 ); + + if( ndx == -1 ) + dir = ""; + else + dir.truncate( ndx ); + + Directory *dirEntry = getDirectory( dir ); + if( dirEntry == 0 ) + return 0; + + for( Iterator it = dirEntry->iterator(); it != dirEntry->end(); ++it ) + if( (*it)->name() == file ) + return *it; + + return 0; +} + +void DiskUsage::clear() +{ + baseURL = KURL(); + emit clearing(); + propertyMap.clear(); + contentMap.clear(); + if( root ) + delete root; + root = currentDirectory = 0; +} + +int DiskUsage::calculateSizes( Directory *dirEntry, bool emitSig, int depth ) +{ + int changeNr = 0; + + if( dirEntry == 0 ) + dirEntry = root; + + KIO::filesize_t own = 0, total = 0; + + for( Iterator it = dirEntry->iterator(); it != dirEntry->end(); ++it ) + { + File * item = *it; + + if( !item->isExcluded() ) + { + if( item->isDir() ) + changeNr += calculateSizes( dynamic_cast( item ), emitSig, depth + 1 ); + else + own += item->size(); + + total += item->size(); + } + } + + KIO::filesize_t oldOwn = dirEntry->ownSize(), oldTotal = dirEntry->size(); + dirEntry->setSizes( total, own ); + + if( dirEntry == currentDirectory ) + currentSize = total; + + if( emitSig && ( own != oldOwn || total != oldTotal ) ) { + emit changed( dirEntry ); + changeNr++; + } + + if( depth == 0 && changeNr != 0 ) + emit changeFinished(); + return changeNr; +} + +int DiskUsage::exclude( File *file, bool calcPercents, int depth ) +{ + int changeNr = 0; + + if( !file->isExcluded() ) + { + file->exclude( true ); + emit changed( file ); + changeNr++; + + if( file->isDir() ) + { + Directory *dir = dynamic_cast( file ); + for( Iterator it = dir->iterator(); it != dir->end(); ++it ) + changeNr += exclude( *it, false, depth + 1 ); + } + } + + if( calcPercents ) + { + calculateSizes( root, true ); + calculatePercents( true ); + createStatus(); + } + + if( depth == 0 && changeNr != 0 ) + emit changeFinished(); + + return changeNr; +} + +int DiskUsage::include( Directory *dir, int depth ) +{ + int changeNr = 0; + + if( dir == 0 ) + return 0; + + for( Iterator it = dir->iterator(); it != dir->end(); ++it ) + { + File *item = *it; + + if( item->isDir() ) + changeNr += include( dynamic_cast( item ), depth + 1 ); + + if( item->isExcluded() ) + { + item->exclude( false ); + emit changed( item ); + changeNr++; + } + } + + if( depth == 0 && changeNr != 0 ) + emit changeFinished(); + + return changeNr; +} + +void DiskUsage::includeAll() +{ + include( root ); + calculateSizes( root, true ); + calculatePercents( true ); + createStatus(); +} + +int DiskUsage::del( File *file, bool calcPercents, int depth ) +{ + int deleteNr = 0; + + if( file == root ) + return 0; + + krConfig->setGroup( "General" ); + bool trash = krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ); + KURL url = vfs::fromPathOrURL( file->fullPath() ); + + if( calcPercents ) + { + // now ask the user if he want to delete: + krConfig->setGroup( "Advanced" ); + if ( krConfig->readBoolEntry( "Confirm Delete", _ConfirmDelete ) ) { + QString s, b; + if ( trash && url.isLocalFile() ) { + s = i18n( "Do you really want to move this item to the trash?" ); + b = i18n( "&Trash" ); + } else { + s = i18n( "Do you really want to delete this item?" ); + b = i18n( "&Delete" ); + } + + QStringList name; + name.append( file->fullPath() ); + // show message + // note: i'm using continue and not yes/no because the yes/no has cancel as default button + if ( KMessageBox::warningContinueCancelList( krApp, s, name, i18n( "Warning" ), b ) != KMessageBox::Continue ) + return 0; + } + + emit status( i18n( "Deleting %1..." ).arg( file->name() ) ); + } + + if( file == currentDirectory ) + dirUp(); + + if( file->isDir() ) + { + Directory *dir = dynamic_cast( file ); + + Iterator it; + while( ( it = dir->iterator() ) != dir->end() ) + deleteNr += del( *it, false, depth + 1 ); + + QString path; + for( const Directory *d = (Directory*)file; d != root && d && d->parent() != 0; d = d->parent() ) + { + if( !path.isEmpty() ) + path = "/" + path; + + path = d->name() + path; + } + + contentMap.remove( path ); + } + + emit deleted( file ); + deleteNr++; + + QGuardedPtr job; + + if( trash ) + { +#if KDE_IS_VERSION(3,4,0) + job = KIO::trash( url, true ); +#else + job = new KIO::CopyJob( url,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true ); +#endif + connect(job,SIGNAL(result(KIO::Job*)),krApp,SLOT(changeTrashIcon())); + } + else + { + job = new KIO::DeleteJob( vfs::fromPathOrURL( file->fullPath() ), false, false); + } + + deleting = true; // during qApp->processEvent strange things can occur + grabMouse(); // that's why we disable the mouse and keyboard events + grabKeyboard(); + + while( !job.isNull() ) + qApp->processEvents(); + + releaseMouse(); + releaseKeyboard(); + deleting = false; + + ((Directory *)(file->parent()))->remove( file ); + delete file; + + if( depth == 0 ) + createStatus(); + + if( calcPercents ) + { + calculateSizes( root, true ); + calculatePercents( true ); + createStatus(); + emit enteringDirectory( currentDirectory ); + } + + if( depth == 0 && deleteNr != 0 ) + emit deleteFinished(); + + return deleteNr; +} + +void * DiskUsage::getProperty( File *item, QString key ) +{ + Properties * props = propertyMap.find( item ); + if( props == 0 ) + return 0; + return props->find( key ); +} + +void DiskUsage::addProperty( File *item, QString key, void * prop ) +{ + Properties * props = propertyMap.find( item ); + if( props == 0 ) + { + props = new Properties(); + propertyMap.insert( item, props ); + } + props->insert( key, prop ); +} + +void DiskUsage::removeProperty( File *item, QString key ) +{ + Properties * props = propertyMap.find( item ); + if( props == 0 ) + return; + props->remove( key ); + if( props->count() == 0 ) + propertyMap.remove( item ); +} + +void DiskUsage::createStatus() +{ + Directory *dirEntry = currentDirectory; + + if( dirEntry == 0 ) + return; + + KURL url = baseURL; + if( dirEntry != root ) + url.addPath( dirEntry->directory() ); + + emit status( i18n( "Current directory:%1, Total size:%2, Own size:%3" ) + .arg( vfs::pathOrURL( url, -1 ) ) + .arg( " "+KRpermHandler::parseSize( dirEntry->size() ) ) + .arg( " "+KRpermHandler::parseSize( dirEntry->ownSize() ) ) ); +} + +void DiskUsage::changeDirectory( Directory *dir ) +{ + currentDirectory = dir; + + currentSize = dir->size(); + calculatePercents( true, dir ); + + createStatus(); + emit enteringDirectory( dir ); +} + +Directory* DiskUsage::getCurrentDir() +{ + return currentDirectory; +} + +void DiskUsage::rightClickMenu( File *fileItem, KPopupMenu *addPopup, QString addPopupName ) +{ + KPopupMenu popup( this ); + + popup.insertTitle( i18n("Disk Usage")); + + if( fileItem != 0 ) + { + popup.insertItem( i18n("Delete"), DELETE_ID); + popup.setAccel( Key_Delete, DELETE_ID ); + popup.insertItem( i18n("Exclude"), EXCLUDE_ID); + popup.setAccel( CTRL + Key_E, EXCLUDE_ID ); + popup.insertSeparator(); + } + + popup.insertItem( i18n("Up one directory"), PARENT_DIR_ID); + popup.setAccel( SHIFT + Key_Up, PARENT_DIR_ID ); + popup.insertItem( i18n("New search"), NEW_SEARCH_ID); + popup.setAccel( CTRL + Key_N, NEW_SEARCH_ID ); + popup.insertItem( i18n("Refresh"), REFRESH_ID); + popup.setAccel( CTRL + Key_R, REFRESH_ID ); + popup.insertItem( i18n("Include all"), INCLUDE_ALL_ID); + popup.setAccel( CTRL + Key_I, INCLUDE_ALL_ID ); + popup.insertItem( i18n("Step into"), STEP_INTO_ID); + popup.setAccel( SHIFT + Key_Down, STEP_INTO_ID ); + popup.insertSeparator(); + + + if( addPopup != 0 ) + { + popup.insertItem( QPixmap(), addPopup, ADDITIONAL_POPUP_ID ); + popup.changeItem( ADDITIONAL_POPUP_ID, addPopupName ); + } + + KPopupMenu viewPopup; + viewPopup.insertItem(i18n("Lines"), LINES_VIEW_ID); + viewPopup.setAccel( CTRL + Key_L, LINES_VIEW_ID ); + viewPopup.insertItem(i18n("Detailed"), DETAILED_VIEW_ID); + viewPopup.setAccel( CTRL + Key_D, DETAILED_VIEW_ID ); + viewPopup.insertItem(i18n("Filelight"), FILELIGHT_VIEW_ID); + viewPopup.setAccel( CTRL + Key_F, FILELIGHT_VIEW_ID ); + viewPopup.insertSeparator(); + viewPopup.insertItem(i18n("Next"), NEXT_VIEW_ID); + viewPopup.setAccel( SHIFT + Key_Right, NEXT_VIEW_ID ); + viewPopup.insertItem(i18n("Previous"), PREVIOUS_VIEW_ID); + viewPopup.setAccel( SHIFT + Key_Left, PREVIOUS_VIEW_ID ); + + popup.insertItem( QPixmap(), &viewPopup, VIEW_POPUP_ID ); + popup.changeItem( VIEW_POPUP_ID, i18n( "View" ) ); + + int result=popup.exec(QCursor::pos()); + + executeAction( result, fileItem ); +} + +void DiskUsage::executeAction( int action, File * fileItem ) +{ + // check out the user's option + switch ( action ) + { + case DELETE_ID: + if( fileItem ) + del( fileItem ); + break; + case EXCLUDE_ID: + if( fileItem ) + exclude( fileItem ); + break; + case PARENT_DIR_ID: + dirUp(); + break; + case NEW_SEARCH_ID: + emit newSearch(); + break; + case REFRESH_ID: + load( baseURL ); + break; + case INCLUDE_ALL_ID: + includeAll(); + break; + case STEP_INTO_ID: + { + QString uri; + if( fileItem && fileItem->isDir() ) + uri = fileItem->fullPath(); + else + uri = currentDirectory->fullPath(); + ACTIVE_FUNC->openUrl(vfs::fromPathOrURL( uri )); + } + break; + case LINES_VIEW_ID: + setView( VIEW_LINES ); + break; + case DETAILED_VIEW_ID: + setView( VIEW_DETAILED ); + break; + case FILELIGHT_VIEW_ID: + setView( VIEW_FILELIGHT ); + break; + case NEXT_VIEW_ID: + setView( ( activeView + 1 ) % 3 ); + break; + case PREVIOUS_VIEW_ID: + setView( ( activeView + 2 ) % 3 ); + break; + } + visibleWidget()->setFocus(); +} + +void DiskUsage::keyPressEvent( QKeyEvent *e ) +{ + if( activeView != VIEW_LOADER ) + { + switch ( e->key() ) + { + case Key_E: + if( e->state() == ControlButton ) + { + executeAction( EXCLUDE_ID, getCurrentFile() ); + return; + } + case Key_D: + if( e->state() == ControlButton ) + { + executeAction( DETAILED_VIEW_ID ); + return; + } + case Key_F: + if( e->state() == ControlButton ) + { + executeAction( FILELIGHT_VIEW_ID ); + return; + } + case Key_I: + if( e->state() == ControlButton ) + { + executeAction( INCLUDE_ALL_ID ); + return; + } + break; + case Key_L: + if( e->state() == ControlButton ) + { + executeAction( LINES_VIEW_ID ); + return; + } + case Key_N: + if( e->state() == ControlButton ) + { + executeAction( NEW_SEARCH_ID ); + return; + } + break; + case Key_R: + if( e->state() == ControlButton ) + { + executeAction( REFRESH_ID ); + return; + } + break; + case Key_Up: + if( e->state() == ShiftButton ) + { + executeAction( PARENT_DIR_ID ); + return; + } + break; + case Key_Down: + if( e->state() == ShiftButton ) + { + executeAction( STEP_INTO_ID ); + return; + } + break; + case Key_Left: + if( e->state() == ShiftButton ) + { + executeAction( PREVIOUS_VIEW_ID ); + return; + } + break; + case Key_Right: + if( e->state() == ShiftButton ) + { + executeAction( NEXT_VIEW_ID ); + return; + } + break; + case Key_Delete: + if( !e->state() ) + { + executeAction( DELETE_ID, getCurrentFile() ); + return; + } + case Key_Plus: + if( activeView == VIEW_FILELIGHT ) + { + filelightView->zoomIn(); + return; + } + break; + case Key_Minus: + if( activeView == VIEW_FILELIGHT ) + { + filelightView->zoomOut(); + return; + } + break; + } + } + QWidgetStack::keyPressEvent( e ); +} + +QPixmap DiskUsage::getIcon( QString mime ) +{ + QPixmap icon; + + if ( !QPixmapCache::find( mime, icon ) ) + { + // get the icon. + if ( mime == "Broken Link !" ) + icon = FL_LOADICON( "file_broken" ); + else + icon = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( QString::null, true ) ); + + // insert it into the cache + QPixmapCache::insert( mime, icon ); + } + return icon; +} + +int DiskUsage::calculatePercents( bool emitSig, Directory *dirEntry, int depth ) +{ + int changeNr = 0; + + if( dirEntry == 0 ) + dirEntry = root; + + for( Iterator it = dirEntry->iterator(); it != dirEntry->end(); ++it ) + { + File *item = *it; + + if( !item->isExcluded() ) + { + int newPerc; + + if( dirEntry->size() == 0 && item->size() == 0 ) + newPerc = 0; + else if( dirEntry->size() == 0 ) + newPerc = -1; + else + newPerc = (int)((double)item->size() / (double)currentSize * 10000. + 0.5); + + int oldPerc = item->intPercent(); + item->setPercent( newPerc ); + + if( emitSig && newPerc != oldPerc ) { + emit changed( item ); + changeNr++; + } + + if( item->isDir() ) + changeNr += calculatePercents( emitSig, dynamic_cast( item ), depth + 1 ); + } + } + + if( depth == 0 && changeNr != 0 ) + emit changeFinished(); + return changeNr; +} + +QString DiskUsage::getToolTip( File *item ) +{ + KMimeType::Ptr mimePtr = KMimeType::mimeType( item->mime() ); + QString mime = mimePtr->comment(); + + time_t tma = item->time(); + struct tm* t=localtime((time_t *)&tma); + QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min)); + QString date = KGlobal::locale()->formatDateTime(tmp); + + QString str = "
"+ + ""+ + ""; + + if( item->isDir() ) + str += ""; + + str += ""+ + ""+ + ""+ + "
" + i18n( "Name:" ) + "" + item->name() + "
" + i18n( "Type:" ) + "" + mime + "
" + i18n( "Size:" ) + "" + KRpermHandler::parseSize( item->size() ) + "
" + i18n( "Own size:" ) + "" + KRpermHandler::parseSize( item->ownSize() ) + "
" + i18n( "Last modified:" ) + "" + date + "
" + i18n( "Permissions:" ) + "" + item->perm() + "
" + i18n( "Owner:" ) + "" + item->owner() + " - " + item->group() + "
"; + str.replace( " ", " " ); + return str; +} + +void DiskUsage::setView( int view ) +{ + switch( view ) + { + case VIEW_LINES: + raiseWidget( lineView ); + break; + case VIEW_DETAILED: + raiseWidget( listView ); + break; + case VIEW_FILELIGHT: + raiseWidget( filelightView ); + break; + case VIEW_LOADER: + raiseWidget( loaderView ); + break; + } + + visibleWidget()->setFocus(); + emit viewChanged( activeView = view ); +} + +File * DiskUsage::getCurrentFile() +{ + File * file = 0; + + switch( activeView ) + { + case VIEW_LINES: + file = lineView->getCurrentFile(); + break; + case VIEW_DETAILED: + file = listView->getCurrentFile(); + break; + case VIEW_FILELIGHT: + file = filelightView->getCurrentFile(); + break; + } + + return file; +} + +bool DiskUsage::event( QEvent * e ) +{ + if( deleting ) { // if we are deleting, disable the mouse and + switch( e->type() ) { // keyboard events + case QEvent::MouseButtonPress: + case QEvent::MouseButtonRelease: + case QEvent::MouseButtonDblClick: + case QEvent::MouseMove: + case QEvent::KeyPress: + case QEvent::KeyRelease: + return true; + default: + break; + } + } + + if ( e->type() == QEvent::AccelOverride ) + { + QKeyEvent* ke = (QKeyEvent*) e; + + if ( ke->state() == NoButton || ke->state() == Keypad ) + { + switch ( ke->key() ) + { + case Key_Delete: + case Key_Plus: + case Key_Minus: + ke->accept(); + break; + } + }else if( ke->state() == ShiftButton ) + { + switch ( ke->key() ) + { + case Key_Left: + case Key_Right: + case Key_Up: + case Key_Down: + ke->accept(); + break; + } + }else if ( ke->state() & ControlButton ) + { + switch ( ke->key() ) + { + case Key_D: + case Key_E: + case Key_F: + case Key_I: + case Key_L: + case Key_N: + case Key_R: + ke->accept(); + break; + } + } + } + return QWidgetStack::event( e ); +} + +#include "diskusage.moc" diff --git a/krusader/DiskUsage/diskusage.h b/krusader/DiskUsage/diskusage.h new file mode 100644 index 0000000..da5160e --- /dev/null +++ b/krusader/DiskUsage/diskusage.h @@ -0,0 +1,204 @@ +/*************************************************************************** + diskusage.h - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __DISK_USAGE_H__ +#define __DISK_USAGE_H__ + +#include "../VFS/vfs.h" +#include "filelightParts/fileTree.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define VIEW_LINES 0 +#define VIEW_DETAILED 1 +#define VIEW_FILELIGHT 2 +#define VIEW_LOADER 3 + +typedef QDict Properties; + +class DUListView; +class DULines; +class DUFilelight; +class KPopupMenu; +class LoaderWidget; + +class DiskUsage : public QWidgetStack +{ + Q_OBJECT + +public: + DiskUsage( QString confGroup, QWidget *parent = 0, char *name = 0); + ~DiskUsage(); + + void load( KURL dirName ); + void close(); + void stopLoad(); + bool isLoading() { return loading; } + + void setView( int view ); + int getActiveView() { return activeView; } + + Directory* getDirectory( QString path ); + File * getFile( QString path ); + + QString getConfigGroup() { return configGroup; } + + void * getProperty( File *, QString ); + void addProperty( File *, QString, void * ); + void removeProperty( File *, QString ); + + int exclude( File *file, bool calcPercents = true, int depth = 0 ); + void includeAll(); + + int del( File *file, bool calcPercents = true, int depth = 0 ); + + QString getToolTip( File * ); + + void rightClickMenu( File *, KPopupMenu * = 0, QString = QString::null ); + + void changeDirectory( Directory *dir ); + + Directory* getCurrentDir(); + File* getCurrentFile(); + + QPixmap getIcon( QString mime ); + + KURL getBaseURL() { return baseURL; } + +public slots: + void dirUp(); + void clear(); + +signals: + void enteringDirectory( Directory * ); + void clearing(); + void changed( File * ); + void changeFinished(); + void deleted( File * ); + void deleteFinished(); + void status( QString ); + void viewChanged( int ); + void loadFinished( bool ); + void newSearch(); + +protected slots: + void slotLoadDirectory(); + +protected: + QDict< Directory > contentMap; + QPtrDict propertyMap; + + Directory* currentDirectory; + KIO::filesize_t currentSize; + + virtual void keyPressEvent( QKeyEvent * ); + virtual bool event( QEvent * ); + + int calculateSizes( Directory *dir = 0, bool emitSig = false, int depth = 0 ); + int calculatePercents( bool emitSig = false, Directory *dir = 0 , int depth = 0 ); + int include( Directory *dir, int depth = 0 ); + void createStatus(); + void executeAction( int, File * = 0 ); + + KURL baseURL; //< the base URL of loading + + DUListView *listView; + DULines *lineView; + DUFilelight *filelightView; + LoaderWidget *loaderView; + + Directory *root; + + int activeView; + + QString configGroup; + + bool first; + bool loading; + bool abortLoading; + bool clearAfterAbort; + bool deleting; + + QValueStack directoryStack; + QPtrStack parentStack; + + vfs * searchVfs; + vfile * currentVfile; + Directory * currentParent; + QString dirToCheck; + + int fileNum; + int dirNum; + int viewBeforeLoad; + + QTimer loadingTimer; +}; + + +class LoaderWidget : public QScrollView +{ + Q_OBJECT + +public: + LoaderWidget( QWidget *parent = 0, const char *name = 0 ); + + void init(); + void setCurrentURL( KURL url ); + void setValues( int fileNum, int dirNum, KIO::filesize_t total ); + bool wasCancelled() { return cancelled; } + +public slots: + void slotCancelled(); + +protected: + virtual void resizeEvent ( QResizeEvent *e ); + + QLabel *totalSize; + QLabel *files; + QLabel *directories; + + KSqueezedTextLabel *searchedDirectory; + QWidget *widget; + + bool cancelled; +}; + +#endif /* __DISK_USAGE_GUI_H__ */ diff --git a/krusader/DiskUsage/diskusagegui.cpp b/krusader/DiskUsage/diskusagegui.cpp new file mode 100644 index 0000000..f2bc140 --- /dev/null +++ b/krusader/DiskUsage/diskusagegui.cpp @@ -0,0 +1,227 @@ +/*************************************************************************** + diskusagegui.cpp - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "diskusagegui.h" +#include "../kicons.h" +#include "../krusader.h" +#include "../VFS/vfs.h" +#include "../Dialogs/krdialogs.h" + +#include +#include +#include +#include + +DiskUsageGUI::DiskUsageGUI( KURL openDir, QWidget* parent, const char *name ) + : QDialog( parent, name, false, 0 ), exitAtFailure( true ) +{ + setCaption( i18n("Krusader::Disk Usage") ); + + baseDirectory = openDir; + if( !newSearch() ) + return; + + QGridLayout *duGrid = new QGridLayout( this ); + duGrid->setSpacing( 6 ); + duGrid->setMargin( 11 ); + + QHBox *duTools = new QHBox( this, "duTools" ); + duTools->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + + btnNewSearch = new QToolButton( duTools, "btnNewSearch" ); + btnNewSearch->setIconSet( QIconSet(krLoader->loadIcon("fileopen",KIcon::Desktop)) ); + QToolTip::add( btnNewSearch, i18n( "Start new disk usage search" ) ); + + btnRefresh = new QToolButton( duTools, "btnRefresh" ); + btnRefresh->setIconSet( QIconSet(krLoader->loadIcon("reload",KIcon::Desktop)) ); + QToolTip::add( btnRefresh, i18n( "Refresh" ) ); + + btnDirUp = new QToolButton( duTools, "btnDirUp" ); + btnDirUp->setIconSet( QIconSet(krLoader->loadIcon("up",KIcon::Desktop)) ); + QToolTip::add( btnDirUp, i18n( "Parent directory" ) ); + + QWidget * separatorWidget = new QWidget( duTools, "separatorWidget" ); + separatorWidget->setMinimumWidth( 10 ); + + btnLines = new QToolButton( duTools, "btnLines" ); + btnLines->setIconSet( QIconSet(krLoader->loadIcon("leftjust",KIcon::Desktop)) ); + btnLines->setToggleButton( true ); + QToolTip::add( btnLines, i18n( "Line view" ) ); + + btnDetailed = new QToolButton( duTools, "btnDetailed" ); + btnDetailed->setIconSet( QIconSet(krLoader->loadIcon("view_detailed",KIcon::Desktop)) ); + btnDetailed->setToggleButton( true ); + QToolTip::add( btnDetailed, i18n( "Detailed view" ) ); + + btnFilelight = new QToolButton( duTools, "btnFilelight" ); + btnFilelight->setIconSet( QIconSet(krLoader->loadIcon("kr_diskusage",KIcon::Desktop)) ); + btnFilelight->setToggleButton( true ); + QToolTip::add( btnFilelight, i18n( "Filelight view" ) ); + + QWidget *spacerWidget = new QWidget( duTools, "spacerWidget" ); + QHBoxLayout *hboxlayout = new QHBoxLayout( spacerWidget ); + QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed ); + hboxlayout->addItem( spacer ); + + duGrid->addWidget( duTools, 0, 0 ); + + diskUsage = new DiskUsage( "DiskUsage", this ); + duGrid->addWidget( diskUsage, 1, 0 ); + + status = new KSqueezedTextLabel( this ); + status->setFrameShape( QLabel::StyledPanel ); + status->setFrameShadow( QLabel::Sunken ); + duGrid->addWidget( status, 2, 0 ); + + connect( diskUsage, SIGNAL( status( QString ) ), this, SLOT( setStatus( QString ) ) ); + connect( diskUsage, SIGNAL( viewChanged( int ) ), this, SLOT( slotViewChanged( int ) ) ); + connect( diskUsage, SIGNAL( newSearch() ), this, SLOT( newSearch() ) ); + connect( diskUsage, SIGNAL( loadFinished( bool ) ), this, SLOT( slotLoadFinished( bool ) ) ); + connect( btnNewSearch, SIGNAL( clicked() ), this, SLOT( newSearch() ) ); + connect( btnRefresh, SIGNAL( clicked() ), this, SLOT( loadUsageInfo() ) ); + connect( btnDirUp, SIGNAL( clicked() ), diskUsage, SLOT( dirUp() ) ); + connect( btnLines, SIGNAL( clicked() ), this, SLOT( selectLinesView() ) ); + connect( btnDetailed, SIGNAL( clicked() ), this, SLOT( selectListView() ) ); + connect( btnFilelight, SIGNAL( clicked() ), this, SLOT( selectFilelightView() ) ); + + krConfig->setGroup( "DiskUsage" ); + + int view = krConfig->readNumEntry( "View", VIEW_LINES ); + if( view < VIEW_LINES || view > VIEW_FILELIGHT ) + view = VIEW_LINES; + diskUsage->setView( view ); + + sizeX = krConfig->readNumEntry( "Window Width", QFontMetrics(font()).width("W") * 70 ); + sizeY = krConfig->readNumEntry( "Window Height", QFontMetrics(font()).height() * 25 ); + resize( sizeX, sizeY ); + + if( krConfig->readBoolEntry( "Window Maximized", false ) ) + showMaximized(); + else + show(); + + exec(); +} + +DiskUsageGUI::~DiskUsageGUI() +{ +} + +void DiskUsageGUI::slotLoadFinished( bool result ) +{ + if( exitAtFailure && !result ) + reject(); + else + exitAtFailure = false; +} + +void DiskUsageGUI::enableButtons( bool isOn ) +{ + btnNewSearch->setEnabled( isOn ); + btnRefresh->setEnabled( isOn ); + btnDirUp->setEnabled( isOn ); + btnLines->setEnabled( isOn ); + btnDetailed->setEnabled( isOn ); + btnFilelight->setEnabled( isOn ); +} + +void DiskUsageGUI::resizeEvent( QResizeEvent *e ) +{ + if( !isMaximized() ) + { + sizeX = e->size().width(); + sizeY = e->size().height(); + } + QDialog::resizeEvent( e ); +} + +void DiskUsageGUI::reject() +{ + krConfig->setGroup( "DiskUsage" ); + krConfig->writeEntry("Window Width", sizeX ); + krConfig->writeEntry("Window Height", sizeY ); + krConfig->writeEntry("Window Maximized", isMaximized() ); + krConfig->writeEntry("View", diskUsage->getActiveView() ); + + QDialog::reject(); +} + +void DiskUsageGUI::loadUsageInfo() +{ + diskUsage->load( baseDirectory ); +} + +void DiskUsageGUI::setStatus( QString stat ) +{ + status->setText( stat ); +} + +void DiskUsageGUI::slotViewChanged( int view ) +{ + if( view == VIEW_LOADER ) + { + enableButtons( false ); + return; + } + enableButtons( true ); + + btnLines->setOn( false ); + btnDetailed->setOn( false ); + btnFilelight->setOn( false ); + + switch( view ) + { + case VIEW_LINES: + btnLines->setOn( true ); + break; + case VIEW_DETAILED: + btnDetailed->setOn( true ); + break; + case VIEW_FILELIGHT: + btnFilelight->setOn( true ); + break; + case VIEW_LOADER: + break; + } +} + +bool DiskUsageGUI::newSearch() +{ + // ask the user for the copy dest + + KURL tmp = KChooseDir::getDir(i18n( "Viewing the usage of directory:" ), baseDirectory, baseDirectory); + if (tmp.isEmpty()) return false; + baseDirectory = tmp; + + QTimer::singleShot( 0, this, SLOT( loadUsageInfo() ) ); + return true; +} + +#include "diskusagegui.moc" diff --git a/krusader/DiskUsage/diskusagegui.h b/krusader/DiskUsage/diskusagegui.h new file mode 100644 index 0000000..d243307 --- /dev/null +++ b/krusader/DiskUsage/diskusagegui.h @@ -0,0 +1,89 @@ +/*************************************************************************** + diskusagegui.h - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __DISK_USAGE_GUI_H__ +#define __DISK_USAGE_GUI_H__ + +#include +#include +#include +#include +#include + +#include "diskusage.h" + +class DiskUsageGUI : public QDialog +{ + Q_OBJECT + +public: + DiskUsageGUI( KURL openDir, QWidget* parent=0, const char *name = 0 ); + ~DiskUsageGUI(); + + +public slots: + void loadUsageInfo(); + bool newSearch(); + void setStatus( QString ); + + void selectLinesView() { diskUsage->setView( VIEW_LINES ); } + void selectListView() { diskUsage->setView( VIEW_DETAILED ); } + void selectFilelightView() { diskUsage->setView( VIEW_FILELIGHT ); } + +protected slots: + virtual void reject(); + void slotViewChanged( int view ); + void enableButtons( bool ); + void slotLoadFinished( bool ); + +protected: + virtual void resizeEvent( QResizeEvent *e ); + + DiskUsage *diskUsage; + KURL baseDirectory; + + KSqueezedTextLabel *status; + + QToolButton *btnNewSearch; + QToolButton *btnRefresh; + QToolButton *btnDirUp; + + QToolButton *btnLines; + QToolButton *btnDetailed; + QToolButton *btnFilelight; + + int sizeX; + int sizeY; + + bool exitAtFailure; +}; + +#endif /* __DISK_USAGE_GUI_H__ */ + diff --git a/krusader/DiskUsage/dufilelight.cpp b/krusader/DiskUsage/dufilelight.cpp new file mode 100644 index 0000000..6a6bee9 --- /dev/null +++ b/krusader/DiskUsage/dufilelight.cpp @@ -0,0 +1,236 @@ +/*************************************************************************** + dufilelight.cpp - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "dufilelight.h" +#include "radialMap/radialMap.h" +#include +#include +#include + +#define SCHEME_POPUP_ID 6730 + +DUFilelight::DUFilelight( DiskUsage *usage, const char *name ) + : RadialMap::Widget( usage, name ), diskUsage( usage ), currentDir( 0 ), refreshNeeded( true ) +{ + setFocusPolicy( QWidget::StrongFocus ); + + connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotDirChanged( Directory * ) ) ); + connect( diskUsage, SIGNAL( clearing() ), this, SLOT( clear() ) ); + connect( diskUsage, SIGNAL( changed( File * ) ), this, SLOT( slotChanged( File * ) ) ); + connect( diskUsage, SIGNAL( deleted( File * ) ), this, SLOT( slotChanged( File * ) ) ); + connect( diskUsage, SIGNAL( changeFinished() ), this, SLOT( slotRefresh() ) ); + connect( diskUsage, SIGNAL( deleteFinished() ), this, SLOT( slotRefresh() ) ); + connect( diskUsage, SIGNAL( aboutToShow( QWidget * ) ), this, SLOT( slotAboutToShow( QWidget * ) ) ); +} + +void DUFilelight::slotDirChanged( Directory *dir ) +{ + if( diskUsage->visibleWidget() != this ) + return; + + if( currentDir != dir ) + { + currentDir = dir; + + invalidate( false ); + create( dir ); + refreshNeeded = false; + } +} + +void DUFilelight::clear() +{ + invalidate( false ); + currentDir = 0; +} + +File * DUFilelight::getCurrentFile() +{ + const RadialMap::Segment * focus = focusSegment(); + + if( !focus || focus->isFake() || focus->file() == currentDir ) + return 0; + + return (File *)focus->file(); +} + +void DUFilelight::mousePressEvent( QMouseEvent *event ) +{ + if( event->button() == Qt::RightButton ) + { + File * file = 0; + + const RadialMap::Segment * focus = focusSegment(); + + if( focus && !focus->isFake() && focus->file() != currentDir ) + file = (File *)focus->file(); + + KPopupMenu filelightPopup; + filelightPopup.insertItem( i18n("Zoom In"), this, SLOT( zoomIn() ), Key_Plus ); + filelightPopup.insertItem( i18n("Zoom Out"), this, SLOT( zoomOut() ), Key_Minus ); + + KPopupMenu schemePopup; + schemePopup.insertItem( i18n("Rainbow"), this, SLOT( schemeRainbow() ) ); + schemePopup.insertItem( i18n("High Contrast"), this, SLOT( schemeHighContrast() ) ); + schemePopup.insertItem( i18n("KDE"), this, SLOT( schemeKDE() ) ); + + filelightPopup.insertItem( QPixmap(), &schemePopup, SCHEME_POPUP_ID ); + filelightPopup.changeItem( SCHEME_POPUP_ID, i18n( "Scheme" ) ); + + filelightPopup.insertItem( i18n("Increase contrast"), this, SLOT( increaseContrast() ) ); + filelightPopup.insertItem( i18n("Decrease contrast"), this, SLOT( decreaseContrast() ) ); + + int aid = filelightPopup.insertItem( i18n("Use anti-aliasing" ), this, SLOT( changeAntiAlias() ) ); + filelightPopup.setItemChecked( aid, Filelight::Config::antiAliasFactor > 1 ); + + int sid = filelightPopup.insertItem( i18n("Show small files" ), this, SLOT( showSmallFiles() ) ); + filelightPopup.setItemChecked( sid, Filelight::Config::showSmallFiles ); + + int vid = filelightPopup.insertItem( i18n("Vary label font sizes" ), this, SLOT( varyLabelFontSizes() ) ); + filelightPopup.setItemChecked( vid, Filelight::Config::varyLabelFontSizes ); + + filelightPopup.insertItem( i18n("Minimum font size"), this, SLOT( minFontSize() ) ); + + diskUsage->rightClickMenu( file, &filelightPopup, i18n( "Filelight" ) ); + return; + }else if( event->button() == Qt::LeftButton ) + { + const RadialMap::Segment * focus = focusSegment(); + + if( focus && !focus->isFake() && focus->file() == currentDir ) + { + diskUsage->dirUp(); + return; + } + else if( focus && !focus->isFake() && focus->file()->isDir() ) + { + diskUsage->changeDirectory( (Directory *)focus->file() ); + return; + } + } + + RadialMap::Widget::mousePressEvent( event ); +} + +void DUFilelight::setScheme( Filelight::MapScheme scheme ) +{ + Filelight::Config::scheme = scheme; + Filelight::Config::write(); + slotRefresh(); +} + +void DUFilelight::increaseContrast() +{ + if( ( Filelight::Config::contrast += 10 ) > 100 ) + Filelight::Config::contrast = 100; + + Filelight::Config::write(); + slotRefresh(); +} + +void DUFilelight::decreaseContrast() +{ + if( ( Filelight::Config::contrast -= 10 ) > 100 ) + Filelight::Config::contrast = 0; + + Filelight::Config::write(); + slotRefresh(); +} + +void DUFilelight::changeAntiAlias() +{ + Filelight::Config::antiAliasFactor = 1 + ( Filelight::Config::antiAliasFactor == 1 ); + Filelight::Config::write(); + slotRefresh(); +} + +void DUFilelight::showSmallFiles() +{ + Filelight::Config::showSmallFiles = !Filelight::Config::showSmallFiles; + Filelight::Config::write(); + slotRefresh(); +} + +void DUFilelight::varyLabelFontSizes() +{ + Filelight::Config::varyLabelFontSizes = !Filelight::Config::varyLabelFontSizes; + Filelight::Config::write(); + slotRefresh(); +} + +void DUFilelight::minFontSize() +{ + bool ok = false; + + int result = KInputDialog::getInteger( i18n( "Krusader::Filelight" ), + i18n( "Minimum font size" ), (int)Filelight::Config::minFontPitch, 1, 100, 1, &ok, this ); + + if ( ok ) + { + Filelight::Config::minFontPitch = (uint)result; + + Filelight::Config::write(); + slotRefresh(); + } +} + +void DUFilelight::slotAboutToShow( QWidget *widget ) +{ + if( widget == this && ( diskUsage->getCurrentDir() != currentDir || refreshNeeded ) ) + { + refreshNeeded = false; + if( ( currentDir = diskUsage->getCurrentDir() ) != 0 ) + { + invalidate( false ); + create( currentDir ); + } + } +} + +void DUFilelight::slotRefresh() +{ + if( diskUsage->visibleWidget() != this ) + return; + + refreshNeeded = false; + if( currentDir && currentDir == diskUsage->getCurrentDir() ) + { + invalidate( false ); + create( currentDir ); + } +} + +void DUFilelight::slotChanged( File * ) +{ + if( !refreshNeeded ) + refreshNeeded = true; +} + +#include "dufilelight.moc" diff --git a/krusader/DiskUsage/dufilelight.h b/krusader/DiskUsage/dufilelight.h new file mode 100644 index 0000000..556830e --- /dev/null +++ b/krusader/DiskUsage/dufilelight.h @@ -0,0 +1,80 @@ +/*************************************************************************** + dufilelight.h - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __DU_FILELIGHT_H__ +#define __DU_FILELIGHT_H__ + +#include "diskusage.h" +#include "radialMap/widget.h" +#include "filelightParts/Config.h" + +class DUFilelight : public RadialMap::Widget +{ + Q_OBJECT + +public: + DUFilelight( DiskUsage *usage, const char *name ); + + File * getCurrentFile(); + +public slots: + void slotDirChanged( Directory * ); + void clear(); + void slotChanged( File * ); + void slotRefresh(); + +protected slots: + void slotAboutToShow( QWidget *widget ); + + void schemeRainbow() { setScheme( Filelight::Rainbow ); } + void schemeHighContrast() { setScheme( Filelight::HighContrast ); } + void schemeKDE() { setScheme( Filelight::KDE ); } + + void increaseContrast(); + void decreaseContrast(); + void changeAntiAlias(); + void showSmallFiles(); + void varyLabelFontSizes(); + void minFontSize(); + +protected: + virtual void mousePressEvent( QMouseEvent* ); + + void setScheme( Filelight::MapScheme ); + + DiskUsage *diskUsage; + Directory *currentDir; + +private: + bool refreshNeeded; +}; + +#endif /* __DU_FILELIGHT_H__ */ + diff --git a/krusader/DiskUsage/dulines.cpp b/krusader/DiskUsage/dulines.cpp new file mode 100644 index 0000000..089a8a7 --- /dev/null +++ b/krusader/DiskUsage/dulines.cpp @@ -0,0 +1,522 @@ +/*************************************************************************** + dulines.cpp - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "dulines.h" +#include "../kicons.h" +#include "../krusader.h" +#include "../VFS/krpermhandler.h" +#include +#include +#include +#include +#include +#include +#include +#include + +class DULinesItem : public QListViewItem +{ +public: + DULinesItem( DiskUsage *diskUsageIn, File *fileItem, QListView * parent, QString label1, + QString label2, QString label3, unsigned int italicPos ) : QListViewItem( parent, label1, label2, label3 ), + diskUsage( diskUsageIn ), file( fileItem ), isTruncated( false ), italicTextPos( italicPos ) {} + DULinesItem( DiskUsage *diskUsageIn, File *fileItem, QListView * parent, QListViewItem * after, + QString label1, QString label2, QString label3, unsigned int italicPos ) : QListViewItem( parent, after, label1, + label2, label3 ), diskUsage( diskUsageIn ), file( fileItem ), isTruncated( false ), italicTextPos( italicPos ) {} + + virtual int compare ( QListViewItem * i, int col, bool ascending ) const + { + if( text(0) == ".." ) return ascending ? -1 : 1; + if( i->text(0) == "..") return ascending ? 1 : -1; + + DULinesItem *compWith = dynamic_cast< DULinesItem * >( i ); + + QString buf1,buf2; + + switch( col ) + { + case 0: + case 1: + buf1.sprintf("%025llu",file->size()); + buf2.sprintf("%025llu",compWith->file->size()); + return -QString::compare( buf1, buf2 ); + default: + return QListViewItem::compare( i, col, ascending ); + } + } + + virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) + { + if( column == 2 ) + { + if ( isSelected() ) + p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) ); + else + p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Base ) ); + + QListView *lv = listView(); + + int pos = lv->itemMargin(); + + const QPixmap *icon = pixmap( column ); + if( icon ) + { + int iconWidth = icon->width() + lv->itemMargin(); + int xo = pos; + int yo = ( height() - icon->height() ) / 2; + + p->drawPixmap( xo, yo, *icon ); + + pos += iconWidth; + } + + QFontMetrics fm( p->fontMetrics() ); + + if( isSelected() ) + p->setPen( cg.highlightedText() ); + else + p->setPen( cg.text() ); + + QString t = text( column ); + QString b; + + if( t.length() > italicTextPos ) + { + b = t.mid( italicTextPos ); + t.truncate( italicTextPos ); + } + + isTruncated = false; + if( !t.isEmpty() ) + { + int remWidth = width-pos; + + if( fm.width( t ) > remWidth ) + { + while( !t.isEmpty() ) + { + t.truncate( t.length() - 1 ); + if( fm.width( t + "..." ) <= remWidth ) + break; + } + t += "..."; + isTruncated = true; + } + + p->drawText( pos, 0, width, height(), align, t ); + pos += fm.width( t ); + } + + if( !b.isEmpty() && !isTruncated ) + { + QFont font( p->font() ); + font.setItalic( true ); + p->setFont( font ); + + QFontMetrics fm2( p->fontMetrics() ); + + int remWidth = width-pos; + + if( fm2.width( b ) > remWidth ) + { + while( !b.isEmpty() ) + { + b.truncate( b.length() - 1 ); + if( fm2.width( b + "..." ) <= remWidth ) + break; + } + b += "..."; + isTruncated = true; + } + + p->drawText( pos, 0, width, height(), align, b ); + } + } + else + QListViewItem::paintCell( p, cg, column, width, align ); + } + + inline File * getFile() { return file; } + +private: + DiskUsage *diskUsage; + File *file; + + bool isTruncated; + unsigned int italicTextPos; +}; + +class DULinesToolTip : public QToolTip +{ +public: + DULinesToolTip( DiskUsage *usage, QWidget *parent, QListView *lv ); + void maybeTip( const QPoint &pos ); + + virtual ~DULinesToolTip() {} +private: + QListView *view; + DiskUsage *diskUsage; +}; + +DULinesToolTip::DULinesToolTip( DiskUsage *usage, QWidget *parent, QListView *lv ) + : QToolTip( parent ), view( lv ), diskUsage( usage ) +{ +} + +void DULinesToolTip::maybeTip( const QPoint &pos ) +{ + QListViewItem *item = view->itemAt( pos ); + QPoint contentsPos = view->viewportToContents( pos ); + if ( !item ) + return; + + int col = view->header()->sectionAt( contentsPos.x() ); + + int width = item->width( QFontMetrics( view->font() ), view, col ); + + QRect r = view->itemRect( item ); + int headerPos = view->header()->sectionPos( col ); + r.setLeft( headerPos ); + r.setRight( headerPos + view->header()->sectionSize( col ) ); + + if( col != 0 && width > view->columnWidth( col ) ) + tip( r, item->text( col ) ); + else if( col == 1 && item->text( 0 ) != ".." ) + { + File *fileItem = ((DULinesItem *)item)->getFile(); + tip( r, diskUsage->getToolTip( fileItem ) ); + } +} + +DULines::DULines( DiskUsage *usage, const char *name ) + : QListView( usage, name ), diskUsage( usage ), refreshNeeded( false ) +{ + setAllColumnsShowFocus(true); + setVScrollBarMode(QScrollView::Auto); + setHScrollBarMode(QScrollView::Auto); + setShowSortIndicator(true); + setTreeStepSize( 10 ); + + int defaultSize = QFontMetrics(font()).width("W"); + + krConfig->setGroup( diskUsage->getConfigGroup() ); + + showFileSize = krConfig->readBoolEntry( "L Show File Size", true ); + + int lineWidth = krConfig->readNumEntry("L Line Width", defaultSize * 20 ); + addColumn( i18n("Line View"), lineWidth ); + setColumnWidthMode(0,QListView::Manual); + int precentWidth = krConfig->readNumEntry("L Percent Width", defaultSize * 6 ); + addColumn( i18n("Percent"), precentWidth ); + setColumnWidthMode(1,QListView::Manual); + int nameWidth = krConfig->readNumEntry("L Name Width", defaultSize * 20 ); + addColumn( i18n("Name"), nameWidth ); + setColumnWidthMode(2,QListView::Manual); + + setColumnAlignment( 1, Qt::AlignRight ); + + header()->setStretchEnabled( true, 0 ); + + setSorting( 1 ); + + toolTip = new DULinesToolTip( diskUsage, viewport(), this ); + + connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotDirChanged( Directory * ) ) ); + connect( diskUsage, SIGNAL( clearing() ), this, SLOT( clear() ) ); + + connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( sectionResized( int ) ) ); + + connect( this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)), + this, SLOT( slotRightClicked(QListViewItem *) ) ); + connect( diskUsage, SIGNAL( changed( File * ) ), this, SLOT( slotChanged( File * ) ) ); + connect( diskUsage, SIGNAL( deleted( File * ) ), this, SLOT( slotDeleted( File * ) ) ); +} + +DULines::~DULines() +{ + krConfig->setGroup( diskUsage->getConfigGroup() ); + krConfig->writeEntry("L Line Width", columnWidth( 0 ) ); + krConfig->writeEntry("L Percent Width", columnWidth( 1 ) ); + krConfig->writeEntry("L Name Width", columnWidth( 2 ) ); + krConfig->writeEntry("L Show File Size", showFileSize ); + + delete toolTip; +} + +void DULines::slotDirChanged( Directory *dirEntry ) +{ + clear(); + + QListViewItem * lastItem = 0; + + if( ! ( dirEntry->parent() == 0 ) ) + { + lastItem = new QListViewItem( this, ".." ); + lastItem->setPixmap( 0, FL_LOADICON( "up" ) ); + lastItem->setSelectable( false ); + } + + int maxPercent = -1; + for( Iterator it = dirEntry->iterator(); it != dirEntry->end(); ++it ) + { + File *item = *it; + if( !item->isExcluded() && item->intPercent() > maxPercent ) + maxPercent = item->intPercent(); + } + + for( Iterator it = dirEntry->iterator(); it != dirEntry->end(); ++it ) + { + File *item = *it; + + QString fileName = item->name(); + + unsigned int italicStart = fileName.length(); + + if( showFileSize ) + fileName += " [" + KIO::convertSize( item->size() ) + "]"; + + if( lastItem == 0 ) + lastItem = new DULinesItem( diskUsage, item, this, "", item->percent() + " ", fileName, italicStart ); + else + lastItem = new DULinesItem( diskUsage, item, this, lastItem, "", item->percent() + " ", fileName, italicStart ); + + if( item->isExcluded() ) + lastItem->setVisible( false ); + + lastItem->setPixmap( 2, diskUsage->getIcon( item->mime() ) ); + lastItem->setPixmap( 0, createPixmap( item->intPercent(), maxPercent, columnWidth( 0 ) - itemMargin() ) ); + } + + setCurrentItem( firstChild() ); +} + +QPixmap DULines::createPixmap( int percent, int maxPercent, int maxWidth ) +{ + if( percent < 0 || percent > maxPercent || maxWidth < 2 || maxPercent == 0 ) + return QPixmap(); + maxWidth -= 2; + + int actualWidth = maxWidth*percent/maxPercent; + if( actualWidth == 0 ) + return QPixmap(); + + QPen pen; + pen.setColor( Qt::black ); + QPainter painter; + + int size = QFontMetrics(font()).height()-2; + QRect rect( 0, 0, actualWidth, size ); + QPixmap pixmap( rect.width(), rect.height() ); + + painter.begin( &pixmap ); + painter.setPen( pen ); + + for( int i = 1; i < actualWidth - 1; i++ ) + { + int color = (511*i/maxWidth); + if( color < 256 ) + pen.setColor( QColor( 255-color, 255, 0 ) ); + else + pen.setColor( QColor( color-256, 511-color, 0 ) ); + + painter.setPen( pen ); + painter.drawLine( i, 1, i, size-1 ); + } + + pen.setColor( Qt::black ); + painter.setPen( pen ); + painter.drawRect( rect ); + painter.end(); + pixmap.detach(); + return pixmap; +} + +void DULines::sectionResized( int column ) +{ + if( childCount() == 0 || column != 0 ) + return; + + Directory * currentDir = diskUsage->getCurrentDir(); + if( currentDir == 0 ) + return; + + int maxPercent = -1; + for( Iterator it = currentDir->iterator(); it != currentDir->end(); ++it ) + { + File *item = *it; + + if( !item->isExcluded() && item->intPercent() > maxPercent ) + maxPercent = item->intPercent(); + } + + DULinesItem *duItem = (DULinesItem *)firstChild(); + while( duItem ) + { + if( duItem->text( 0 ) != ".." ) + duItem->setPixmap( 0, createPixmap( duItem->getFile()->intPercent(), maxPercent, columnWidth( 0 ) ) ); + duItem = (DULinesItem *)duItem->nextSibling(); + } +} + +bool DULines::doubleClicked( QListViewItem * item ) +{ + if( item ) + { + if( item->text( 0 ) != ".." ) + { + File *fileItem = ((DULinesItem *)item)->getFile(); + if( fileItem->isDir() ) + diskUsage->changeDirectory( dynamic_cast ( fileItem ) ); + return true; + } + else + { + Directory *upDir = (Directory *)diskUsage->getCurrentDir()->parent(); + + if( upDir ) + diskUsage->changeDirectory( upDir ); + return true; + } + } + return false; +} + +void DULines::contentsMouseDoubleClickEvent ( QMouseEvent * e ) +{ + if ( e || e->button() == LeftButton ) + { + QPoint vp = contentsToViewport(e->pos()); + QListViewItem * item = itemAt( vp ); + + if( doubleClicked( item ) ) + return; + + } + QListView::contentsMouseDoubleClickEvent( e ); +} + + +void DULines::keyPressEvent( QKeyEvent *e ) +{ + switch ( e->key() ) + { + case Key_Return : + case Key_Enter : + if( doubleClicked( currentItem() ) ) + return; + break; + case Key_Left : + case Key_Right : + case Key_Up : + case Key_Down : + if( e->state() == ShiftButton ) + { + e->ignore(); + return; + } + break; + case Key_Delete : + e->ignore(); + return; + } + QListView::keyPressEvent( e ); +} + +void DULines::slotRightClicked( QListViewItem *item ) +{ + File * file = 0; + + if ( item && item->text( 0 ) != ".." ) + file = ((DULinesItem *)item)->getFile(); + + KPopupMenu linesPopup; + int lid = linesPopup.insertItem( i18n("Show file sizes"), this, SLOT( slotShowFileSizes() ) ); + linesPopup.setItemChecked( lid, showFileSize ); + + diskUsage->rightClickMenu( file, &linesPopup, i18n( "Lines" ) ); +} + +void DULines::slotShowFileSizes() +{ + showFileSize = !showFileSize; + slotDirChanged( diskUsage->getCurrentDir() ); +} + +File * DULines::getCurrentFile() +{ + QListViewItem *item = currentItem(); + + if( item == 0 || item->text( 0 ) == ".." ) + return 0; + + return ((DULinesItem *)item)->getFile(); +} + +void DULines::slotChanged( File * item ) +{ + QListViewItem *lvitem = firstChild(); + while( lvitem ) + { + if( lvitem->text( 0 ) != ".." ) { + DULinesItem *duItem = (DULinesItem *)( lvitem ); + if( duItem->getFile() == item ) + { + duItem->setVisible( !item->isExcluded() ); + duItem->setText( 1, item->percent() ); + if( !refreshNeeded ) + { + refreshNeeded = true; + QTimer::singleShot( 0, this, SLOT( slotRefresh() ) ); + } + break; + } + } + lvitem = lvitem->nextSibling(); + } +} + +void DULines::slotDeleted( File * item ) +{ + QListViewItem *lvitem = firstChild(); + while( lvitem ) + { + if( lvitem->text( 0 ) != ".." ) { + DULinesItem *duItem = (DULinesItem *)( lvitem ); + if( duItem->getFile() == item ) + { + delete duItem; + break; + } + } + lvitem = lvitem->nextSibling(); + } +} + +#include "dulines.moc" diff --git a/krusader/DiskUsage/dulines.h b/krusader/DiskUsage/dulines.h new file mode 100644 index 0000000..aa83ad1 --- /dev/null +++ b/krusader/DiskUsage/dulines.h @@ -0,0 +1,78 @@ +/*************************************************************************** + dulines.h - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __DU_LINES_H__ +#define __DU_LINES_H__ + +#include +#include +#include "diskusage.h" + +class DULinesToolTip; + +class DULines : public QListView +{ + Q_OBJECT + +public: + DULines( DiskUsage *usage, const char *name ); + ~DULines(); + + File * getCurrentFile(); + +public slots: + void slotDirChanged( Directory *dirEntry ); + void sectionResized( int ); + void slotRightClicked(QListViewItem *); + void slotChanged( File * ); + void slotDeleted( File * ); + void slotShowFileSizes(); + void slotRefresh() { refreshNeeded = false; sectionResized( 0 ); } + +protected: + DiskUsage *diskUsage; + + virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e ); + virtual void keyPressEvent( QKeyEvent *e ); + +private: + QPixmap createPixmap( int percent, int maxPercent, int maxWidth ); + + bool doubleClicked( QListViewItem * item ); + + bool refreshNeeded; + + bool showFileSize; + + DULinesToolTip *toolTip; +}; + +#endif /* __DU_LINES_H__ */ + diff --git a/krusader/DiskUsage/dulistview.cpp b/krusader/DiskUsage/dulistview.cpp new file mode 100644 index 0000000..62c1fcf --- /dev/null +++ b/krusader/DiskUsage/dulistview.cpp @@ -0,0 +1,293 @@ +/*************************************************************************** + dulistview.cpp - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + S o u r c e F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include "dulistview.h" +#include "../krusader.h" +#include "../kicons.h" +#include "../VFS/krpermhandler.h" +#include +#include +#include +#include +#include +#include + +DUListView::DUListView( DiskUsage *usage, const char *name ) + : QListView( usage, name ), diskUsage( usage ) +{ + setAllColumnsShowFocus(true); + setVScrollBarMode(QScrollView::Auto); + setHScrollBarMode(QScrollView::Auto); + setShowSortIndicator(true); + setRootIsDecorated( true ); + setTreeStepSize( 10 ); + + int defaultSize = QFontMetrics(font()).width("W"); + + krConfig->setGroup( diskUsage->getConfigGroup() ); + int nameWidth = krConfig->readNumEntry("D Name Width", defaultSize * 20 ); + addColumn( i18n("Name"), nameWidth ); + setColumnWidthMode(0,QListView::Manual); + int percentWidth = krConfig->readNumEntry("D Percent Width", defaultSize * 5 ); + addColumn( i18n("Percent"), percentWidth ); + setColumnWidthMode(1,QListView::Manual); + int totalSizeWidth = krConfig->readNumEntry("D Total Size Width", defaultSize * 10 ); + addColumn( i18n("Total size"), totalSizeWidth ); + setColumnWidthMode(1,QListView::Manual); + int ownSizeWidth = krConfig->readNumEntry("D Own Size Width", defaultSize * 10 ); + addColumn( i18n("Own size"), ownSizeWidth ); + setColumnWidthMode(2,QListView::Manual); + int typeWidth = krConfig->readNumEntry("D Type Width", defaultSize * 10 ); + addColumn( i18n("Type"), typeWidth ); + setColumnWidthMode(3,QListView::Manual); + int dateWidth = krConfig->readNumEntry("D Date Width", defaultSize * 10 ); + addColumn( i18n("Date"), dateWidth ); + setColumnWidthMode(4,QListView::Manual); + int permissionsWidth = krConfig->readNumEntry("D Permissions Width", defaultSize * 6 ); + addColumn( i18n("Permissions"), permissionsWidth ); + setColumnWidthMode(5,QListView::Manual); + int ownerWidth = krConfig->readNumEntry("D Owner Width", defaultSize * 5 ); + addColumn( i18n("Owner"), ownerWidth ); + setColumnWidthMode(6,QListView::Manual); + int groupWidth = krConfig->readNumEntry("D Group Width", defaultSize * 5 ); + addColumn( i18n("Group"), groupWidth ); + setColumnWidthMode(7,QListView::Manual); + + setColumnAlignment( 1, Qt::AlignRight ); + setColumnAlignment( 2, Qt::AlignRight ); + setColumnAlignment( 3, Qt::AlignRight ); + + setSorting( 2 ); + + connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotDirChanged( Directory * ) ) ); + connect( diskUsage, SIGNAL( clearing() ), this, SLOT( clear() ) ); + connect( diskUsage, SIGNAL( changed( File * ) ), this, SLOT( slotChanged( File * ) ) ); + connect( diskUsage, SIGNAL( deleted( File * ) ), this, SLOT( slotDeleted( File * ) ) ); + + connect( this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)), + this, SLOT( slotRightClicked(QListViewItem *) ) ); + connect( this, SIGNAL( expanded ( QListViewItem * ) ), + this, SLOT( slotExpanded( QListViewItem * ) ) ); +} + +DUListView::~ DUListView() +{ + krConfig->setGroup( diskUsage->getConfigGroup() ); + krConfig->writeEntry("D Name Width", columnWidth( 0 ) ); + krConfig->writeEntry("D Percent Width", columnWidth( 1 ) ); + krConfig->writeEntry("D Total Size Width", columnWidth( 2 ) ); + krConfig->writeEntry("D Own Size Width", columnWidth( 3 ) ); + krConfig->writeEntry("D Type Width", columnWidth( 4 ) ); + krConfig->writeEntry("D Date Width", columnWidth( 5 ) ); + krConfig->writeEntry("D Permissions Width", columnWidth( 6 ) ); + krConfig->writeEntry("D Owner Width", columnWidth( 7 ) ); + krConfig->writeEntry("D Group Width", columnWidth( 8 ) ); +} + +void DUListView::addDirectory( Directory *dirEntry, QListViewItem *parent ) +{ + QListViewItem * lastItem = 0; + + if( parent == 0 && ! ( dirEntry->parent() == 0 ) ) + { + lastItem = new QListViewItem( this, ".." ); + lastItem->setPixmap( 0, FL_LOADICON( "up" ) ); + lastItem->setSelectable( false ); + } + + for( Iterator it = dirEntry->iterator(); it != dirEntry->end(); ++it ) + { + File *item = *it; + + KMimeType::Ptr mimePtr = KMimeType::mimeType( item->mime() ); + QString mime = mimePtr->comment(); + + time_t tma = item->time(); + struct tm* t=localtime((time_t *)&tma); + QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min)); + QString date = KGlobal::locale()->formatDateTime(tmp); + + QString totalSize = KRpermHandler::parseSize( item->size() ) + " "; + QString ownSize = KRpermHandler::parseSize( item->ownSize() ) + " "; + QString percent = item->percent(); + + if( lastItem == 0 && parent == 0 ) + lastItem = new DUListViewItem( diskUsage, item, this, item->name(), percent, totalSize, ownSize, + mime, date, item->perm(), item->owner(), item->group() ); + else if ( lastItem == 0 ) + lastItem = new DUListViewItem( diskUsage, item, parent, item->name(), percent, totalSize, ownSize, + mime, date, item->perm(), item->owner(), item->group() ); + else if ( parent == 0 ) + lastItem = new DUListViewItem( diskUsage, item, this, lastItem, item->name(), percent, totalSize, + ownSize, mime, date, item->perm(), item->owner(), item->group() ); + else + lastItem = new DUListViewItem( diskUsage, item, parent, lastItem, item->name(), percent, totalSize, + ownSize, mime, date, item->perm(), item->owner(), item->group() ); + + if( item->isExcluded() ) + lastItem->setVisible( false ); + + lastItem->setPixmap( 0, diskUsage->getIcon( item->mime() ) ); + + if( item->isDir() && !item->isSymLink() ) + lastItem->setExpandable( true ); + } + + QListViewItem *first = firstChild(); + if( first ) + setCurrentItem( first ); +} + +void DUListView::slotDirChanged( Directory *dirEntry ) +{ + clear(); + addDirectory( dirEntry, 0 ); +} + +File * DUListView::getCurrentFile() +{ + QListViewItem *item = currentItem(); + + if( item == 0 || item->text( 0 ) == ".." ) + return 0; + + return ((DUListViewItem *)item)->getFile(); +} + +void DUListView::slotChanged( File * item ) +{ + void * itemPtr = diskUsage->getProperty( item, "ListView-Ref" ); + if( itemPtr == 0 ) + return; + + DUListViewItem *duItem = (DUListViewItem *)itemPtr; + duItem->setVisible( !item->isExcluded() ); + duItem->setText( 1, item->percent() ); + duItem->setText( 2, KRpermHandler::parseSize( item->size() ) + " " ); + duItem->setText( 3, KRpermHandler::parseSize( item->ownSize() ) + " " ); +} + +void DUListView::slotDeleted( File * item ) +{ + void * itemPtr = diskUsage->getProperty( item, "ListView-Ref" ); + if( itemPtr == 0 ) + return; + + DUListViewItem *duItem = (DUListViewItem *)itemPtr; + delete duItem; +} + +void DUListView::slotRightClicked( QListViewItem *item ) +{ + File * file = 0; + + if ( item && item->text( 0 ) != ".." ) + file = ((DUListViewItem *)item)->getFile(); + + diskUsage->rightClickMenu( file ); +} + +bool DUListView::doubleClicked( QListViewItem * item ) +{ + if( item ) + { + if( item->text( 0 ) != ".." ) + { + File *fileItem = ((DUListViewItem *)item)->getFile(); + if( fileItem->isDir() ) + diskUsage->changeDirectory( dynamic_cast ( fileItem ) ); + return true; + } + else + { + Directory *upDir = (Directory *)diskUsage->getCurrentDir()->parent(); + + if( upDir ) + diskUsage->changeDirectory( upDir ); + return true; + } + } + return false; +} + +void DUListView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) +{ + if ( e || e->button() == LeftButton ) + { + QPoint vp = contentsToViewport(e->pos()); + QListViewItem * item = itemAt( vp ); + + if( doubleClicked( item ) ) + return; + + } + QListView::contentsMouseDoubleClickEvent( e ); +} + +void DUListView::keyPressEvent( QKeyEvent *e ) +{ + switch ( e->key() ) + { + case Key_Return : + case Key_Enter : + if( doubleClicked( currentItem() ) ) + return; + break; + case Key_Left : + case Key_Right : + case Key_Up : + case Key_Down : + if( e->state() == ShiftButton ) + { + e->ignore(); + return; + } + break; + case Key_Delete : + e->ignore(); + return; + } + QListView::keyPressEvent( e ); +} + +void DUListView::slotExpanded( QListViewItem *item ) +{ + if( item == 0 || item->text( 0 ) == ".." ) + return; + + if( item->childCount() == 0 ) + { + File *fileItem = ((DUListViewItem *)item)->getFile(); + if( fileItem->isDir() ) + addDirectory( dynamic_cast( fileItem ), item ); + } +} + +#include "dulistview.moc" diff --git a/krusader/DiskUsage/dulistview.h b/krusader/DiskUsage/dulistview.h new file mode 100644 index 0000000..01ab59f --- /dev/null +++ b/krusader/DiskUsage/dulistview.h @@ -0,0 +1,144 @@ +/*************************************************************************** + dulistview.h - description + ------------------- + copyright : (C) 2004 by Csaba Karai + e-mail : krusader@users.sourceforge.net + web site : http://krusader.sourceforge.net + --------------------------------------------------------------------------- + Description + *************************************************************************** + + A + + db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. + 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D + 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' + 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b + 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. + YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD + + H e a d e r F i l e + + *************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef __DU_LISTVIEW_H__ +#define __DU_LISTVIEW_H__ + +#include +#include "diskusage.h" + +class DUListViewItem : public QListViewItem +{ +public: + DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListView * parent, QString label1, + QString label2, QString label3, QString label4, QString label5, QString label6, + QString label7, QString label8, QString label9 ) + : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8), + diskUsage( diskUsageIn ), file( fileIn ) + { + setText( 8, label9 ); + diskUsage->addProperty( file, "ListView-Ref", this ); + } + DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListViewItem * parent, QString label1, + QString label2, QString label3, QString label4, QString label5, QString label6, + QString label7, QString label8, QString label9 ) + : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8), + diskUsage( diskUsageIn ), file( fileIn ) + { + setText( 8, label9 ); + diskUsage->addProperty( file, "ListView-Ref", this ); + } + DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListView * parent, QListViewItem * after, + QString label1, QString label2, QString label3, QString label4, QString label5, + QString label6, QString label7, QString label8, QString label9 ) + : QListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7, label8), + diskUsage( diskUsageIn ), file( fileIn ) + { + setText( 8, label9 ); + diskUsage->addProperty( file, "ListView-Ref", this ); + } + DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListViewItem * parent, QListViewItem * after, + QString label1, QString label2, QString label3, QString label4, QString label5, + QString label6, QString label7, QString label8, QString label9 ) + : QListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7, label8), + diskUsage( diskUsageIn ), file( fileIn ) + { + setText( 8, label9 ); + diskUsage->addProperty( file, "ListView-Ref", this ); + } + ~DUListViewItem() + { + diskUsage->removeProperty( file, "ListView-Ref" ); + } + + virtual int compare ( QListViewItem * i, int col, bool ascending ) const + { + if( text(0) == ".." ) return ascending ? -1 : 1; + if( i->text(0) == "..") return ascending ? 1 : -1; + + DUListViewItem *compWith = dynamic_cast< DUListViewItem * >( i ); + + QString buf1,buf2; + + switch( col ) + { + case 1: + case 2: + buf1.sprintf("%025llu",file->size()); + buf2.sprintf("%025llu",compWith->file->size()); + return -QString::compare( buf1, buf2 ); + case 3: + buf1.sprintf("%025llu",file->ownSize()); + buf2.sprintf("%025llu",compWith->file->ownSize()); + return -QString::compare( buf1, buf2 ); + case 5: + return QListViewItem::compare( i, col, !ascending ); + default: + return QListViewItem::compare( i, col, ascending ); + } + } + + inline File * getFile() { return file; } + +private: + DiskUsage *diskUsage; + File *file; +}; + +class DUListView : public QListView +{ + Q_OBJECT + +public: + DUListView( DiskUsage *usage, const char *name ); + ~DUListView(); + + File * getCurrentFile(); + +public slots: + void slotDirChanged( Directory * ); + void slotChanged( File * ); + void slotDeleted( File * ); + void slotRightClicked(QListViewItem *); + void slotExpanded( QListViewItem * ); + +protected: + DiskUsage *diskUsage; + + virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e ); + virtual void keyPressEvent( QKeyEvent *e ); + +private: + void addDirectory( Directory *dirEntry, QListViewItem *parent ); + bool doubleClicked( QListViewItem * item ); +}; + +#endif /* __DU_LISTVIEW_H__ */ + diff --git a/krusader/DiskUsage/filelightParts/Config.cpp b/krusader/DiskUsage/filelightParts/Config.cpp new file mode 100644 index 0000000..777ec68 --- /dev/null +++ b/krusader/DiskUsage/filelightParts/Config.cpp @@ -0,0 +1,50 @@ + +#include "Config.h" +#include +#include + + +bool Config::varyLabelFontSizes = true; +bool Config::showSmallFiles = false; +uint Config::contrast = 50; +uint Config::antiAliasFactor = 2; +uint Config::minFontPitch = 10; +uint Config::defaultRingDepth = 4; +Filelight::MapScheme Config::scheme; + + +inline KConfig& +Filelight::Config::kconfig() +{ + KConfig *config = KGlobal::config(); + config->setGroup( "DiskUsage" ); + return *config; +} + +void +Filelight::Config::read() +{ + const KConfig &config = kconfig(); + + varyLabelFontSizes = config.readBoolEntry( "varyLabelFontSizes", true ); + showSmallFiles = config.readBoolEntry( "showSmallFiles", false ); + contrast = config.readNumEntry( "contrast", 50 ); + antiAliasFactor = config.readNumEntry( "antiAliasFactor", 2 ); + minFontPitch = config.readNumEntry( "minFontPitch", QFont().pointSize() - 3); + scheme = (MapScheme) config.readNumEntry( "scheme", 0 ); + + defaultRingDepth = 4; +} + +void +Filelight::Config::write() +{ + KConfig &config = kconfig(); + + config.writeEntry( "varyLabelFontSizes", varyLabelFontSizes ); + config.writeEntry( "showSmallFiles", showSmallFiles); + config.writeEntry( "contrast", contrast ); + config.writeEntry( "antiAliasFactor", antiAliasFactor ); + config.writeEntry( "minFontPitch", minFontPitch ); + config.writeEntry( "scheme", scheme ); +} diff --git a/krusader/DiskUsage/filelightParts/Config.h b/krusader/DiskUsage/filelightParts/Config.h new file mode 100644 index 0000000..a0491b6 --- /dev/null +++ b/krusader/DiskUsage/filelightParts/Config.h @@ -0,0 +1,37 @@ + +#ifndef Config_H +#define Config_H + +#include + +class KConfig; + + +namespace Filelight +{ + enum MapScheme { Rainbow, HighContrast, KDE, FileDensity, ModTime }; + + class Config + { + static KConfig& kconfig(); + + public: + static void read(); + static void write(); + + //keep everything positive, avoid using DON'T, NOT or NO + + static bool varyLabelFontSizes; + static bool showSmallFiles; + static uint contrast; + static uint antiAliasFactor; + static uint minFontPitch; + static uint defaultRingDepth; + + static MapScheme scheme; + }; +} + +using Filelight::Config; + +#endif diff --git a/krusader/DiskUsage/filelightParts/Makefile.am b/krusader/DiskUsage/filelightParts/Makefile.am new file mode 100644 index 0000000..002f461 --- /dev/null +++ b/krusader/DiskUsage/filelightParts/Makefile.am @@ -0,0 +1,9 @@ +noinst_LIBRARIES = libfilelightparts.a + +INCLUDES = $(all_includes) + +METASOURCES = AUTO + +libfilelightparts_a_SOURCES = \ + Config.cpp \ + fileTree.cpp diff --git a/krusader/DiskUsage/filelightParts/debug.h b/krusader/DiskUsage/filelightParts/debug.h new file mode 100644 index 0000000..252a001 --- /dev/null +++ b/krusader/DiskUsage/filelightParts/debug.h @@ -0,0 +1,14 @@ +//Author: Max Howell , (C) 2003-4 +//Copyright: See COPYING file that comes with this distribution + +#ifndef DEBUG_H +#define DEBUG_H + +#include + +#define debug kdDebug +#define error kdError +#define fatal kdFatal +#define warning kdWarning + +#endif diff --git a/krusader/DiskUsage/filelightParts/fileTree.cpp b/krusader/DiskUsage/filelightParts/fileTree.cpp new file mode 100644 index 0000000..b9409c3 --- /dev/null +++ b/krusader/DiskUsage/filelightParts/fileTree.cpp @@ -0,0 +1,78 @@ +//Author: Max Howell , (C) 2004 +//Copyright: See COPYING file that comes with this distribution + +#include "fileTree.h" +#include +#include +#include + +//static definitions +const FileSize File::DENOMINATOR[4] = { 1ull, 1ull<<10, 1ull<<20, 1ull<<30 }; +const char File::PREFIX[5][2] = { "", "K", "M", "G", "T" }; + +QString +File::fullPath( const Directory *root /*= 0*/ ) const +{ + QString path; + + if( root == this ) root = 0; //prevent returning empty string when there is something we could return + + const File *d; + + for( d = this; d != root && d && d->parent() != 0; d = d->parent() ) + { + if( !path.isEmpty() ) + path = "/" + path; + + path = d->name() + path; + } + + if( d ) + { + while( d->parent() ) + d = d->parent(); + + if( d->directory().endsWith( "/" ) ) + return d->directory() + path; + else + return d->directory() + "/" + path; + } + else + return path; +} + +QString +File::humanReadableSize( UnitPrefix key /*= mega*/ ) const //FIXME inline +{ + return humanReadableSize( m_size, key ); +} + +QString +File::humanReadableSize( FileSize size, UnitPrefix key /*= mega*/ ) //static +{ + QString s; + double prettySize = (double)size / (double)DENOMINATOR[key]; + const KLocale &locale = *KGlobal::locale(); + + if( prettySize >= 0.01 ) + { + if( prettySize < 1 ) s = locale.formatNumber( prettySize, 2 ); + else if( prettySize < 100 ) s = locale.formatNumber( prettySize, 1 ); + else s = locale.formatNumber( prettySize, 0 ); + + s += ' '; + s += PREFIX[key]; + s += 'B'; + } + + if( prettySize < 0.1 ) + { + s += " ("; + s += locale.formatNumber( size / DENOMINATOR[ key ? key - 1 : 0 ], 0 ); + s += ' '; + s += PREFIX[key]; + s += "B)"; + } + + return s; +} diff --git a/krusader/DiskUsage/filelightParts/fileTree.h b/krusader/DiskUsage/filelightParts/fileTree.h new file mode 100644 index 0000000..f4d98b6 --- /dev/null +++ b/krusader/DiskUsage/filelightParts/fileTree.h @@ -0,0 +1,299 @@ +//Author: Max Howell , (C) 2004 +//Copyright: See COPYING file that comes with this distribution + +#ifndef FILETREE_H +#define FILETREE_H + +#include +#include +#include + +//TODO these are pointlessly general purpose now, make them incredibly specific + + + +typedef KIO::filesize_t FileSize; + +template class Iterator; +template class ConstIterator; +template class Chain; + +template +class Link +{ +public: + Link( T* const t ) : prev( this ), next( this ), data( t ) {} + Link() : prev( this ), next( this ), data( 0 ) {} + + //TODO unlinking is slow and you don't use it very much in this context. + // ** Perhaps you can make a faster deletion system that doesn't bother tidying up first + // ** and then you MUST call some kind of detach() function when you remove elements otherwise + ~Link() { delete data; unlink(); } + + friend class Iterator; + friend class ConstIterator; + friend class Chain; + +private: + void unlink() { prev->next = next; next->prev = prev; prev = next = this; } + + Link* prev; + Link* next; + + T* data; //ensure only iterators have access to this +}; + + +template +class Iterator +{ +public: + Iterator() : link( 0 ) { } //**** remove this, remove this REMOVE THIS!!! dangerous as your implementation doesn't test for null links, always assumes they can be derefenced + Iterator( Link *p ) : link( p ) { } + + bool operator==( const Iterator& it ) const { return link == it.link; } + bool operator!=( const Iterator& it ) const { return link != it.link; } + bool operator!=( const Link *p ) const { return p != link; } + + //here we have a choice, really I should make two classes one const the other not + const T* operator*() const { return link->data; } + T* operator*() { return link->data; } + + Iterator& operator++() { link = link->next; return *this; } //**** does it waste time returning in places where we don't use the retval? + + bool isNull() const { return (link == 0); } //REMOVE WITH ABOVE REMOVAL you don't want null iterators to be possible + + void transferTo( Chain &chain ) + { + chain.append( remove() ); + } + + T* const remove() //remove from list, delete Link, data is returned NOT deleted + { + T* const d = link->data; + Link* const p = link->prev; + + link->data = 0; + delete link; + link = p; //make iterator point to previous element, YOU must check this points to an element + + return d; + } + +private: + Link *link; +}; + + +template +class ConstIterator +{ +public: + ConstIterator( Link *p ) : link( p ) { } + + bool operator==( const Iterator& it ) const { return link == it.link; } + bool operator!=( const Iterator& it ) const { return link != it.link; } + bool operator!=( const Link *p ) const { return p != link; } + + const T* operator*() const { return link->data; } + + ConstIterator& operator++() { link = link->next; return *this; } + +private: + const Link *link; +}; + +//**** try to make a generic list class and then a brief full list template that inlines +// thus reducing code bloat +template +class Chain +{ +public: + Chain() { } + virtual ~Chain() { empty(); } + + void append( T* const data ) + { + Link* const link = new Link( data ); + + link->prev = head.prev; + link->next = &head; + + head.prev->next = link; + head.prev = link; + } + + void transferTo( Chain &c ) + { + if( isEmpty() ) return; + + Link* const first = head.next; + Link* const last = head.prev; + + head.unlink(); + + first->prev = c.head.prev; + c.head.prev->next = first; + + last->next = &c.head; + c.head.prev = last; + } + + void empty() { while( head.next != &head ) { delete head.next; } } + + Iterator iterator() const { return Iterator( head.next ); } + ConstIterator constIterator() const { return ConstIterator( head.next ); } + const Link *end() const { return &head; } + bool isEmpty() const { return ( head.next == &head ); } + +private: + Link head; + void operator=( const Chain& ) {} +}; + + +class Directory; +class QString; +class KURL; + +class File +{ +protected: + Directory *m_parent; //0 if this is treeRoot + QString m_name; //< file name + QString m_directory;//< the directory of the file + FileSize m_size; //< size with subdirectories + FileSize m_ownSize; //< size without subdirectories + mode_t m_mode; //< file mode + QString m_owner; //< file owner name + QString m_group; //< file group name + QString m_perm; //< file permissions string + time_t m_time; //< file modification in time_t format + bool m_symLink; //< true if the file is a symlink + QString m_mimeType; //< file mimetype + bool m_excluded; //< flag if the file is excluded from du + int m_percent; //< percent flag + +public: + File( Directory *parentIn, const QString &nameIn, const QString &dir, FileSize sizeIn, mode_t modeIn, + const QString &ownerIn, const QString &groupIn, const QString &permIn, time_t timeIn, bool symLinkIn, + const QString &mimeTypeIn ) + : m_parent( parentIn ), m_name( nameIn ), m_directory( dir ), m_size( sizeIn ), m_ownSize( sizeIn ), m_mode( modeIn ), + m_owner( ownerIn ), m_group( groupIn ), m_perm( permIn ), m_time( timeIn ), m_symLink( symLinkIn ), + m_mimeType( mimeTypeIn ), m_excluded( false ), m_percent( -1 ) {} + + File( const QString &nameIn, FileSize sizeIn ) + : m_parent( 0 ), m_name( nameIn ), m_directory( QString::null ), m_size( sizeIn ), m_ownSize( sizeIn ), m_mode( 0 ), + m_owner( QString::null ), m_group( QString::null ), m_perm( QString::null ), m_time( -1 ), + m_symLink( false ), m_mimeType( QString::null ), m_excluded( false ), m_percent( -1 ) + { + } + + virtual ~File() {} + + inline const QString & name() const {return m_name;} + inline const QString & directory() const {return m_directory;} + inline const FileSize size() const {return m_excluded ? 0 : m_size;} + inline const FileSize ownSize() const {return m_excluded ? 0 : m_ownSize;} + inline const mode_t mode() const {return m_mode;} + inline const QString & owner() const {return m_owner;} + inline const QString & group() const {return m_group;} + inline const QString & perm() const {return m_perm;} + inline const time_t time() const {return m_time;} + inline const QString & mime() const {return m_mimeType;} + inline const bool isSymLink() const {return m_symLink;} + virtual const bool isDir() const {return false;} + inline const bool isExcluded() const {return m_excluded;} + inline void exclude( bool flag ) {m_excluded = flag;} + inline const int intPercent() const {return m_percent;} + inline const QString percent() const {if( m_percent < 0 ) + return "INV"; + QString buf; + buf.sprintf( "%d.%02d%%", m_percent / 100, m_percent % 100 ); + return buf;} + inline void setPercent( int p ) {m_percent = p;} + inline const Directory* parent() const {return m_parent;} + + inline void setSizes( KIO::filesize_t totalSize, KIO::filesize_t ownSize ) + { + m_ownSize = ownSize; + m_size = totalSize; + } + + enum UnitPrefix { kilo, mega, giga, tera }; + + static const FileSize DENOMINATOR[4]; + static const char PREFIX[5][2]; + + QString fullPath( const Directory* = 0 ) const; + QString humanReadableSize( UnitPrefix key = mega ) const; + + static QString humanReadableSize( FileSize size, UnitPrefix Key = mega ); + + friend class Directory; +}; + + +//TODO when you modify this to take into account hardlinks you should make the Chain layered not inherited +class Directory : public Chain, public File +{ +public: + Directory( Directory *parentIn, const QString &nameIn, const QString &dir, FileSize sizeIn, mode_t modeIn, + const QString &ownerIn, const QString &groupIn, const QString &permIn, time_t timeIn, bool symLinkIn, + const QString &mimeTypeIn ) + : File( parentIn, nameIn, dir, sizeIn, modeIn, ownerIn, groupIn, permIn, timeIn, symLinkIn, mimeTypeIn ), + m_fileCount( 0 ) + {} + + Directory( const QString &name, QString url ) : File( name, 0 ), m_fileCount( 0 ) + { + m_directory = url; + } + + virtual ~Directory() {} + virtual const bool isDir() const {return true;} + + void append( File *p ) + { + ++m_fileCount; + + Directory *parent = m_parent; + while( parent ) + { + parent->m_fileCount++; + parent = parent->m_parent; + } + + Chain::append( p ); + p->m_parent = this; + } + + void remove( File *p ) + { + for( Iterator it = Chain::iterator(); it != Chain::end(); ++it ) + if( (*it) == p ) + { + --m_fileCount; + + Directory *parent = m_parent; + while( parent ) + { + parent->m_fileCount--; + parent = parent->m_parent; + } + + it.remove(); + break; + } + } + + uint fileCount() const { return m_fileCount; } + +private: + Directory( const Directory& ); + void operator=( const Directory& ); + + uint m_fileCount; +}; + +#endif diff --git a/krusader/DiskUsage/radialMap/Makefile.am b/krusader/DiskUsage/radialMap/Makefile.am new file mode 100644 index 0000000..a3a3e74 --- /dev/null +++ b/krusader/DiskUsage/radialMap/Makefile.am @@ -0,0 +1,14 @@ +noinst_LIBRARIES = libradialmap.a + +INCLUDES = -I$(top_srcdir)/krusader/DiskUsage/filelightParts \ + $(all_includes) + +METASOURCES = AUTO + +libradialmap_a_SOURCES = \ + widget.cpp \ + builder.cpp \ + map.cpp \ + widgetEvents.cpp \ + labels.cpp \ + segmentTip.cpp diff --git a/krusader/DiskUsage/radialMap/builder.cpp b/krusader/DiskUsage/radialMap/builder.cpp new file mode 100644 index 0000000..5a827af --- /dev/null +++ b/krusader/DiskUsage/radialMap/builder.cpp @@ -0,0 +1,139 @@ +//Author: Max Howell , (C) 2003-4 +//Copyright: See COPYING file that comes with this distribution + +#include "builder.h" +#include "Config.h" +#include "fileTree.h" +#include //locale object +#include +#include "widget.h" + + +//**** REMOVE NEED FOR the +1 with MAX_RING_DEPTH uses +//**** add some angle bounds checking (possibly in Segment ctor? can I delete in a ctor?) +//**** this class is a mess + +RadialMap::Builder::Builder( RadialMap::Map *m, const Directory* const d, bool fast ) + : m_map( m ) + , m_root( d ) + , m_minSize( static_cast((d->size() * 3) / (PI * m->height() - m->MAP_2MARGIN )) ) + , m_depth( &m->m_visibleDepth ) +{ + m_signature = new Chain [*m_depth + 1]; + + if( !fast )//|| *m_depth == 0 ) //depth 0 is special case usability-wise //**** WHY?! + { + //determine depth rather than use old one + findVisibleDepth( d ); //sets m_depth + } + + m_map->setRingBreadth(); + setLimits( m_map->m_ringBreadth ); + build( d ); + + m_map->m_signature = m_signature; + + delete []m_limits; +} + + +void +RadialMap::Builder::findVisibleDepth( const Directory* const dir, const unsigned int depth ) +{ + //**** because I don't use the same minimumSize criteria as in the visual function + // this can lead to incorrect visual representation + //**** BUT, you can't set those limits until you know m_depth! + + //**** also this function doesn't check to see if anything is actually visible + // it just assumes that when it reaches a new level everything in it is visible + // automatically. This isn't right especially as there might be no files in the + // dir provided to this function! + + static uint stopDepth = 0; + + if( dir == m_root ) + { + stopDepth = *m_depth; + *m_depth = 0; + } + + if( *m_depth < depth ) *m_depth = depth; + if( *m_depth >= stopDepth ) return; + + for( ConstIterator it = dir->constIterator(); it != dir->end(); ++it ) + if( (*it)->isDir() && (*it)->size() > m_minSize ) + findVisibleDepth( (Directory *)*it, depth + 1 ); //if no files greater than min size the depth is still recorded +} + +void +RadialMap::Builder::setLimits( const uint &b ) //b = breadth? +{ + double size3 = m_root->size() * 3; + double pi2B = PI * 2 * b; + + m_limits = new FileSize [*m_depth + 1]; //FIXME delete! + + for( unsigned int d = 0; d <= *m_depth; ++d ) + m_limits[d] = (FileSize)(size3 / (double)(pi2B * (d + 1))); //min is angle that gives 3px outer diameter for that depth +} + + +//**** segments currently overlap at edges (i.e. end of first is start of next) +bool +RadialMap::Builder::build( const Directory* const dir, const unsigned int depth, unsigned int a_start, const unsigned int a_end ) +{ + //first iteration: dir == m_root + + if( dir->fileCount() == 0 ) //we do fileCount rather than size to avoid chance of divide by zero later + return false; + + FileSize hiddenSize = 0; + uint hiddenFileCount = 0; + + for( ConstIterator it = dir->constIterator(); it != dir->end(); ++it ) + { + if( (*it)->size() > m_limits[depth] ) + { + unsigned int a_len = (unsigned int)(5760 * ((double)(*it)->size() / (double)m_root->size())); + + Segment *s = new Segment( *it, a_start, a_len ); + + (m_signature + depth)->append( s ); + + if( (*it)->isDir() ) + { + if( depth != *m_depth ) + { + //recurse + s->m_hasHiddenChildren = build( (Directory*)*it, depth + 1, a_start, a_start + a_len ); + } + else s->m_hasHiddenChildren = true; + } + + a_start += a_len; //**** should we add 1? + + } else { + + hiddenSize += (*it)->size(); + + if( (*it)->isDir() ) //**** considered virtual, but dir wouldn't count itself! + hiddenFileCount += static_cast(*it)->fileCount(); //need to add one to count the dir as well + + ++hiddenFileCount; + } + } + + if( hiddenFileCount == dir->fileCount() && !Config::showSmallFiles ) + + return true; + + else if( (Config::showSmallFiles && hiddenSize > m_limits[depth]) || (depth == 0 && (hiddenSize > dir->size()/8)) /*|| > size() * 0.75*/ ) + { + //append a segment for unrepresented space - a "fake" segment + + const QString s = i18n( "%1 files: ~ %2" ).arg( KGlobal::locale()->formatNumber( hiddenFileCount, 0 ) ).arg( File::humanReadableSize( hiddenSize/hiddenFileCount ) ); + (m_signature + depth)->append( new Segment( new File( s, hiddenSize ), a_start, a_end - a_start, true ) ); + } + + return false; +} diff --git a/krusader/DiskUsage/radialMap/builder.h b/krusader/DiskUsage/radialMap/builder.h new file mode 100644 index 0000000..2fddbe0 --- /dev/null +++ b/krusader/DiskUsage/radialMap/builder.h @@ -0,0 +1,37 @@ +//Author: Max Howell , (C) 2003-4 +//Copyright: See COPYING file that comes with this distribution + +#ifndef BUILDER_H +#define BUILDER_H + +#include "radialMap.h" //Segment, defines +#include "fileTree.h" + +template class Chain; + +namespace RadialMap +{ + class Map; + + //temporary class that builds the Map signature + + class Builder + { + public: + Builder( Map*, const Directory* const, bool fast=false ); + + private: + void findVisibleDepth( const Directory* const dir, const uint=0 ); + void setLimits( const uint& ); + bool build( const Directory* const, const uint=0, uint=0, const uint=5760 ); + + Map *m_map; + const Directory* const m_root; + const FileSize m_minSize; + uint *m_depth; + Chain *m_signature; + FileSize *m_limits; + }; +} + +#endif diff --git a/krusader/DiskUsage/radialMap/labels.cpp b/krusader/DiskUsage/radialMap/labels.cpp new file mode 100644 index 0000000..5ba77ac --- /dev/null +++ b/krusader/DiskUsage/radialMap/labels.cpp @@ -0,0 +1,342 @@ +//Author: Max Howell , (C) 2003-4 +//Copyright: See COPYING file that comes with this distribution + +#include +#include +#include +#include +#include + +#include "Config.h" +#include "fileTree.h" +#include "radialMap.h" +#include "sincos.h" +#include "widget.h" + + + +namespace RadialMap +{ + struct Label + { + Label( const RadialMap::Segment *s, int l ) : segment( s ), lvl( l ), a( segment->start() + (segment->length() / 2) ) { } + + bool tooClose( const int &aa ) const { return ( a > aa - LABEL_ANGLE_MARGIN && a < aa + LABEL_ANGLE_MARGIN ); } + + const RadialMap::Segment *segment; + const unsigned int lvl; + const int a; + + int x1, y1, x2, y2, x3; + int tx, ty; + + QString qs; + }; + + class LabelList : public QPtrList