* Extend the Model class with a method bool HasLocalizedName().
* Disallow renaming of entries with localized names for now - this is meant to be temporary - and so far only in Tracker's Info window. Renames do not result in a change, visually, as the localized name hides the real name, and results in a bad user experience. One could possibly allow renames of the localized name, writing it back to the catalog. I've experimented with using BCatalogAddOn::SetString() but haven't been able to make it stick yet. * Disallow renaming Trash in Tracker's Info window via Command-E. * Adjust the argument order of BLocaleRoster::GetLocalizedFileName(). * Add a BLocaleRoster::GetLocalizedFileName() variant to look up another app's name given its signature and unlocalized, canonical name. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41126 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -299,7 +299,9 @@ BInfoWindow::BInfoWindow(Model *model, int32 group_index, LockingList<BWindow> *
|
||||
if (list)
|
||||
list->AddItem(this);
|
||||
|
||||
AddShortcut('E', 0, new BMessage(kEditItem));
|
||||
if (!model->IsTrash() && !model->HasLocalizedName())
|
||||
AddShortcut('E', 0, new BMessage(kEditItem));
|
||||
|
||||
AddShortcut('O', 0, new BMessage(kOpenSelection));
|
||||
AddShortcut('U', 0, new BMessage(kUnmountVolume));
|
||||
AddShortcut('P', 0, new BMessage(kPermissionsSelected));
|
||||
@@ -1222,6 +1224,7 @@ AttributeView::MouseDown(BPoint point)
|
||||
} else if (fTitleRect.Contains(point)) {
|
||||
// You can't change the name of the trash
|
||||
if (!fModel->IsTrash()
|
||||
&& !fModel->HasLocalizedName()
|
||||
&& ConfirmChangeIfWellKnownDirectory(&entry,
|
||||
B_TRANSLATE_COMMENT("rename", "As in 'If you rename ...'"),
|
||||
B_TRANSLATE_COMMENT("rename", "As in 'To rename ...'"), true)
|
||||
@@ -2037,9 +2040,11 @@ AttributeView::BuildContextMenu(BMenu *parent)
|
||||
new BMessage(kOpenSelection), 'O'));
|
||||
|
||||
if (!model.IsTrash()) {
|
||||
parent->AddItem(new BMenuItem(B_TRANSLATE("Edit name"),
|
||||
new BMessage(kEditItem), 'E'));
|
||||
parent->AddSeparatorItem();
|
||||
if (!fModel->HasLocalizedName()) {
|
||||
parent->AddItem(new BMenuItem(B_TRANSLATE("Edit name"),
|
||||
new BMessage(kEditItem), 'E'));
|
||||
parent->AddSeparatorItem();
|
||||
}
|
||||
if (fModel->IsVolume()) {
|
||||
BMenuItem* item = new BMenuItem(B_TRANSLATE("Unmount"),
|
||||
new BMessage(kUnmountVolume), 'U');
|
||||
|
||||
Reference in New Issue
Block a user