Browse Source

Minor fixes for clang.

tags/2021-05-28
jules 12 years ago
parent
commit
3e628c816e
4 changed files with 58 additions and 59 deletions
  1. +1
    -0
      extras/Introjucer/Source/Application/jucer_CommandIDs.h
  2. +53
    -53
      extras/Introjucer/Source/Application/jucer_JuceUpdater.cpp
  3. +4
    -5
      extras/Introjucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h
  4. +0
    -1
      modules/juce_events/native/juce_osx_MessageQueue.h

+ 1
- 0
extras/Introjucer/Source/Application/jucer_CommandIDs.h View File

@@ -47,6 +47,7 @@ namespace CommandIDs
showAppearanceSettings = 0x200077, showAppearanceSettings = 0x200077,
showConfigPanel = 0x200074, showConfigPanel = 0x200074,
showFilePanel = 0x200078, showFilePanel = 0x200078,
showTranslationTool = 0x200079,
closeWindow = 0x201001, closeWindow = 0x201001,
closeAllDocuments = 0x201000, closeAllDocuments = 0x201000,


+ 53
- 53
extras/Introjucer/Source/Application/jucer_JuceUpdater.cpp View File

@@ -250,75 +250,75 @@ void JuceUpdater::paintListBoxItem (int /*rowNumber*/, Graphics& g, int /*width*
g.fillAll (findColour (TextEditor::highlightColourId)); g.fillAll (findColour (TextEditor::highlightColourId));
} }
Component* JuceUpdater::refreshComponentForRow (int rowNumber, bool /*isRowSelected*/, Component* existingComponentToUpdate)
class UpdateListComponent : public Component
{ {
class UpdateListComponent : public Component
public:
UpdateListComponent()
{ {
public:
UpdateListComponent()
{
addChildComponent (&toggle);
toggle.setWantsKeyboardFocus (false);
setInterceptsMouseClicks (false, true);
}
addChildComponent (&toggle);
toggle.setWantsKeyboardFocus (false);
setInterceptsMouseClicks (false, true);
}
void setModule (const ModuleList::Module* newModule,
const ModuleList::Module* existingModule,
const Value& value)
void setModule (const ModuleList::Module* newModule,
const ModuleList::Module* existingModule,
const Value& value)
{
if (newModule != nullptr)
{ {
if (newModule != nullptr)
toggle.getToggleStateValue().referTo (value);
toggle.setVisible (true);
toggle.setEnabled (true);
name = newModule->uid;
status = String::empty;
if (existingModule == nullptr)
{
status << " (not currently installed)";
}
else if (existingModule->version != newModule->version)
{ {
toggle.getToggleStateValue().referTo (value);
toggle.setVisible (true);
toggle.setEnabled (true);
name = newModule->uid;
status = String::empty;
if (existingModule == nullptr)
{
status << " (not currently installed)";
}
else if (existingModule->version != newModule->version)
{
status << " installed: " << existingModule->version
<< ", available: " << newModule->version;
}
else
{
status << " (latest version already installed: " << existingModule->version << ")";
toggle.setEnabled (false);
}
status << " installed: " << existingModule->version
<< ", available: " << newModule->version;
} }
else else
{ {
name = status = String::empty;
toggle.setVisible (false);
status << " (latest version already installed: " << existingModule->version << ")";
toggle.setEnabled (false);
} }
} }
void paint (Graphics& g)
else
{ {
g.setColour (Colours::black);
g.setFont (getHeight() * 0.7f);
name = status = String::empty;
toggle.setVisible (false);
}
}
g.drawText (name, toggle.getRight() + 4, 0, getWidth() / 2 - toggle.getRight() - 4, getHeight(),
Justification::centredLeft, true);
void paint (Graphics& g)
{
g.setColour (Colours::black);
g.setFont (getHeight() * 0.7f);
g.drawText (status, getWidth() / 2, 0, getWidth() / 2, getHeight(),
Justification::centredLeft, true);
}
g.drawText (name, toggle.getRight() + 4, 0, getWidth() / 2 - toggle.getRight() - 4, getHeight(),
Justification::centredLeft, true);
void resized()
{
toggle.setBounds (2, 2, getHeight() - 4, getHeight() - 4);
}
g.drawText (status, getWidth() / 2, 0, getWidth() / 2, getHeight(),
Justification::centredLeft, true);
}
private:
ToggleButton toggle;
String name, status;
};
void resized()
{
toggle.setBounds (2, 2, getHeight() - 4, getHeight() - 4);
}
private:
ToggleButton toggle;
String name, status;
};
Component* JuceUpdater::refreshComponentForRow (int rowNumber, bool /*isRowSelected*/, Component* existingComponentToUpdate)
{
UpdateListComponent* c = dynamic_cast <UpdateListComponent*> (existingComponentToUpdate); UpdateListComponent* c = dynamic_cast <UpdateListComponent*> (existingComponentToUpdate);
if (c == nullptr) if (c == nullptr)
c = new UpdateListComponent(); c = new UpdateListComponent();


+ 4
- 5
extras/Introjucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h View File

@@ -49,7 +49,6 @@ public:
((ColourPropEditorComponent*) getChildComponent (0))->refresh(); ((ColourPropEditorComponent*) getChildComponent (0))->refresh();
} }
private:
class ColourEditorComponent : public Component, class ColourEditorComponent : public Component,
public ChangeListener public ChangeListener
{ {
@@ -107,10 +106,6 @@ private:
setColour (cs->getCurrentColour()); setColour (cs->getCurrentColour());
} }
private:
Colour colour;
bool canResetToDefault;
class ColourSelectorComp : public Component, class ColourSelectorComp : public Component,
public ButtonListener public ButtonListener
{ {
@@ -181,6 +176,10 @@ private:
ColourSelectorWithSwatches selector; ColourSelectorWithSwatches selector;
TextButton defaultButton; TextButton defaultButton;
}; };
private:
Colour colour;
bool canResetToDefault;
}; };
class ColourPropEditorComponent : public ColourEditorComponent class ColourPropEditorComponent : public ColourEditorComponent


+ 0
- 1
modules/juce_events/native/juce_osx_MessageQueue.h View File

@@ -63,7 +63,6 @@ public:
private: private:
ReferenceCountedArray <MessageManager::MessageBase, CriticalSection> messages; ReferenceCountedArray <MessageManager::MessageBase, CriticalSection> messages;
CriticalSection lock;
CFRunLoopRef runLoop; CFRunLoopRef runLoop;
CFRunLoopSourceRef runLoopSource; CFRunLoopSourceRef runLoopSource;


Loading…
Cancel
Save