-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from humdingerb/matchonce
New release v1.1.0
- Loading branch information
Showing
23 changed files
with
284 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
ActionView.cpp: View for adjusting settings for an individual Filer action | ||
Written by DarkWyrm <[email protected]>, Copyright 2008 | ||
Released under the MIT license. | ||
Contributed by: Pete Goodeve, 2016 | ||
*/ | ||
|
||
#include <Font.h> | ||
|
@@ -47,7 +48,7 @@ ActionView::ActionView(const BRect& frame, const char* name, BMessage* action, | |
rect.right = rect.left + 10; | ||
|
||
fValueBox = new AutoTextControl(rect, "valuebox", NULL, NULL, | ||
new BMessage(MSG_VALUE_CHANGED), B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); | ||
new BMessage(), B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); | ||
AddChild(fValueBox); | ||
fValueBox->SetDivider(0); | ||
|
||
|
@@ -80,6 +81,19 @@ ActionView::ActionView(const BRect& frame, const char* name, BMessage* action, | |
|
||
fValueBox->SetText(""); | ||
} | ||
|
||
BString toolTip( | ||
"\%FILENAME\%\t\t\tFull file name\n" | ||
"\%EXTENSION\%\t\tJust the extension\n" | ||
"\%BASENAME\%\t\tFile name without extension\n" | ||
"\%FOLDER\%\t\t\tFull location of the folder which contains the file\n" | ||
"\%FULLPATH\%\t\t\tFull location of the file\n" | ||
"\%DATE\%\t\t\t\tCurrent date in the format MM-DD-YYYY\n" | ||
"\%EURODATE\%\t\tCurrent date in the format DD-MM-YYYY\n" | ||
"\%REVERSEDATE\%\t\tCurrent date in the format YYYY-MM-DD\n" | ||
"\%TIME\%\t\t\t\tCurrent time using 24-hour time\n" | ||
"\%ATTR:xxxx\%\t\t\tAn extended attribute of the file"); | ||
fValueBox->SetToolTip(toolTip.String()); | ||
} | ||
|
||
|
||
|
@@ -112,7 +126,7 @@ ActionView::GetPreferredSize() | |
BRect rect(0.0, 0.0, 10.0, 10.0); | ||
|
||
rect.bottom = fActionButton->Frame().Height(); | ||
rect.right = StringWidth("Move it to the Trash") + 5.0 + 100; | ||
rect.right = StringWidth("Shell command…") + 5.0 + 100; | ||
|
||
return rect; | ||
} | ||
|
@@ -143,15 +157,6 @@ ActionView::MessageReceived(BMessage* msg) | |
SetAction(name.String()); | ||
break; | ||
} | ||
case MSG_VALUE_CHANGED: | ||
{ | ||
BString str; | ||
if (fAction->FindString("value", &str) == B_OK) | ||
fAction->ReplaceString("value", fValueBox->Text()); | ||
else | ||
fAction->AddString("value", fValueBox->Text()); | ||
break; | ||
} | ||
default: | ||
{ | ||
BView::MessageReceived(msg); | ||
|
@@ -163,6 +168,12 @@ ActionView::MessageReceived(BMessage* msg) | |
BMessage* | ||
ActionView::GetAction() const | ||
{ | ||
BString str; | ||
if (fAction->FindString("value", &str) == B_OK) | ||
fAction->ReplaceString("value", fValueBox->Text()); | ||
else | ||
fAction->AddString("value", fValueBox->Text()); | ||
|
||
return fAction; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,20 @@ | |
AutoTextControl.cpp: A BTextControl which notifies on each keypress | ||
Written by DarkWyrm <[email protected]>, Copyright 2007 | ||
Released under the MIT license. | ||
Contributed by: | ||
Pete Goodeve | ||
*/ | ||
|
||
#include "AutoTextControl.h" | ||
#include <Window.h> | ||
|
||
#include <Entry.h> | ||
#include <Path.h> | ||
#include <PropertyInfo.h> | ||
#include <String.h> | ||
#include <Window.h> | ||
|
||
#include <stdio.h> | ||
#include <ctype.h> | ||
#include <PropertyInfo.h> | ||
|
||
static property_info sProperties[] = { | ||
{ "CharacterLimit", { B_GET_PROPERTY, 0 }, { B_DIRECT_SPECIFIER, 0 }, | ||
|
@@ -118,6 +124,19 @@ AutoTextControl::DetachedFromWindow() | |
} | ||
|
||
|
||
void | ||
AutoTextControl::MessageReceived(BMessage* msg) | ||
{ | ||
if (msg->WasDropped()) { | ||
entry_ref r; | ||
if (msg->FindRef("refs", &r) == B_OK) | ||
SetText(BPath(&r).Path()); | ||
Invoke(); | ||
} | ||
else BTextControl::MessageReceived(msg); | ||
} | ||
|
||
|
||
void | ||
AutoTextControl::SetCharacterLimit(const uint32& limit) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
AutoTextControl.h: A BTextControl which notifies on each keypress | ||
Written by DarkWyrm <[email protected]>, Copyright 2007 | ||
Released under the MIT license. | ||
Contributed by: | ||
Pete Goodeve | ||
*/ | ||
|
||
#ifndef AUTO_TEXT_CONTROL_H | ||
|
@@ -44,6 +46,7 @@ class AutoTextControl : public BTextControl | |
|
||
virtual void AttachedToWindow(); | ||
virtual void DetachedFromWindow(); | ||
virtual void MessageReceived(BMessage* msg); | ||
|
||
void SetFilter(AutoTextControlFilter* filter); | ||
AutoTextControlFilter* GetFilter() { return fFilter; } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.