Bug 377829 - [patch?] dvdwizard menu edit chapter label names
Summary: [patch?] dvdwizard menu edit chapter label names
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: git-master
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-20 09:00 UTC by Michael Vogt
Modified: 2021-05-14 23:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: Brainstorm+


Attachments
Possible patch (16.53 KB, patch)
2017-03-20 09:00 UTC, Michael Vogt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Vogt 2017-03-20 09:00:49 UTC
Created attachment 104651 [details]
Possible patch

Hi,

attached is a patch that is mostly meant as a RFC. I'm happy to refine if the direction looks ok but I don't want to waste time if the direction is undesirable so I post it for even if its not fully ready.

My goal is to make the dvdwizard a little bit nicer, i.e. so that when you have labeled "guides" and export them as dvd metadata then the chapter names are available inside the menu editor in the "target" combo box to make it easy to create buttons that jump to the right guide.

Originally I started with this in a relatively simple manner, but because the chapter times are all passed strings joined with "," adding titles became a bit cumbersome. This is why I added the new Chapter and VobChapters classes. If that seems overkill I'm happy to rethink things. Also, if a bugreport is the wrong channel to discuss this, I'm happy to post the patch on the mailinglist or any other place.

Attached the patch, it works for me but I have not tested all combination (the part around DvdWizardVob::updateChapters probably needs some extra work). It also probably does a bit of unneeded pass-by-value (but maybe not, I need to figure out how the user-data is attached etc).

Thanks for reading!
 Michael
Comment 1 Jean-Baptiste Mardelle 2017-03-20 12:26:57 UTC
I had a quick look and it seems ok to me. However I think we can ghet rid of the Chapter class. 

Have not looked at this code for a while, but I think we could store the time part of a Chapter as an int. Then we could simply use a QPair <int, QString> instead of the custom Chapter class, sorting can be achieved like this:

QList<QPair<int,QString> > vobChapters;

// sort function
struct QPairFirstComparer
{
    template<typename T1, typename T2>
    bool operator()(const QPair<T1,T2> & a, const QPair<T1,T2> & b) const
    {
        return a.first < b.first;
    }
};

// sort:
qSort(vobChapters.begin(), vobChapters.end(), QPairFirstComparer());

see: 
http://stackoverflow.com/questions/10188920/sorting-algorithm-with-qt-c-sort-a-qlist-of-struct

Does that seem ok to you ? The deadline for Kdenlive 17.04 is on this wednesday, 23rd of march at midnight UTC, so if you can get a patch ready for that time, would be great.
Comment 2 emohr 2018-11-18 18:22:53 UTC
Was that code implemented in 17.04?
Comment 3 emohr 2021-03-05 18:05:06 UTC
As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

Please try with the current Kdenlive AppImage version 20.12.2  https://download.kde.org/stable/kdenlive/20.12/linux/
Comment 4 Bug Janitor Service 2021-03-20 04:33:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Julius Künzel 2021-03-25 15:58:40 UTC
We are currently discussing if it is worth to keep the DVD Wizard in kdenlive or if we should drop it. The discussion is at https://invent.kde.org/multimedia/kdenlive/-/issues/1005. Maybe you want to leave a comment there? (It would be very helpful to have some opinions)

Please take the comment of @emohr still in to account and close this bug if it has been fixed
Comment 6 Bug Janitor Service 2021-04-09 04:33:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2021-04-24 04:33:14 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 8 Julius Künzel 2021-05-14 23:09:28 UTC
Git commit 5aaa7466ea0f88642ac81bd31bd1223df17956c1 by Julius Künzel.
Committed on 14/05/2021 at 23:08.
Pushed by jlskuz into branch 'master'.

Remove DVD Wizard
Related: bug 403128, bug 403405, bug 413567, bug 406042, bug 407242, bug 420319, bug 390431, bug 420428
Fixes #681
Fixes #1005

M  +0    -33   data/org.kde.kdenlive.appdata.xml
M  +0    -35   packaging/flatpak/org.kde.kdenlive-nightly.json
M  +0    -1    src/CMakeLists.txt
M  +1    -0    src/bin/bin.cpp
M  +1    -1    src/definitions.h
M  +1    -0    src/dialogs/kdenlivesettingsdialog.cpp
M  +1    -4    src/dialogs/renderwidget.cpp
M  +0    -1    src/dialogs/renderwidget.h
D  +0    -8    src/dvdwizard/CMakeLists.txt
D  +0    -1044 src/dvdwizard/dvdwizard.cpp
D  +0    -91   src/dvdwizard/dvdwizard.h
D  +0    -272  src/dvdwizard/dvdwizardchapters.cpp
D  +0    -64   src/dvdwizard/dvdwizardchapters.h
D  +0    -912  src/dvdwizard/dvdwizardmenu.cpp
D  +0    -147  src/dvdwizard/dvdwizardmenu.h
D  +0    -873  src/dvdwizard/dvdwizardvob.cpp
D  +0    -161  src/dvdwizard/dvdwizardvob.h
M  +1    -0    src/jobs/speedtask.cpp
M  +0    -1    src/kdenliveui.rc
M  +0    -11   src/mainwindow.cpp
M  +2    -2    src/mainwindow.h
M  +1    -0    src/mltconnection.cpp
M  +33   -45   src/monitor/monitor.cpp
M  +0    -1    src/monitor/monitor.h
M  +1    -4    src/monitor/qmlmanager.cpp
M  +0    -4    src/scopes/scopemanager.cpp
M  +1    -0    src/timeline2/model/timelinefunctions.cpp
M  +1    -0    src/timeline2/view/timelinewidget.cpp
D  +0    -149  src/ui/dvdwizardchapters_ui.ui
D  +0    -345  src/ui/dvdwizardmenu_ui.ui
D  +0    -212  src/ui/dvdwizardstatus_ui.ui
D  +0    -173  src/ui/dvdwizardvob_ui.ui
M  +1    -8    src/ui/renderwidget_ui.ui
M  +1    -1    src/utils/otioconvertions.cpp

https://invent.kde.org/multimedia/kdenlive/commit/5aaa7466ea0f88642ac81bd31bd1223df17956c1