Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#9227 closed Patch - Feature (Fixed)

OSD delete dialog contains different text than Watch Recordings delete dialog

Reported by: John Veness <John.Veness.mythtv@…> Owned by: sphery
Priority: trivial Milestone: 0.25
Component: MythTV - General Version: 0.24-fixes
Severity: low Keywords: delete dialog strings
Cc: Ticket locked: no

Description

When D is pressed while playing back a recording, a dialog appears in the OSD that contains text like:

Delete this recording?
[title]
[date time]
Yes, and allow re-record
Yes, delete it
No, keep it, I changed my mind

When pressing D from the Watch Recordings screen, the dialog says instead:

Are you sure you want to delete:
[title]
[subtitle]
[date time]
Yes, and allow re-record
Yes, delete it
No, keep it

i.e. has a different first line, contains the subtitle, and has different text for the "No" choice.

From memory, the Watch Recordings dialog used to say "No, keep it, I changed my mind" but changed to "No, keep it", so I guess the OSD text is lagging behind.

Without wishing to tell you what to do, wouldn't it be nice if the two dialogs shared the same strings, so that if the string is changed once, both dialogs change? I guess this would help with translations too.

$ mythfrontend --version
Please attach all output as a file in bug reports.
MythTV Version : 27204
MythTV Branch : branches/release-0-24-fixes
Network Protocol : 63
Library API : 0.24.20101028-1
QT Version : 4.7.0
Options compiled in:

linux debug using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_dvb using_firewire using_frontend using_hdhomerun using_hdpvr using_iptv using_ivtv using_joystick_menu using_lirc using_mheg using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmc_vld using_xvmcw using_bindings_perl using_bindings_python using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg

Attachments (1)

osd-delete-dialog.patch (2.1 KB) - added by John Veness <John.Veness.mythtv@…> 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by robertm

Resolution: Invalid
Status: newclosed

please feel free to re-open with a patch.

comment:2 Changed 8 years ago by Kenni Lund [kenni a kelu dot dk]

Resolution: Invalid
Status: closednew

comment:3 Changed 8 years ago by Kenni Lund [kenni a kelu dot dk]

Component: MythTV - GeneralTranslations
Milestone: unknown0.25
Owner: set to Kenni Lund [kenni a kelu dot dk]
Status: newaccepted

Changed 8 years ago by John Veness <John.Veness.mythtv@…>

Attachment: osd-delete-dialog.patch added

comment:4 Changed 8 years ago by John Veness <John.Veness.mythtv@…>

Although this bug has been taken by someone else, I decided to scratch my own itch and have submitted a patch. This modifies libs/libmythtv/tv_play.cpp ShowOSDPromptDeleteRecording function so that the dialog has the same text as the one in programs/mythfrontend/playbackbox.cpp. Some notes about this patch:

  • This is my first ever MythTV patch - please be gentle with me!
  • It has been made against the 0.24-fixes SVN branch. I don't have the resources to try trunk
  • It copies and pastes code from mythfrontend to make the subtitle appear correctly truncated if necessary
  • I wonder if a better solution would be to put both blocks of code into a library somewhere and call the function from both places, rather than duplicating code. That's beyond me, though

Many thanks for considering this patch.

comment:5 Changed 8 years ago by Kenni Lund [kenni a kelu dot dk]

Component: TranslationsMythTV - General
Owner: Kenni Lund [kenni a kelu dot dk] deleted
Status: acceptednew
Type: defectPatch - Feature

Patch uploaded by reporter, leaving it for someone else to review. Having the identical strings in the same translation context would probably be preferred, so the identical strings doesn't have to be translated twice.

comment:6 Changed 8 years ago by beirdo

Owner: set to sphery
Status: newassigned

comment:7 Changed 7 years ago by Github

Update some strings in OSD for consistency with UI.

Changes

No, keep it, I changed my mind -> No, keep it

as was done for Watch Recordings in f7ef39e9fd3

Changes:

Delete this recording? -> Are you sure you want to delete:

as it appears in the (non-OSD) UI in Watch/Delete? Recordings screens. This removes the last occurrence of "Delete this recording?", but leaves "Delete this recording" (as a proposed action, not a question, in the end of playback prompt).

Refs #9227.

Signed-off-by: Michael T. Dean <mdean@…>

Branch: master Changeset: cb82b528b3b50ccd67c6d128d4cd5011bd85d2f9

comment:8 Changed 7 years ago by sphery

Resolution: Fixed
Status: assignedclosed

John, thanks for the patch. I pushed the word changes from the patch, but I'm going to reject the "add subtitle to the delete dialog" portion of the change for now because we need to fix the already-existing non-OSD UI code to work properly before adding similar code to the OSD.

The problem with the existing code in PlaybackBox::CreateProgramInfoString?() (the code you used as a template for the similar code for the OSD) is that it cuts down the subtitle to 16 characters plus 3 periods (for ellipsis) if the subtitle is longer than the title. This means the cut down functionality is completely independent of dialog layout (i.e. other lines in the dialog) and theme layout of the dialog itself. This looks wrong when the first line of text in the dialog is 32 characters:

Are you sure you want to delete:
             Fringe
      Night of Desirab...
 Thu Sep 24, 9:00 PM - 10:05 PM

and the full subtitle, "Night of Desirable Objects," is only 26 characters, which happens to be shorter than both the "question" line ("Are you sure you want to delete:") and the line showing times (which is 30 characters).

This needs to be fixed to allow mythui to cut down the individual lines automatically (and appropriately) for the theme-specified layout rather than assuming some fixed max length of a line (meaning the hard-coded cutdown in PlaybackBox::CreateProgramInfoString?() needs removed). TTBOMK, there is no way existing mythui can cut down individual lines in a multiline string that contains line feed characters (\n). This means we either need to fix mythui to look at individual lines when doing cutdown on multiline strings or we need to change MythMenu? to allow specifying a QStringList of lines to add to the message area or ... Whatever approach we takes needs approval from the developers who know theming (such as Stuart M, Robert M, or John P).

I've put this on my TODO list, but if someone were to get to it before me (and get approval of the approach from those developers who know theming much better than I), please feel free to submit the patch for PlaybackBox::CreateProgramInfoString?() usage to another ticket, and, if desired, include similar code to make the in-OSD delete dialog also include the (properly-cut-down) subtitle.

Again, I like the idea, but we need to fix the existing code, and then we can add subtitle to the in-OSD delete dialog.

comment:9 Changed 7 years ago by John Veness <John.Veness.mythtv@…>

Hi Mike, thanks for taking this forward. I agree that the wording changes (especially the "I changed my mind" bit) in the dialogue are the most important things to make consistent, rather than the subtitle. I too have noticed that the truncation logic is a little odd at times and I agree we shouldn't propagate dodgy code in more places.

Note: See TracTickets for help on using tickets.