Browse Source

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

tags/2021-05-28
jules 17 years ago
parent
commit
89544abbad
6 changed files with 50 additions and 0 deletions
  1. +1
    -0
      extras/juce demo/src/BinaryData.cpp
  2. +1
    -0
      extras/the jucer/src/BinaryData.cpp
  3. +25
    -0
      juce_amalgamated.cpp
  4. +18
    -0
      juce_amalgamated.h
  5. +1
    -0
      src/juce_appframework/gui/components/special/juce_PreferencesPanel.cpp
  6. +4
    -0
      src/juce_core/io/network/juce_Socket.cpp

+ 1
- 0
extras/juce demo/src/BinaryData.cpp 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, 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}; 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; const char* BinaryData::widgetsdemo_cpp = (const char*) temp17;

+ 1
- 0
extras/the jucer/src/BinaryData.cpp 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, 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}; 96,130,0,0};
const char* BinaryData::prefs_misc_png = (const char*) temp4; const char* BinaryData::prefs_misc_png = (const char*) temp4;

+ 25
- 0
juce_amalgamated.cpp View File

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


#include <fcntl.h> #include <fcntl.h>
@@ -70454,6 +70458,7 @@ void PreferencesPanel::showInDialogBox (const String& dialogtitle,
dw.setContentComponent (this, true, true); dw.setContentComponent (this, true, true);
dw.centreAroundComponent (0, dw.getWidth(), dw.getHeight()); dw.centreAroundComponent (0, dw.getWidth(), dw.getHeight());
dw.runModalLoop(); dw.runModalLoop();
dw.setContentComponent (0, false, false);
} }


void PreferencesPanel::resized() 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() bool juce_IsRunningInWine() throw()
{ {
HKEY key; HKEY key;


+ 18
- 0
juce_amalgamated.h View File

@@ -13051,6 +13051,24 @@ public:
/** WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder'). */ /** WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder'). */
static void deleteRegistryKey (const String& regKeyPath); 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. /** WIN32 ONLY - This returns the HINSTANCE of the current module.


In a normal Juce application this will be set to the module handle In a normal Juce application this will be set to the module handle


+ 1
- 0
src/juce_appframework/gui/components/special/juce_PreferencesPanel.cpp View File

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


+ 4
- 0
src/juce_core/io/network/juce_Socket.cpp View File

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


Loading…
Cancel
Save