Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
b2515db681
2 changed files with 10 additions and 8 deletions
  1. +6
    -4
      src/juce_appframework/gui/components/controls/juce_TextEditor.cpp
  2. +4
    -4
      src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp

+ 6
- 4
src/juce_appframework/gui/components/controls/juce_TextEditor.cpp View File

@@ -746,7 +746,7 @@ public:
const Font& font_, const Font& font_,
const Colour& colour_, const Colour& colour_,
const int oldCaretPos_, const int oldCaretPos_,
const int newCaretPos_)
const int newCaretPos_) throw()
: owner (owner_), : owner (owner_),
text (text_), text (text_),
insertIndex (insertIndex_), insertIndex (insertIndex_),
@@ -795,7 +795,7 @@ public:
const int endIndex_, const int endIndex_,
const int oldCaretPos_, const int oldCaretPos_,
const int newCaretPos_, const int newCaretPos_,
const VoidArray& removedSections_)
const VoidArray& removedSections_) throw()
: owner (owner_), : owner (owner_),
startIndex (startIndex_), startIndex (startIndex_),
endIndex (endIndex_), endIndex (endIndex_),
@@ -1873,7 +1873,8 @@ bool TextEditor::keyPressed (const KeyPress& key)
cut(); cut();
} }
else if (key == KeyPress (T('c'), ModifierKeys::commandModifier, 0))
else if (key == KeyPress (T('c'), ModifierKeys::commandModifier, 0)
|| key == KeyPress (KeyPress::insertKey, ModifierKeys::ctrlModifier, 0))
{ {
newTransaction(); newTransaction();
copy(); copy();
@@ -1884,7 +1885,8 @@ bool TextEditor::keyPressed (const KeyPress& key)
copy(); copy();
cut(); cut();
} }
else if (key == KeyPress (T('v'), ModifierKeys::commandModifier, 0))
else if (key == KeyPress (T('v'), ModifierKeys::commandModifier, 0)
|| key == KeyPress (KeyPress::insertKey, ModifierKeys::shiftModifier, 0))
{ {
newTransaction(); newTransaction();
paste(); paste();


+ 4
- 4
src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp View File

@@ -103,7 +103,7 @@ FileBrowserComponent::FileBrowserComponent (FileChooserMode mode_,
fileListComponent->addListener (this); fileListComponent->addListener (this);
addAndMakeVisible (currentPathBox = new ComboBox (T("path")));
addAndMakeVisible (currentPathBox = new ComboBox ("path"));
currentPathBox->setEditableText (true); currentPathBox->setEditableText (true);
StringArray rootNames, rootPaths; StringArray rootNames, rootPaths;
@@ -127,12 +127,12 @@ FileBrowserComponent::FileBrowserComponent (FileChooserMode mode_,
filenameBox->addListener (this); filenameBox->addListener (this);
filenameBox->setReadOnly (filenameTextBoxIsReadOnly); filenameBox->setReadOnly (filenameTextBoxIsReadOnly);
Label* label = new Label (T("f"), (mode == chooseDirectoryMode) ? TRANS("folder:")
: TRANS("file:"));
Label* label = new Label ("f", (mode == chooseDirectoryMode) ? TRANS("folder:")
: TRANS("file:"));
addAndMakeVisible (label); addAndMakeVisible (label);
label->attachToComponent (filenameBox, true); label->attachToComponent (filenameBox, true);
addAndMakeVisible (goUpButton = new DrawableButton (T("up"), DrawableButton::ImageOnButtonBackground));
addAndMakeVisible (goUpButton = new DrawableButton ("up", DrawableButton::ImageOnButtonBackground));
Path arrowPath; Path arrowPath;
arrowPath.addArrow (50.0f, 100.0f, 50.0f, 0.0, 40.0f, 100.0f, 50.0f); arrowPath.addArrow (50.0f, 100.0f, 50.0f, 0.0, 40.0f, 100.0f, 50.0f);
DrawablePath arrowImage; DrawablePath arrowImage;


Loading…
Cancel
Save