Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] alert user if loading/save is done #488

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions avidemux/cli/ADM_userInterfaces/ADM_gui2/gui_none.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,7 @@ void UI_notifyWarning(const char *message, int timeoutMs)
{}
void UI_notifyError(const char *message, int timeoutMs)
{}

void UI_needsAttention(void)
{}
// EOF
2 changes: 2 additions & 0 deletions avidemux/common/ADM_commonUI/GUI_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ void UI_notifyInfo(const char *message, int timeoutMs);
void UI_notifyWarning(const char *message, int timeoutMs);
void UI_notifyError(const char *message, int timeoutMs);

void UI_needsAttention(void);

/* We need to know whether auto-repeat is firing */
bool UI_navigationButtonsPressed(void);

Expand Down
2 changes: 2 additions & 0 deletions avidemux/common/gui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,7 @@ int A_openVideo (const char *name)
}

delete[] longname;
UI_needsAttention(); // loading done, alert the user
return 1;
}
/**
Expand Down Expand Up @@ -1169,6 +1170,7 @@ int A_appendVideo (const char *name)
ReSync();
GUI_setCurrentFrameAndTime();
UI_setMarkers (video_body->getMarkerAPts(),video_body->getMarkerBPts());
UI_needsAttention(); // loading done, alert the user
return 1;
}

Expand Down
1 change: 1 addition & 0 deletions avidemux/common/gui_savenew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ int A_Save(const char *name)
ADM_slaveSendResult(r);
A_Rewind();
GUI_GoToTime(current);
UI_needsAttention(); // saving done, alert the user
return (int)r;
}

Expand Down
8 changes: 8 additions & 0 deletions avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3628,6 +3628,14 @@ void UI_notifyError(const char *message, int timeoutMs)
{
((MainWindow *)QuiMainWindows)->notifyStatusBar(QT_TRANSLATE_NOOP("qgui2","ERROR: %1"), message, timeoutMs);
}

/**
\fn UI_needsAttention
*/
void UI_needsAttention(void)
{
QApplication::alert(NULL);
}
/**
* \fn dtor
*/
Expand Down