mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Work around QMessageBox not showing its title on Mac
This is a bit hacky and simply adds the title to the message text when compiling on a Mac, but hopefully this will be enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8aadd4d372
commit
995192c5fb
6 changed files with 18 additions and 13 deletions
|
@ -182,9 +182,9 @@ void ProfileGraphicsView::hideEvents()
|
|||
EventItem *item = static_cast<EventItem*>(action->data().value<void*>());
|
||||
struct event *event = item->ev;
|
||||
|
||||
if (QMessageBox::question(mainWindow(),
|
||||
if (QMessageBox::question(mainWindow(), TITLE_OR_TEXT(
|
||||
tr("Hide events"),
|
||||
tr("Hide all %1 events?").arg(event->name),
|
||||
tr("Hide all %1 events?").arg(event->name)),
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok){
|
||||
if (event->name) {
|
||||
for (int i = 0; i < evn_used; i++) {
|
||||
|
@ -204,11 +204,11 @@ void ProfileGraphicsView::removeEvent()
|
|||
EventItem *item = static_cast<EventItem*>(action->data().value<void*>());
|
||||
struct event *event = item->ev;
|
||||
|
||||
if (QMessageBox::question(mainWindow(),
|
||||
if (QMessageBox::question(mainWindow(), TITLE_OR_TEXT(
|
||||
tr("Remove the selected event?"),
|
||||
tr("%1 @ %2:%3").arg(event->name)
|
||||
.arg(event->time.seconds / 60)
|
||||
.arg(event->time.seconds % 60, 2, 10, QChar('0')),
|
||||
.arg(event->time.seconds % 60, 2, 10, QChar('0'))),
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok){
|
||||
struct event **ep = ¤t_dc->events;
|
||||
while (ep && *ep != event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue