Add destination path preview label to batch queue panel.
Label initially says "Destination path for the first selected image appears here" so the feature is discoverable. Select a file and it shows the destination path that would be used if it is the first file to be processed and the file does not already exist. Label is updated as the template is edited, so you can see the effect of the edits. If "Save to folder" is selected, the previewed path uses that folder.
This commit is contained in:
@@ -108,6 +108,9 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr)
|
||||
#endif
|
||||
|
||||
odvb->pack_start (*hb3, Gtk::PACK_SHRINK, 4);
|
||||
destinationPreviewLabel = Gtk::manage (new Gtk::Label ());
|
||||
destinationPreviewLabel->set_tooltip_markup(M("QUEUE_DESTPREVIEW_TOOLTIP"));
|
||||
odvb->pack_start (*destinationPreviewLabel);
|
||||
Gtk::RadioButton::Group g = useTemplate->get_group();
|
||||
useFolder->set_group (g);
|
||||
fdir->add (*odvb);
|
||||
@@ -122,6 +125,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr)
|
||||
outdirTemplate->set_text (options.savePathTemplate);
|
||||
useTemplate->set_active (options.saveUsePathTemplate);
|
||||
useFolder->set_active (!options.saveUsePathTemplate);
|
||||
destinationPreviewLabel->set_text (M("QUEUE_DESTPREVIEW_TITLE"));
|
||||
|
||||
// setup signal handlers
|
||||
outdirTemplate->signal_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::saveOptions));
|
||||
@@ -329,6 +333,7 @@ void BatchQueuePanel::saveOptions ()
|
||||
options.savePathTemplate = outdirTemplate->get_text();
|
||||
options.saveUsePathTemplate = useTemplate->get_active();
|
||||
options.procQueueEnabled = qAutoStart->get_active();
|
||||
batchQueue->updateDestinationPathPreview();
|
||||
}
|
||||
|
||||
bool BatchQueuePanel::handleShortcutKey (GdkEventKey* event)
|
||||
@@ -358,6 +363,11 @@ bool BatchQueuePanel::canStartNext ()
|
||||
return queueShouldRun;
|
||||
}
|
||||
|
||||
void BatchQueuePanel::setDestinationPreviewText(const Glib::ustring &destinationPath)
|
||||
{
|
||||
destinationPreviewLabel->set_text(destinationPath);
|
||||
}
|
||||
|
||||
void BatchQueuePanel::pathFolderButtonPressed ()
|
||||
{
|
||||
|
||||
@@ -381,6 +391,7 @@ void BatchQueuePanel::pathFolderButtonPressed ()
|
||||
void BatchQueuePanel::pathFolderChanged ()
|
||||
{
|
||||
options.savePathFolder = outdirFolder->get_filename();
|
||||
batchQueue->updateDestinationPathPreview();
|
||||
}
|
||||
|
||||
void BatchQueuePanel::formatChanged(const Glib::ustring& format)
|
||||
|
Reference in New Issue
Block a user