Skip to content

Commit

Permalink
[gui] Enable default extension filtering for file dialog when adding …
Browse files Browse the repository at this point in the history
…job to queue
  • Loading branch information
eumagga0x2a committed Oct 4, 2019
1 parent db235b6 commit 3ce838e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion avidemux/common/gui_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,17 @@ void HandleAction_Save(Action action)
{
case ACT_SAVE_QUEUE:
{
if(!ADM_mx_getNbMuxers()) break;
if(false==ADMJob::jobInit())
{
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Job"),QT_TRANSLATE_NOOP("adm","Cannot reach database. Do you have Job control running ?"));
}else
{
std::string oFile;
std::string prefilled=std::string("Job ")+ADM_getTimeDateAsString();
const char *defaultExtension=ADM_MuxerGetDefaultExtension(UI_GetCurrentFormat());
char *oText=ADM_strdup(prefilled.c_str());
diaElemFile wFile(1,oFile,QT_TRANSLATE_NOOP("adm","Output file"),"");
diaElemFile wFile(1,oFile,QT_TRANSLATE_NOOP("adm","Output file"),defaultExtension,NULL);
diaElemText wText(&oText,QT_TRANSLATE_NOOP("adm","Job name"));
diaElem *elems[2]={&wText,&wFile};

Expand Down
2 changes: 1 addition & 1 deletion avidemux/qt4/ADM_UIs/src/T_filesel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void ADM_Qfilesel::buttonPressed(QAbstractButton *s)
}
#endif
admCoreUtils::getLastWriteFolder(lastFolder);
r=FileSel_SelectWrite(selectDesc,buffer,MAX_SEL,lastFolder.c_str());
r=FileSel_SelectWrite(selectDesc,buffer,MAX_SEL,lastFolder.c_str(),defaultSuffix);
break;

case ADM_FILEMODE_DIR:
Expand Down

0 comments on commit 3ce838e

Please sign in to comment.