1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

fix for building juce_Socket.cpp on the OSX10.4 SDK, and a small PreferencesPanel fix

This commit is contained in:
jules 2008-12-18 19:32:39 +00:00
parent 248d26a2a8
commit 89544abbad
6 changed files with 50 additions and 0 deletions

View file

@ -7974,3 +7974,4 @@ static const unsigned char temp17[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61
111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,87,105,100,103,101,116,
115,68,101,109,111,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,59,13,10,125,13,10,0,0};
const char* BinaryData::widgetsdemo_cpp = (const char*) temp17;

View file

@ -911,3 +911,4 @@ static const unsigned char temp4[] = {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68
0,98,28,9,155,95,0,2,104,68,236,11,1,8,160,17,225,73,128,0,3,0,120,52,172,151,198,78,252,63,0,0,0,0,73,69,78,68,174,66,
96,130,0,0};
const char* BinaryData::prefs_misc_png = (const char*) temp4;

View file

@ -6516,6 +6516,10 @@ END_JUCE_NAMESPACE
#include <sys/errno.h>
#include <unistd.h>
#include <netinet/in.h>
#else
#if MACOSX_DEPLOYMENT_TARGET <= MAC_OS_X_VERSION_10_4
#include <CoreServices/CoreServices.h>
#endif
#endif
#include <fcntl.h>
@ -70454,6 +70458,7 @@ void PreferencesPanel::showInDialogBox (const String& dialogtitle,
dw.setContentComponent (this, true, true);
dw.centreAroundComponent (0, dw.getWidth(), dw.getHeight());
dw.runModalLoop();
dw.setContentComponent (0, false, false);
}
void PreferencesPanel::resized()
@ -240904,6 +240909,26 @@ void PlatformUtilities::deleteRegistryKey (const String& regKeyPath)
}
}
void PlatformUtilities::registerFileAssociation (const String& fileExtension,
const String& symbolicDescription,
const String& fullDescription,
const File& targetExecutable,
int iconResourceNumber)
{
setRegistryValue ("HKEY_CLASSES_ROOT\\" + fileExtension + "\\", symbolicDescription);
const String key ("HKEY_CLASSES_ROOT\\" + symbolicDescription);
if (iconResourceNumber != 0)
setRegistryValue (key + "\\DefaultIcon\\",
targetExecutable.getFullPathName() + "," + String (-iconResourceNumber));
setRegistryValue (key + "\\", fullDescription);
setRegistryValue (key + "\\shell\\open\\command\\",
targetExecutable.getFullPathName() + " %1");
}
bool juce_IsRunningInWine() throw()
{
HKEY key;

View file

@ -13051,6 +13051,24 @@ public:
/** WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder'). */
static void deleteRegistryKey (const String& regKeyPath);
/** WIN32 ONLY - Creates a file association in the registry.
This lets you set the exe that should be launched by a given file extension.
@param fileExtension the file extension to associate, including the
initial dot, e.g. ".txt"
@param symbolicDescription a space-free short token to identify the file type
@param fullDescription a human-readable description of the file type
@param targetExecutable the executable that should be launched
@param iconResourceNumber the icon that gets displayed for the file type will be
found by looking up this resource number in the
executable. Pass 0 here to not use an icon
*/
static void registerFileAssociation (const String& fileExtension,
const String& symbolicDescription,
const String& fullDescription,
const File& targetExecutable,
int iconResourceNumber);
/** WIN32 ONLY - This returns the HINSTANCE of the current module.
In a normal Juce application this will be set to the module handle

View file

@ -125,6 +125,7 @@ void PreferencesPanel::showInDialogBox (const String& dialogtitle,
dw.setContentComponent (this, true, true);
dw.centreAroundComponent (0, dw.getWidth(), dw.getHeight());
dw.runModalLoop();
dw.setContentComponent (0, false, false);
}
//==============================================================================

View file

@ -43,6 +43,10 @@
#include <sys/errno.h>
#include <unistd.h>
#include <netinet/in.h>
#else
#if MACOSX_DEPLOYMENT_TARGET <= MAC_OS_X_VERSION_10_4
#include <CoreServices/CoreServices.h>
#endif
#endif
#include <fcntl.h>