* Truncates Installer menu fields volume labels. This fixes bug #2192.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29148 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
59ee5c81c0
commit
90e7d21528
@ -370,28 +370,31 @@ void
|
|||||||
InstallerWindow::AdjustMenus()
|
InstallerWindow::AdjustMenus()
|
||||||
{
|
{
|
||||||
PartitionMenuItem *item1 = (PartitionMenuItem *)fSrcMenu->FindMarked();
|
PartitionMenuItem *item1 = (PartitionMenuItem *)fSrcMenu->FindMarked();
|
||||||
|
BString label;
|
||||||
if (item1) {
|
if (item1) {
|
||||||
fSrcMenuField->MenuItem()->SetLabel(item1->MenuLabel());
|
label = item1->MenuLabel();
|
||||||
} else {
|
} else {
|
||||||
if (fSrcMenu->CountItems() == 0)
|
if (fSrcMenu->CountItems() == 0)
|
||||||
fSrcMenuField->MenuItem()->SetLabel("<none>");
|
label = "<none>";
|
||||||
else {
|
else {
|
||||||
fSrcMenuField->MenuItem()->SetLabel(
|
label = ((PartitionMenuItem *)fSrcMenu->ItemAt(0))->MenuLabel();
|
||||||
((PartitionMenuItem *)fSrcMenu->ItemAt(0))->MenuLabel());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fSrcMenuField->TruncateString(&label, B_TRUNCATE_END, 260);
|
||||||
|
fSrcMenuField->MenuItem()->SetLabel(label.String());
|
||||||
|
|
||||||
PartitionMenuItem *item2 = (PartitionMenuItem *)fDestMenu->FindMarked();
|
PartitionMenuItem *item2 = (PartitionMenuItem *)fDestMenu->FindMarked();
|
||||||
if (item2) {
|
if (item2) {
|
||||||
fDestMenuField->MenuItem()->SetLabel(item2->MenuLabel());
|
label = item2->MenuLabel();
|
||||||
} else {
|
} else {
|
||||||
if (fDestMenu->CountItems() == 0)
|
if (fDestMenu->CountItems() == 0)
|
||||||
fDestMenuField->MenuItem()->SetLabel("<none>");
|
label = "<none>";
|
||||||
else {
|
else {
|
||||||
fDestMenuField->MenuItem()->SetLabel(
|
label = ((PartitionMenuItem *)fDestMenu->ItemAt(0))->MenuLabel();
|
||||||
((PartitionMenuItem *)fDestMenu->ItemAt(0))->MenuLabel());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fDestMenuField->TruncateString(&label, B_TRUNCATE_END, 260);
|
||||||
|
fDestMenuField->MenuItem()->SetLabel(label.String());
|
||||||
char message[255];
|
char message[255];
|
||||||
sprintf(message, "Press the Begin button to install from '%s' onto '%s'",
|
sprintf(message, "Press the Begin button to install from '%s' onto '%s'",
|
||||||
item1 ? item1->Name() : "null", item2 ? item2->Name() : "null");
|
item1 ? item1->Name() : "null", item2 ? item2->Name() : "null");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user