qt: Make filename/path display consistent across media menus
- All media history entries now display the full path - All "Eject" menu items now display the file name
This commit is contained in:
@@ -249,7 +249,7 @@ msgstr ""
|
||||
msgid "E&mpty"
|
||||
msgstr ""
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgid "Reload previous image"
|
||||
msgstr ""
|
||||
|
||||
msgid "&Folder..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr ""
|
||||
msgid "Create..."
|
||||
msgstr ""
|
||||
|
||||
msgid "previous image"
|
||||
msgstr ""
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Silenciar"
|
||||
msgid "E&mpty"
|
||||
msgstr "E&xtreure disc"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Recarregar imatge anterior"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Recarregar imatge anterior"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Carpeta ..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Esborrar la història de imatges"
|
||||
msgid "Create..."
|
||||
msgstr "Crear ..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "imatge anterior"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Unitat CD/DVD d'amfitrió (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Ztišit"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Vyjmout"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Načíst znova předchozí obraz"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Načíst znova předchozí obraz"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Složka..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Vymaž historie snímků"
|
||||
msgid "Create..."
|
||||
msgstr "Vytvoř..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "předchozí obraz"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Jednotka CD/DVD hostitele (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Stummschalten"
|
||||
msgid "E&mpty"
|
||||
msgstr "L&eer"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Voriges Abbild neu laden"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Voriges Abbild neu laden"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Verzeichnis..."
|
||||
@@ -1263,9 +1263,6 @@ msgstr "Abbildverlauf löschen"
|
||||
msgid "Create..."
|
||||
msgstr "Erstellen..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "Vorheriges Abbild"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Host-CD/DVD-Laufwerk (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Silenciar"
|
||||
msgid "E&mpty"
|
||||
msgstr "E&xtraer disco"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Recargar imagen previa"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Recargar imagen previa"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Carpeta..."
|
||||
@@ -1259,9 +1259,6 @@ msgstr "Eliminar historia de imágenes"
|
||||
msgid "Create..."
|
||||
msgstr "Crear..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "imagen previa"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Unidad de CD/DVD anfitriona (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Mykistä"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Tyhjä"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Lataa edellinen levykuva uudelleen"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Lataa edellinen levykuva uudelleen"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Kansio..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Tyhjennä kuvahistoria"
|
||||
msgid "Create..."
|
||||
msgstr "Luo..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "edellinen levykuva"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Isäntä CD/DVD-asema (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Couper"
|
||||
msgid "E&mpty"
|
||||
msgstr "E&jecter"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Recharger image précedente"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Recharger image précedente"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Dossier..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Effacer l'historique de l'image"
|
||||
msgid "Create..."
|
||||
msgstr "Créer..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "image précedente"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Lecteur CD/DVD hôte (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Isključi zvuk"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Prazno"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Ponovo učitaj prethodnu sliku"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Ponovo učitaj prethodnu sliku"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Mapa..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Očisti povijest slika"
|
||||
msgid "Create..."
|
||||
msgstr "Stvori..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "prethodna slika"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "CD/DVD pogon nositelja (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Némítás"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Kiadás"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "Előző képfájl &újratöltése"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Előző képfájl újratöltése"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Mappa..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Törölje a kép előzményeit"
|
||||
msgid "Create..."
|
||||
msgstr "Hozzon létre..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "előző képfájl"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Gazdag CD/DVD-meghajtó (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Muto"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Espelli"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Ricarica l'immagine precedente"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Ricarica l'immagine precedente"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Cartella..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Cancella la cronologia delle immagini"
|
||||
msgid "Create..."
|
||||
msgstr "Creare..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "immagine precedente"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Unità CD/DVD host (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "ミュート(&M)"
|
||||
msgid "E&mpty"
|
||||
msgstr "なし(&M)"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "前のイメージを再読み込み(&R)"
|
||||
msgid "Reload previous image"
|
||||
msgstr "前のイメージを再読み込み"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "フォルダ(&F)..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "クリア画像履歴"
|
||||
msgid "Create..."
|
||||
msgstr "作成..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "前の画像"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "ホスト CD/DVD ドライブ (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "음소거(&M)"
|
||||
msgid "E&mpty"
|
||||
msgstr "비었음(&M)"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "이전 이미지 다시 불러오기(&R)"
|
||||
msgid "Reload previous image"
|
||||
msgstr "이전 이미지 다시 불러오기"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "폴더(&F)..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "이미지 기록 지우기"
|
||||
msgid "Create..."
|
||||
msgstr "만들기..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "이전 이미지"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "호스트 CD/DVD 드라이브 (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Mute"
|
||||
msgid "E&mpty"
|
||||
msgstr "E&mpty"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Herlaad vorige image"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Herlaad vorige image"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Map..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Imagegeschiedenis verwijderen"
|
||||
msgid "Create..."
|
||||
msgstr "Creëer..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "vorige image"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Host CD/DVD-station (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Ścisz"
|
||||
msgid "E&mpty"
|
||||
msgstr "P&usty"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Przeładuj poprzedni obraz"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Przeładuj poprzedni obraz"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Teczka..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Wyczyść historię obrazów"
|
||||
msgid "Create..."
|
||||
msgstr "Stwórz..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "poprzedni obraz"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Napęd CD/DVD hosta (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Silenciar"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Vazio"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Recarregar imagem anterior"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Recarregar imagem anterior"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Pasta..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Limpar histórico de imagens"
|
||||
msgid "Create..."
|
||||
msgstr "Criar..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "imagem anterior"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Unidade de CD/DVD do anfitrião (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Desativar som"
|
||||
msgid "E&mpty"
|
||||
msgstr "&CDROM vazio"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Recarregar imagem anterior"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Recarregar imagem anterior"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Pasta..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Limpar o histórico de imagens"
|
||||
msgid "Create..."
|
||||
msgstr "Criar..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "imagem anterior"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Unidade de CD/DVD do anfitrião (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "О&тключить звук"
|
||||
msgid "E&mpty"
|
||||
msgstr "П&устой"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Снова загрузить предыдущий образ"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Загрузить предыдущий образ"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Папка..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Очистить историю образов"
|
||||
msgid "Create..."
|
||||
msgstr "Создайте..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "предыдущее изображение"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Главный CD/DVD-привод (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Stíšiť"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Vystrihnúť"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Načítať znova predchádzajúci obraz"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Načítať znova predchádzajúci obraz"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Zložka..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Vymazanie histórie obrázkov"
|
||||
msgid "Create..."
|
||||
msgstr "Vytvorte..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "predchádzajúca snímka"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Hostiteľská jednotka CD/DVD (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Utišaj"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Prazen"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Naloži zadnjo sliko"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Naloži zadnjo sliko"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Mapa..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Jasna zgodovina slik"
|
||||
msgid "Create..."
|
||||
msgstr "Ustvari..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "zadnja slika"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Pogon CD/DVD gostitelja (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Sesi kapat"
|
||||
msgid "E&mpty"
|
||||
msgstr "İmajı &çıkar"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Önceki imajı yeniden seç"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Önceki imajı yeniden seç"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Klasör..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "İmaj geçmişini temizleyin"
|
||||
msgid "Create..."
|
||||
msgstr "Oluştur..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "önceki imaj"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Ana bilgisayar CD/DVD sürücüsü (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "&Відключити звук"
|
||||
msgid "E&mpty"
|
||||
msgstr "&Пустий"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "&Знову завантажити попередній образ"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Знову завантажити попередній образ"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Тека..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Очистити історію образів"
|
||||
msgid "Create..."
|
||||
msgstr "Створити..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "попередній образ"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "CD/DVD привід хоста (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "Tắt tiến&g"
|
||||
msgid "E&mpty"
|
||||
msgstr "Làm trố&ng đĩa"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "Load đĩ&a trước đó"
|
||||
msgid "Reload previous image"
|
||||
msgstr "Load đĩa trước đó"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "Thư mụ&c"
|
||||
@@ -1260,9 +1260,6 @@ msgstr "Xóa lịch sử ảnh đĩa"
|
||||
msgid "Create..."
|
||||
msgstr "Tạo..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "đĩa trước đó"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "Máy chủ CD/DVD Drive (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "静音(&M)"
|
||||
msgid "E&mpty"
|
||||
msgstr "空置驱动器(&M)"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "载入上一个映像(&R)"
|
||||
msgid "Reload previous image"
|
||||
msgstr "载入上一个映像"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "文件夹(&F)..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "清除映像历史记录"
|
||||
msgid "Create..."
|
||||
msgstr "创建..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "上一张"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "主机 CD/DVD 驱动器 (%1)"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ msgstr "靜音(&M)"
|
||||
msgid "E&mpty"
|
||||
msgstr "空置光碟機(&M)"
|
||||
|
||||
msgid "&Reload previous image"
|
||||
msgstr "載入上一個映像(&R)"
|
||||
msgid "Reload previous image"
|
||||
msgstr "載入上一個映像"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "資料夾(&F)..."
|
||||
@@ -1260,9 +1260,6 @@ msgstr "清除映像歷史記錄"
|
||||
msgid "Create..."
|
||||
msgstr "建立..."
|
||||
|
||||
msgid "previous image"
|
||||
msgstr "上一個映像"
|
||||
|
||||
msgid "Host CD/DVD Drive (%1)"
|
||||
msgstr "主機 CD/DVD 光碟機 (%1)"
|
||||
|
||||
|
||||
@@ -174,8 +174,7 @@ MediaMenu::refresh(QMenu *parentMenu)
|
||||
}
|
||||
menu->addSeparator();
|
||||
#endif // Q_OS_WINDOWS
|
||||
cdromImagePos = menu->children().count();
|
||||
cdromDirPos = menu->children().count();
|
||||
cdromEjectPos = menu->children().count();
|
||||
menu->addAction(tr("E&ject"), [this, i]() { cdromEject(i); })->setCheckable(false);
|
||||
cdromMenus[i] = menu;
|
||||
cdromUpdateMenu(i);
|
||||
@@ -304,7 +303,8 @@ MediaMenu::cassetteEject()
|
||||
void
|
||||
MediaMenu::cassetteUpdateMenu()
|
||||
{
|
||||
QString name = cassette_fname;
|
||||
QString name = cassette_fname;
|
||||
QFileInfo fi(cassette_fname);
|
||||
const QString mode = cassette_mode;
|
||||
auto childs = cassetteMenu->children();
|
||||
auto *recordMenu = dynamic_cast<QAction *>(childs[cassetteRecordPos]);
|
||||
@@ -318,6 +318,7 @@ MediaMenu::cassetteUpdateMenu()
|
||||
rewindMenu->setEnabled(!name.isEmpty());
|
||||
fastFwdMenu->setEnabled(!name.isEmpty());
|
||||
ejectMenu->setEnabled(!name.isEmpty());
|
||||
ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName()));
|
||||
|
||||
const bool isSaving = (mode == QStringLiteral("save"));
|
||||
recordMenu->setChecked(isSaving);
|
||||
@@ -384,10 +385,12 @@ void
|
||||
MediaMenu::cartridgeUpdateMenu(int i)
|
||||
{
|
||||
const QString name = cart_fns[i];
|
||||
auto *menu = cartridgeMenus[i];
|
||||
QFileInfo fi(cart_fns[i]);
|
||||
auto *menu = cartridgeMenus[i];
|
||||
auto childs = menu->children();
|
||||
auto *ejectMenu = dynamic_cast<QAction *>(childs[cartridgeEjectPos]);
|
||||
ejectMenu->setEnabled(!name.isEmpty());
|
||||
ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName()));
|
||||
menu->setTitle(tr("Cartridge %1: %2").arg(QString::number(i + 1), name.isEmpty() ? tr("(empty)") : name));
|
||||
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) {
|
||||
@@ -628,7 +631,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
|
||||
switch (type) {
|
||||
default:
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("previous image") : fi.fileName();
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn;
|
||||
return;
|
||||
case ui::MediaType::Cassette:
|
||||
if (!MachineStatus::hasCassette())
|
||||
@@ -637,7 +640,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
children = menu->children();
|
||||
imageHistoryUpdatePos = dynamic_cast<QAction *>(children[cassetteImageHistoryPos[slot]]);
|
||||
fi.setFile(fn);
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("previous image") : fi.fileName();
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn;
|
||||
break;
|
||||
case ui::MediaType::Cartridge:
|
||||
if (!machine_has_cartridge(machine))
|
||||
@@ -646,7 +649,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
children = menu->children();
|
||||
imageHistoryUpdatePos = dynamic_cast<QAction *>(children[cartridgeImageHistoryPos[slot]]);
|
||||
fi.setFile(fn);
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("previous image") : fi.fileName();
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn;
|
||||
break;
|
||||
case ui::MediaType::Floppy:
|
||||
if (!floppyMenus.contains(index))
|
||||
@@ -655,7 +658,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
children = menu->children();
|
||||
imageHistoryUpdatePos = dynamic_cast<QAction *>(children[floppyImageHistoryPos[slot]]);
|
||||
fi.setFile(fn);
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("previous image") : fi.fileName();
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn;
|
||||
break;
|
||||
case ui::MediaType::Optical:
|
||||
if (!cdromMenus.contains(index))
|
||||
@@ -673,7 +676,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
} else {
|
||||
fi.setFile(fn);
|
||||
menu_icon = fi.isDir() ? QIcon(":/settings/qt/icons/cdrom_folder.ico") : QIcon(":/settings/qt/icons/cdrom_image.ico");
|
||||
menu_item_name = fn.isEmpty() ? tr("previous image") : fn;
|
||||
menu_item_name = fn.isEmpty() ? tr("Reload previous image") : fn;
|
||||
}
|
||||
imageHistoryUpdatePos->setIcon(menu_icon);
|
||||
break;
|
||||
@@ -684,7 +687,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
children = menu->children();
|
||||
imageHistoryUpdatePos = dynamic_cast<QAction *>(children[zipImageHistoryPos[slot]]);
|
||||
fi.setFile(fn);
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("previous image") : fi.fileName();
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn;
|
||||
break;
|
||||
case ui::MediaType::Mo:
|
||||
if (!moMenus.contains(index))
|
||||
@@ -693,7 +696,7 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type)
|
||||
children = menu->children();
|
||||
imageHistoryUpdatePos = dynamic_cast<QAction *>(children[moImageHistoryPos[slot]]);
|
||||
fi.setFile(fn);
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("previous image") : fi.fileName();
|
||||
menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -728,8 +731,8 @@ MediaMenu::cdromUpdateMenu(int i)
|
||||
muteMenu->setIcon(QIcon((cdrom[i].sound_on == 0) ? ":/settings/qt/icons/cdrom_unmute.ico" : ":/settings/qt/icons/cdrom_mute.ico"));
|
||||
muteMenu->setText((cdrom[i].sound_on == 0) ? tr("&Unmute") : tr("&Mute"));
|
||||
|
||||
auto *imageMenu = dynamic_cast<QAction *>(childs[cdromImagePos]);
|
||||
imageMenu->setEnabled(!name.isEmpty());
|
||||
auto *ejectMenu = dynamic_cast<QAction *>(childs[cdromEjectPos]);
|
||||
ejectMenu->setEnabled(!name.isEmpty());
|
||||
QString menu_item_name;
|
||||
if (name.left(8) == "ioctl://") {
|
||||
#ifdef Q_OS_WINDOWS
|
||||
@@ -742,12 +745,12 @@ MediaMenu::cdromUpdateMenu(int i)
|
||||
} else {
|
||||
QFileInfo fi(cdrom[i].image_path);
|
||||
|
||||
menu_item_name = name.isEmpty() ? QString() : name;
|
||||
menu_item_name = name.isEmpty() ? QString() : fi.fileName();
|
||||
name2 = name;
|
||||
menu_icon = fi.isDir() ? QIcon(":/settings/qt/icons/cdrom_folder.ico") : QIcon(":/settings/qt/icons/cdrom_image.ico");
|
||||
}
|
||||
imageMenu->setIcon(menu_icon);
|
||||
imageMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(menu_item_name));
|
||||
ejectMenu->setIcon(menu_icon);
|
||||
ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(menu_item_name));
|
||||
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++)
|
||||
updateImageHistory(i, slot, ui::MediaType::Optical);
|
||||
@@ -876,6 +879,7 @@ MediaMenu::zipUpdateMenu(int i)
|
||||
{
|
||||
const QString name = zip_drives[i].image_path;
|
||||
const QString prev_name = zip_drives[i].prev_image_path;
|
||||
QFileInfo fi(zip_drives[i].image_path);
|
||||
if (!zipMenus.contains(i))
|
||||
return;
|
||||
auto *menu = zipMenus[i];
|
||||
@@ -883,6 +887,7 @@ MediaMenu::zipUpdateMenu(int i)
|
||||
|
||||
auto *ejectMenu = dynamic_cast<QAction *>(childs[zipEjectPos]);
|
||||
ejectMenu->setEnabled(!name.isEmpty());
|
||||
ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName()));
|
||||
|
||||
QString busName = tr("Unknown Bus");
|
||||
switch (zip_drives[i].bus_type) {
|
||||
@@ -1009,8 +1014,9 @@ MediaMenu::moReload(int index, int slot)
|
||||
void
|
||||
MediaMenu::moUpdateMenu(int i)
|
||||
{
|
||||
QString name = mo_drives[i].image_path;
|
||||
QString prev_name = mo_drives[i].prev_image_path;
|
||||
QString name = mo_drives[i].image_path;
|
||||
QString prev_name = mo_drives[i].prev_image_path;
|
||||
QFileInfo fi(mo_drives[i].image_path);
|
||||
if (!moMenus.contains(i))
|
||||
return;
|
||||
auto *menu = moMenus[i];
|
||||
@@ -1018,6 +1024,7 @@ MediaMenu::moUpdateMenu(int i)
|
||||
|
||||
auto *ejectMenu = dynamic_cast<QAction *>(childs[moEjectPos]);
|
||||
ejectMenu->setEnabled(!name.isEmpty());
|
||||
ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName()));
|
||||
|
||||
QString busName = tr("Unknown Bus");
|
||||
switch (mo_drives[i].bus_type) {
|
||||
|
||||
@@ -108,8 +108,7 @@ private:
|
||||
int floppyImageHistoryPos[MAX_PREV_IMAGES];
|
||||
|
||||
int cdromMutePos;
|
||||
int cdromImagePos;
|
||||
int cdromDirPos;
|
||||
int cdromEjectPos;
|
||||
int cdromImageHistoryPos[MAX_PREV_IMAGES];
|
||||
|
||||
int zipEjectPos;
|
||||
|
||||
Reference in New Issue
Block a user