1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +00:00

Added selection to treeview persistent state. Minor optimisations to AudioThumbnail. Added FTP password support for win32 networking. Cleaned up some file dependencies and altered some return value types to allow better c++0x forwarding behaviour.

This commit is contained in:
Julian Storer 2011-05-30 21:10:57 +01:00
parent b3634661e6
commit 67e22bbb56
241 changed files with 8010 additions and 7848 deletions

View file

@ -301,7 +301,7 @@ public:
currentState->setFont (newFont);
}
const Font getFont()
Font getFont()
{
return currentState->font;
}

View file

@ -84,7 +84,7 @@ namespace WindowsFileHelpers
return GetDriveType (getDriveFromPath (path).toWideCharPointer());
}
const File getSpecialFolderPath (int type)
File getSpecialFolderPath (int type)
{
WCHAR path [MAX_PATH + 256];
@ -94,7 +94,7 @@ namespace WindowsFileHelpers
return File::nonexistent;
}
const Result getResultForLastError()
Result getResultForLastError()
{
TCHAR messageBuffer [256] = { 0 };
@ -203,7 +203,7 @@ bool File::moveInternal (const File& dest) const
return MoveFile (fullPath.toWideCharPointer(), dest.getFullPathName().toWideCharPointer()) != 0;
}
const Result File::createDirectoryInternal (const String& fileName) const
Result File::createDirectoryInternal (const String& fileName) const
{
return CreateDirectory (fileName.toWideCharPointer(), 0) ? Result::ok()
: WindowsFileHelpers::getResultForLastError();
@ -426,7 +426,7 @@ void File::findFileSystemRoots (Array<File>& destArray)
}
//==============================================================================
const String File::getVolumeLabel() const
String File::getVolumeLabel() const
{
TCHAR dest[64];
if (! GetVolumeInformation (WindowsFileHelpers::getDriveFromPath (getFullPathName()).toWideCharPointer(), dest,
@ -491,7 +491,7 @@ bool File::isOnRemovableDrive() const
}
//==============================================================================
const File JUCE_CALLTYPE File::getSpecialLocation (const SpecialLocationType type)
File JUCE_CALLTYPE File::getSpecialLocation (const SpecialLocationType type)
{
int csidlType = 0;
@ -543,7 +543,7 @@ const File JUCE_CALLTYPE File::getSpecialLocation (const SpecialLocationType typ
}
//==============================================================================
const File File::getCurrentWorkingDirectory()
File File::getCurrentWorkingDirectory()
{
WCHAR dest [MAX_PATH + 256];
dest[0] = 0;
@ -557,7 +557,7 @@ bool File::setAsCurrentWorkingDirectory() const
}
//==============================================================================
const String File::getVersion() const
String File::getVersion() const
{
String result;
@ -584,7 +584,7 @@ const String File::getVersion() const
}
//==============================================================================
const File File::getLinkedTarget() const
File File::getLinkedTarget() const
{
File result (*this);
String p (getFullPathName());

View file

@ -66,7 +66,7 @@ static int CALLBACK wfontEnum1 (ENUMLOGFONTEXW* lpelfe, NEWTEXTMETRICEXW*, int t
return 1;
}
const StringArray Font::findAllTypefaceNames()
StringArray Font::findAllTypefaceNames()
{
StringArray results;
HDC dc = CreateCompatibleDC (0);

View file

@ -56,7 +56,7 @@ void SystemClipboard::copyTextToClipboard (const String& text)
}
}
const String SystemClipboard::getTextFromClipboard()
String SystemClipboard::getTextFromClipboard()
{
String result;

View file

@ -66,6 +66,7 @@ BEGIN_JUCE_NAMESPACE
#include "../../gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h"
#include "../../gui/graphics/imaging/juce_ImageFileFormat.h"
#include "../../gui/graphics/imaging/juce_CameraDevice.h"
#include "../../gui/graphics/fonts/juce_CustomTypeface.h"
#include "../../gui/components/windows/juce_ComponentPeer.h"
#include "../../gui/components/windows/juce_AlertWindow.h"
#include "../../gui/components/windows/juce_NativeMessageBox.h"

View file

@ -225,14 +225,18 @@ private:
if (sessionHandle != 0)
{
// break up the url..
TCHAR file[1024], server[1024];
TCHAR file[1024], server[1024], username[1024], password[1024];
URL_COMPONENTS uc = { 0 };
uc.dwStructSize = sizeof (uc);
uc.dwUrlPathLength = sizeof (file);
uc.dwHostNameLength = sizeof (server);
uc.lpszUrlPath = file;
uc.dwUrlPathLength = numElementsInArray (file);
uc.lpszHostName = server;
uc.dwHostNameLength = numElementsInArray (server);
uc.lpszUserName = username;
uc.dwUserNameLength = numElementsInArray (username);
uc.lpszPassword = password;
uc.dwPasswordLength = numElementsInArray (password);
if (InternetCrackUrl (address.toWideCharPointer(), 0, 0, &uc))
{
@ -263,7 +267,7 @@ private:
}
#else
connection = InternetConnect (sessionHandle, uc.lpszHostName, uc.nPort,
_T(""), _T(""),
uc.lpszUserName, uc.lpszPassword,
isFtp ? INTERNET_SERVICE_FTP
: INTERNET_SERVICE_HTTP,
0, 0);

View file

@ -327,7 +327,7 @@ private:
namespace IconConverters
{
const Image createImageFromHBITMAP (HBITMAP bitmap)
Image createImageFromHBITMAP (HBITMAP bitmap)
{
Image im;
@ -366,7 +366,7 @@ namespace IconConverters
return im;
}
const Image createImageFromHICON (HICON icon)
Image createImageFromHICON (HICON icon)
{
ICONINFO info;
@ -2927,7 +2927,7 @@ void Desktop::getCurrentMonitorPositions (Array <Rectangle<int> >& monitorCoords
}
//==============================================================================
const Image juce_createIconForFile (const File& file)
Image juce_createIconForFile (const File& file)
{
Image image;
WORD iconNum = 0;