Commit d1229ab7 authored by Max Howell's avatar Max Howell

Made all the fixes suggested at www.englishbreakfastnetwork.org, a

fantastic resource that I only discovered thanks to Google. Whoever it
is who runs this place, I thank you! And you should market the service
some more..

svn path=/trunk/extragear/utils/filelight/; revision=581609
parent bcfc8f39
1.0.1
Added the Amarok crash-handler, which I wrote, in case you were wondering
Made the fixes suggested at http://www.englishbreakfastnetwork.org/
1.0
Added copy to clipboard function to segment context menus
Accepts URLs from drag and drop
......
......@@ -3,7 +3,7 @@
Encoding=UTF-8
Name=Filelight
Name[xx]=xxFilelightxx
Generic Name=Disk Usage Statistics
GenericName=Disk Usage Information
Type=Application
Exec=filelight %f
Icon=filelight.png
......
/***************************************************************************
* Copyright (C) 2005 Max Howell <max.howell@methylblue.com> *
* *
* 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. *
* *
***************************************************************************/
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <cstdio> //popen, fread
#include "crashHandler.h"
......
/***************************************************************************
* Copyright (C) 2005 Max Howell <max.howell@methylblue.com> *
* Copyright 2003-6 Max Howell <max.howell@methylblue.com> *
* *
* 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 *
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "historyAction.h"
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef HISTORYACTION_H
#define HISTORYACTION_H
#ifndef HISTORY_ACTION_H
#define HISTORY_ACTION_H
#include <kaction.h>
#include <kurl.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "crashHandler.h"
#include "define.h"
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "mainWindow.h"
#include "part/part.h"
......
/***************************************************************************
filelight.h - description
-------------------
begin : Mon May 12 22:38:30 BST 2003
copyright : (C) 2003 by Max Howell
email : mh9193@bris.ac.uk
***************************************************************************/
/***************************************************************************
* *
* 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 FILELIGHT_H
#define FILELIGHT_H
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <kparts/mainwindow.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef DEFINE_H
#define DEFINE_H
......
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "Config.h"
#include <kconfig.h>
......
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef Config_H
#define Config_H
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef DEBUG_H
#define DEBUG_H
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2004
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "fileTree.h"
#include <kglobal.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2004
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef FILETREE_H
#define FILETREE_H
#ifndef FILE_TREE_H
#define FILE_TREE_H
#include <qcstring.h> //qstrdup
#include <qfile.h> //decodeName()
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "Config.h"
#include "debug.h"
......@@ -56,7 +56,7 @@ namespace Filelight
if( ScanManager::s_abort ) //scan was cancelled
{
debug() << "Scan succesfully aborted\n";
debug() << "Scan successfully aborted\n";
delete tree;
tree = 0;
}
......@@ -135,7 +135,7 @@ namespace Filelight
switch( errno ) {
case EACCES:
out( "Inadequate access permisions" );
out( "Inadequate access permissions" );
case EMFILE:
out( "Too many file descriptors in use by Filelight" );
case ENFILE:
......@@ -312,7 +312,7 @@ namespace Filelight
str = QString( FS_FILE );
if( str == "/" ) continue;
str += "/";
str += '/';
if( remoteFsTypes.contains( FS_TYPE ) )
if( b = !s_remoteMounts.contains( str ) )
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef LOCALLISTER_H
#define LOCALLISTER_H
#ifndef LOCAL_LISTER_H
#define LOCAL_LISTER_H
#include <qthread.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "Config.h"
#include "debug.h"
......
// Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
// Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef FILELIGHTPART_H
#define FILELIGHTPART_H
#ifndef FILELIGHT_PART_H
#define FILELIGHT_PART_H
#include <kparts/browserextension.h>
#include <kparts/statusbarextension.h>
......@@ -22,7 +22,7 @@ namespace Filelight
class BrowserExtension : public KParts::BrowserExtension
{
public:
BrowserExtension( Part*, const char * = 0 );
explicit BrowserExtension( Part*, const char * = 0 );
};
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <kglobal.h>
#include <kglobalsettings.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef PROGRESSBOX_H
#define PROGRESSBOX_H
#ifndef PROGRESS_BOX_H
#define PROGRESS_BOX_H
#include <qlabel.h>
#include <qtimer.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "builder.h"
#include "Config.h"
......@@ -130,7 +130,7 @@ RadialMap::Builder::build( const Directory* const dir, const unsigned int depth,
//append a segment for unrepresented space - a "fake" segment
// I dunno how to i18n this
const QString s = i18n( "There can't ever be only 1 file", "%1 files, each about %2" )
const QString s = i18n( "There cannot ever be only 1 file", "%1 files, each about %2" )
.arg( hiddenFileCount )
.arg( File::humanReadableSize( hiddenSize/hiddenFileCount ) );
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef BUILDER_H
#define BUILDER_H
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <kstringhandler.h>
#include <qfont.h>
......@@ -87,7 +87,7 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
unsigned int a1, a2, minAngle;
a1 = m_focus->start();
a2 = m_focus->end(); //boundry angles
a2 = m_focus->end(); //boundary angles
minAngle = int(m_focus->length() * LABEL_MIN_ANGLE_FACTOR);
......@@ -191,7 +191,7 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
int x1, y1, x2, y2, x3, tx, ty; //coords
double sinra, cosra, ra; //angles
int cx = m_map.width() / 2 + m_offset.x(); //centre relative to canvas
int cx = m_map.width() / 2 + m_offset.x(); //center relative to canvas
int cy = m_map.height() / 2 + m_offset.y();
int spacer, preSpacer = int(m_map.m_ringBreadth * 0.5) + m_map.m_innerRadius;
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <kcursor.h> //make()
#include <kglobalsettings.h> //kdeColours
......@@ -64,7 +64,7 @@ RadialMap::Map::make( const Directory *tree, bool refresh )
{
DEBUG_ANNOUNCE
//**** determineText seems pointless optimisation
//**** determineText seems pointless optimization
// but is it good to keep the text consistent?
// even if it makes it a lie?
......@@ -146,7 +146,7 @@ RadialMap::Map::resize( const QRect &rect )
size += MAP_2MARGIN;
KPixmap::resize( size, size );
// for summary widget this is a good optimisation as it happens
// for summary widget this is a good optimization as it happens
if (KPixmap::isNull())
return false;
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef RADIALMAP_H
#define RADIALMAP_H
#ifndef RADIAL_MAP_H
#define RADIAL_MAP_H
#include <qcolor.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "fileTree.h"
#include "segmentTip.h"
......
// Author: Max Howell <max.howell@methylblue.com>, (C) 2004
// Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef SEGMENTTIP_H
#define SEGMENTTIP_H
#ifndef SEGMENT_TIP_H
#define SEGMENT_TIP_H
#include <kpixmap.h>
#include <qwidget.h>
......@@ -15,7 +15,7 @@ namespace RadialMap
class SegmentTip : public QWidget
{
public:
SegmentTip( uint );
explicit SegmentTip( uint );
void updateTip( const File*, const Directory* );
void moveTo( QPoint, const QWidget&, bool );
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef SINCOS_H
#define SINCOS_H
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <kcursor.h> //ctor
#include <klocale.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2004
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef WIDGET_H
#define WIDGET_H
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "fileTree.h"
#include "radialMap.h" //class Segment
......@@ -131,7 +131,7 @@ RadialMap::Widget::mouseMoveEvent( QMouseEvent *e )
repaint( false );
}
m_tip->moveTo( e->globalPos(), *this, ( p.y() < 0 ) ); //updates tooltip psuedo-tranparent background
m_tip->moveTo( e->globalPos(), *this, ( p.y() < 0 ) ); //updates tooltip pseudo-tranparent background
}
else if( oldFocus && oldFocus->file() != m_tree )
{
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <debug.h>
#include "debug.h"
#include "fileTree.h"
#include <qapplication.h>
#include <qtimer.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef REMOTELISTER_H
#define REMOTELISTER_H
#ifndef REMOTE_LISTER_H
#define REMOTE_LISTER_H
#include <kdirlister.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "debug.h"
#include "fileTree.h"
......@@ -46,7 +46,7 @@ namespace Filelight
bool
ScanManager::start( const KURL &url )
{
//url is guarenteed clean and safe
//url is guaranteed clean and safe
debug() << "Scan requested for: " << url.prettyURL() << endl;
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef SCAN_H
#define SCAN_H
......@@ -21,8 +21,8 @@ namespace Filelight
friend class RemoteLister;
public:
ScanManager( QObject *parent );
virtual ~ScanManager();
explicit ScanManager( QObject *parent );
~ScanManager();
bool start( const KURL& );
bool running() const;
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include <qapplication.h> //Getting desktop width
#include <qcheckbox.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef SETTINGSDLG_H
#define SETTINGSDLG_H
#ifndef SETTINGS_DIALOG_H
#define SETTINGS_DIALOG_H
#include "dialog.h" //generated by uic
#include <qtimer.h>
......
//Author: Max Howell <max.howell@methylblue.com>, (C) 2004
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#include "Config.h"
#include "debug.h"
......@@ -214,23 +214,21 @@ DiskList::DiskList()
void
Disk::guessIconName()
{
if( mount.contains( "cdrom", false ) ) icon = "cdrom";
else if( device.contains( "cdrom", false ) ) icon = "cdrom";
else if( mount.contains( "writer", false ) ) icon = "cdwriter";
else if( device.contains( "writer", false ) ) icon = "cdwriter";
else if( mount.contains( "mo", false ) ) icon = "mo";
else if( device.contains( "mo", false ) ) icon = "mo";
else if( device.contains( "fd", false ) ) {
if( device.contains( "360", false ) ) icon = "5floppy";
if( device.contains( "1200", false ) ) icon = "5floppy";
else
icon = "3floppy";
if (mount.contains( "cdrom", false )) icon = "cdrom";
else if (device.contains( "cdrom", false )) icon = "cdrom";
else if (mount.contains( "writer", false )) icon = "cdwriter";
else if (device.contains( "writer", false )) icon = "cdwriter";
else if (mount.contains( "mo", false )) icon = "mo";
else if (device.contains( "mo", false )) icon = "mo";
else if (device.contains( "fd", false )) {
if (device.contains( "360", false )) icon = "5floppy";
else if (device.contains( "1200", false )) icon = "5floppy";
else icon = "3floppy";
}
else if( mount.contains( "floppy", false ) ) icon = "3floppy";
else if( mount.contains( "zip", false ) ) icon = "zip";
else if( type.contains( "nfs", false ) ) icon = "nfs";
else
icon = "hdd";
else if (mount.contains( "floppy", false )) icon = "3floppy";
else if (mount.contains( "zip", false )) icon = "zip";
else if (type.contains( "nfs", false )) icon = "nfs";
else icon = "hdd";
icon += /*mounted() ? */"_mount"/* : "_unmount"*/;
}
//Author: Max Howell <max.howell@methylblue.com>, (C) 2004
//Copyright: See COPYING file that comes with this distribution
// Copyright 2003-6 Max Howell <max.howell@methylblue.com>
// Redistributable under the terms of the GNU General Public License
#ifndef FILELIGHTSUMMARY_H
#define FILELIGHTSUMMARY_H
#ifndef SUMMARY_WIDGET_H
#define SUMMARY_WIDGET_H
#include <qwidget.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment