Skip to content

Commit

Permalink
Added Image/Go to/<Clip>.
Browse files Browse the repository at this point in the history
New translations.
  • Loading branch information
ggarra13 committed Sep 17, 2024
1 parent 4d1ae0b commit 3ee2e91
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/docs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ v1.2.8
was on.
- Made Status Bar error/warnings remain longer (8 seconds instead of 5).
- Fixed a precision issue on Windows with arbitrary scalings like 115%.
- Added Image/Previous Limited and Image/Next Limited to go from previous to
next images, without looping.
- Added Image/Go to/<Clip> to switch from one clip to the next without having
to bring up the Files Panel.
- Made UI at start up wider to account for new menus and new language
translations.

Expand Down
10 changes: 10 additions & 0 deletions src/lib/mrvFl/mrvCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,16 @@ namespace mrv
model->next();
}

void goto_file_cb(Fl_Widget* w, void* data)
{
size_t Aindex = (size_t) data;
auto model = App::app->filesModel();
auto numFiles = model->observeFiles()->getSize();
if (Aindex < 0 || Aindex >= numFiles)
return;
model->setA(Aindex);
}

static std::string lastSavedFile;
static mrv::SaveOptions lastSavedOptions;

Expand Down
1 change: 1 addition & 0 deletions src/lib/mrvFl/mrvCallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace mrv
void next_file_cb(Fl_Widget* w, ViewerUI* ui);
void previous_file_limited_cb(Fl_Widget* w, ViewerUI* ui);
void next_file_limited_cb(Fl_Widget* w, ViewerUI* ui);
void goto_file_cb(Fl_Widget* w, void* idx);

void exit_cb(Fl_Widget* w, ViewerUI* ui);

Expand Down
11 changes: 11 additions & 0 deletions src/lib/mrvUI/mrvMenus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,17 @@ namespace mrv
menu->add(
_("Image/Previous Limited"), kPreviousImageLimited.hotkey(),
(Fl_Callback*)previous_file_limited_cb, ui);

for (size_t i = 0; i < numFiles; ++i)
{
const auto& path = files[i]->path;
fileName = path.getBaseName() + path.getNumber() +
path.getExtension();
snprintf(buf, 256, _("Image/Go to/%s"), fileName.c_str());
void* ptr = nullptr;
ptr = (void*)i;
menu->add(buf, 0, (Fl_Callback*)goto_file_cb, ptr);
}
}

if (has_version)
Expand Down
3 changes: 3 additions & 0 deletions src/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -3909,6 +3909,9 @@ msgstr "Bild/Zurck"
msgid "Image/Previous Limited"
msgstr "Bild/Früher Begrenzt"

msgid "Image/Go to/%s"
msgstr "Bild/Gehen Sie zu/%s"

msgid "Image/Version/First"
msgstr "Bild/Fassung/Zuerst"

Expand Down
3 changes: 3 additions & 0 deletions src/po/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -3929,6 +3929,9 @@ msgstr "Image/Previous"
msgid "Image/Previous Limited"
msgstr "Image/Previous Limited"

msgid "Image/Go to/%s"
msgstr "Image/Go to/%s"

msgid "Image/Version/First"
msgstr "Image/Version/First"

Expand Down
3 changes: 3 additions & 0 deletions src/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,9 @@ msgstr "Imagen/Previa"
msgid "Image/Previous Limited"
msgstr "Imagen/Anterior Limitado"

msgid "Image/Go to/%s"
msgstr "Imagen/Ve a/%s"

msgid "Image/Version/First"
msgstr "Imagen/Versión/Primera"

Expand Down
3 changes: 3 additions & 0 deletions src/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -3911,6 +3911,9 @@ msgstr "Image/Précédent"
msgid "Image/Previous Limited"
msgstr "Image/Précédent Limité"

msgid "Image/Go to/%s"
msgstr "Image/Allez-y./%s"

msgid "Image/Version/First"
msgstr "Image/Version/Première"

Expand Down
3 changes: 3 additions & 0 deletions src/po/hi_IN.po
Original file line number Diff line number Diff line change
Expand Up @@ -3910,6 +3910,9 @@ msgstr "छवि/पिछला"
msgid "Image/Previous Limited"
msgstr "छवि/पिछला सीमा"

msgid "Image/Go to/%s"
msgstr "छवि/यहाँ जाएँ/%s"

msgid "Image/Version/First"
msgstr "छवि/संस्करण/प्रथम"

Expand Down
3 changes: 3 additions & 0 deletions src/po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -3938,6 +3938,9 @@ msgstr "Immagine/Precedente"
msgid "Image/Previous Limited"
msgstr "Immagine/Precedente limitato"

msgid "Image/Go to/%s"
msgstr "Immagine/Vai a/%s"

msgid "Image/Version/First"
msgstr "Immagine/Versione/Prima"

Expand Down
3 changes: 3 additions & 0 deletions src/po/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3618,6 +3618,9 @@ msgstr ""
msgid "Image/Previous Limited"
msgstr ""

msgid "Image/Go to/%s"
msgstr ""

msgid "Image/Version/First"
msgstr ""

Expand Down
3 changes: 3 additions & 0 deletions src/po/pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -3904,6 +3904,9 @@ msgstr "Imagem/Anterior"
msgid "Image/Previous Limited"
msgstr "Imagem/Anterior Limitado"

msgid "Image/Go to/%s"
msgstr "Imagem/Vá para/%s"

msgid "Image/Version/First"
msgstr "Imagem/Verso/Primeiro"

Expand Down
3 changes: 3 additions & 0 deletions src/po/zh-CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -3862,6 +3862,9 @@ msgstr "图像/上一个"
msgid "Image/Previous Limited"
msgstr "图像/原有限公司"

msgid "Image/Go to/%s"
msgstr "图像/转到/%s"

msgid "Image/Version/First"
msgstr "图像/版本/第一个"

Expand Down

0 comments on commit 3ee2e91

Please sign in to comment.