Patch from John [Beta]
Drinkwater
Fix for 3 misbehaviors compared to R5 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12712 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c7694b4ac7
commit
6005071a1c
@ -148,6 +148,7 @@ BGView::BGView(BRect frame, const char *name, int32 resize, int32 flags)
|
|||||||
|
|
||||||
fIconLabelBackground = new BCheckBox(cvrect, "iconLabelBackground",
|
fIconLabelBackground = new BCheckBox(cvrect, "iconLabelBackground",
|
||||||
"Icon label background", new BMessage(ICONLABEL_CHECKBOX));
|
"Icon label background", new BMessage(ICONLABEL_CHECKBOX));
|
||||||
|
fIconLabelBackground->SetValue(B_CONTROL_ON);
|
||||||
rightbox->AddChild(fIconLabelBackground);
|
rightbox->AddChild(fIconLabelBackground);
|
||||||
|
|
||||||
BMenuItem *menuItem;
|
BMenuItem *menuItem;
|
||||||
@ -168,7 +169,6 @@ BGView::BGView(BRect frame, const char *name, int32 resize, int32 flags)
|
|||||||
fImageMenu = new BPopUpMenu("pick one");
|
fImageMenu = new BPopUpMenu("pick one");
|
||||||
fImageMenu->AddItem(new BGImageMenuItem("None", -1, new BMessage(NONE_IMAGE)));
|
fImageMenu->AddItem(new BGImageMenuItem("None", -1, new BMessage(NONE_IMAGE)));
|
||||||
fImageMenu->AddSeparatorItem();
|
fImageMenu->AddSeparatorItem();
|
||||||
fImageMenu->AddSeparatorItem();
|
|
||||||
fImageMenu->AddItem(new BMenuItem("Other" B_UTF8_ELLIPSIS, new BMessage(OTHER_IMAGE)));
|
fImageMenu->AddItem(new BMenuItem("Other" B_UTF8_ELLIPSIS, new BMessage(OTHER_IMAGE)));
|
||||||
|
|
||||||
fPlacementMenu = new BPopUpMenu("pick one");
|
fPlacementMenu = new BPopUpMenu("pick one");
|
||||||
@ -277,8 +277,6 @@ BGView::MessageReceived(BMessage *msg)
|
|||||||
}
|
}
|
||||||
case MANUAL_PLACEMENT:
|
case MANUAL_PLACEMENT:
|
||||||
{
|
{
|
||||||
fXPlacementText->SetText("0");
|
|
||||||
fYPlacementText->SetText("0");
|
|
||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
UpdateButtons();
|
UpdateButtons();
|
||||||
break;
|
break;
|
||||||
@ -287,8 +285,6 @@ BGView::MessageReceived(BMessage *msg)
|
|||||||
case SCALE_PLACEMENT:
|
case SCALE_PLACEMENT:
|
||||||
case CENTER_PLACEMENT:
|
case CENTER_PLACEMENT:
|
||||||
{
|
{
|
||||||
fXPlacementText->SetText("");
|
|
||||||
fYPlacementText->SetText("");
|
|
||||||
UpdatePreview();
|
UpdatePreview();
|
||||||
UpdateButtons();
|
UpdateButtons();
|
||||||
break;
|
break;
|
||||||
@ -823,6 +819,17 @@ BGView::UpdatePreview()
|
|||||||
fXPlacementText->SetEnabled(textEnabled);
|
fXPlacementText->SetEnabled(textEnabled);
|
||||||
if(fYPlacementText->IsEnabled()^textEnabled)
|
if(fYPlacementText->IsEnabled()^textEnabled)
|
||||||
fYPlacementText->SetEnabled(textEnabled);
|
fYPlacementText->SetEnabled(textEnabled);
|
||||||
|
|
||||||
|
if (textEnabled && (fXPlacementText->TextView()->IsSelectable() != textEnabled))
|
||||||
|
{
|
||||||
|
fXPlacementText->SetText("0");
|
||||||
|
fYPlacementText->SetText("0");
|
||||||
|
}
|
||||||
|
if (!textEnabled)
|
||||||
|
{
|
||||||
|
fXPlacementText->SetText(NULL);
|
||||||
|
fYPlacementText->SetText(NULL);
|
||||||
|
}
|
||||||
fXPlacementText->TextView()->MakeSelectable(textEnabled);
|
fXPlacementText->TextView()->MakeSelectable(textEnabled);
|
||||||
fYPlacementText->TextView()->MakeSelectable(textEnabled);
|
fYPlacementText->TextView()->MakeSelectable(textEnabled);
|
||||||
fXPlacementText->TextView()->MakeEditable(textEnabled);
|
fXPlacementText->TextView()->MakeEditable(textEnabled);
|
||||||
@ -1050,6 +1057,10 @@ BGView::AddItem(BGImageMenuItem *item)
|
|||||||
{
|
{
|
||||||
int32 count = fImageMenu->CountItems() - 2;
|
int32 count = fImageMenu->CountItems() - 2;
|
||||||
int32 index=2;
|
int32 index=2;
|
||||||
|
if (count < index) {
|
||||||
|
fImageMenu->AddItem(new BSeparatorItem(), 1);
|
||||||
|
count = fImageMenu->CountItems() - 2;
|
||||||
|
}
|
||||||
for(; index<count ;index++) {
|
for(; index<count ;index++) {
|
||||||
BGImageMenuItem *image = (BGImageMenuItem *)fImageMenu->ItemAt(index);
|
BGImageMenuItem *image = (BGImageMenuItem *)fImageMenu->ItemAt(index);
|
||||||
int c = (BString(image->Label()).ICompare(BString(item->Label())));
|
int c = (BString(image->Label()).ICompare(BString(item->Label())));
|
||||||
|
Loading…
Reference in New Issue
Block a user