Bug 283491 - Caption/Tags tab: Active sub-tab not restored after restart [patch]
Summary: Caption/Tags tab: Active sub-tab not restored after restart [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Captions (show other bugs)
Version: 2.5.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: junior-jobs
Depends on: 234067
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-06 20:02 UTC by Michael G. Hansen
Modified: 2017-08-14 21:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0
Sentry Crash Report:


Attachments
Enable restoring of active sub-tab for Captions-Tag sidebar (5.99 KB, patch)
2011-12-28 15:10 UTC, Islam Wazery
Details
Enable restoring of active sub-tab for Captions\Tag (5.45 KB, patch)
2011-12-28 19:09 UTC, Islam Wazery
Details
Enable restoring of active sub-tab in the ImageDescEdit tab and its languages after restart (5.76 KB, patch)
2012-01-03 04:10 UTC, Islam Wazery
Details
reviewed patch for digiKam (11.49 KB, patch)
2012-01-09 12:20 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael G. Hansen 2011-10-06 20:02:55 UTC
Version:           2.3.0 (using KDE 4.6.2) 
OS:                Linux

When opening the Caption/Tags tab, the "Information" sub-tab is always active after starting digikam, even though I activated the "Description" sub-tab before closing digikam.

Reproducible: Always

Steps to Reproduce:
1. Activate "Description" sub-tab
2. Close digikam
3. Start digikam again -> "Information" sub-tab is active


Expected Results:  
"Description" sub-tab should be active.
Comment 1 Michael G. Hansen 2011-10-06 20:03:13 UTC
Should be easy enough for a junior-job.
Comment 2 Islam Wazery 2011-12-21 10:04:25 UTC
For me, this bug never reproduced, I doubt that it is still exist!
Comment 3 Michael G. Hansen 2011-12-27 15:27:19 UTC
Still there in current git master.

The behavior is still there, only the other way around: The "Description" sub-tab is always the active tab after a restart of digikam, no matter whether the "Tags" or "Information" sub-tab was active before.

Michael
Comment 4 Islam Wazery 2011-12-27 15:50:21 UTC
OK, I am working on a patch for it :)
Comment 5 Islam Wazery 2011-12-28 15:10:45 UTC
Created attachment 67188 [details]
Enable restoring of active sub-tab for Captions-Tag sidebar

Here is a patch that solve this bug, but it needs more lines of code to also solve bug #234067
Comment 6 Michael G. Hansen 2011-12-28 16:06:03 UTC
Hi Menopia,

I think it is best to only submit a patch here fixing this bug, and to later submit a separate patch to fix another (unrelated) bug. This makes it easier to see what was done in the git history later.

Can you re-send your patch with just the relevant code for this bug?

Thanks,

Michael
Comment 7 Islam Wazery 2011-12-28 19:09:57 UTC
Created attachment 67199 [details]
Enable restoring of active sub-tab for Captions\Tag

OK, here is the edited patch
Comment 8 caulier.gilles 2011-12-28 20:22:25 UTC
Menopia,

Thanks for your patch.

Please if old patch #67188 fix bug #234067, attach changes in this file. Like this, we will close 2 files before 2.5.0, planed on next sunday.

Michael,

Did you review this patch ?

Gilles Caulier
Comment 9 Islam Wazery 2012-01-03 04:10:49 UTC
Created attachment 67367 [details]
Enable restoring of active sub-tab in the ImageDescEdit tab and its languages after restart

Hi Michael, and Gilles,

This patch fixes both bug #283491 and bug #234067. Also here is a needed patch I made for libkexiv2 http://bit.ly/rNUlcf to fix the bugs.

I am sorry Michael for sending a single patch for both bugs.
Comment 10 caulier.gilles 2012-01-03 14:55:57 UTC
Islam,

Your patch from : http://bit.ly/rNUlcf

... is not for libkexiv2. There is something wrong here ?

Gilles Caulier
Comment 11 caulier.gilles 2012-01-03 14:57:11 UTC
Islam,

Also, please, always attach patch to bugzilla for QA. Do not provide an external link. Thanks in advance

Gilles Caulier
Comment 12 caulier.gilles 2012-01-06 10:38:24 UTC
Islam,

Do you see my comments #10 and #11 ?

Gilles Caulier
Comment 13 Islam Wazery 2012-01-07 14:27:54 UTC
Hi Gilles,

I am sorry for not posting the patches, I will try to post the two patches
each for its relevant bug by the end of today. I am a bit overloaded with
my exams and I will finish them all in Jan 23, after that date I will be
back on Digikam development which I want to be a member with its devs, and
also can I ask for your mentorship in the development?

Thanks and Regards
Islam Wazery
Comment 14 caulier.gilles 2012-01-07 15:53:04 UTC
Islam,

Only patch from this url http://bit.ly/rNUlcf is wrong. It's not against libkexiv2 as expected. Please attach right patch o this bugzilla enry.

For mentor-ship, yes, of course i can guide you. But please sent me a private mail with your skill and your development preferences (gui, thread, imagery, algorithms, database, usability, metadata, etc...). I have some tiedous topic to do on digiKam)...

Gilles Caulier
Comment 15 caulier.gilles 2012-01-09 12:20:39 UTC
Created attachment 67613 [details]
reviewed patch for digiKam

reviewed patch for libkexiv2

Islam,

Look your second patch reviewed, including libkexiv2 version ID check to prevent
broken digiKam compilation with old libkexiv2. 

This patch include too :

- coding polish.
- call of ImageDescEditTab::readSettings() from ImagePropertiesSideBarDB::doLoadState() to read properly settings from digiKam config file.
- call of ImageDescEditTab::writeSettings() from ImagePropertiesSideBarDB::doSaveState() to save settings to digiKam config file
- some missing call, and wrong ordering of method calls.

I place patches in bugzilla for learning purpose. Please take a look. 

In all case, i will apply these patches to git /master.
Gilles Caulier
Comment 16 caulier.gilles 2012-01-09 12:30:22 UTC
Git commit 02d35d3b4a1bbd2709526dac5cabe88bd5e8c1d0 by Gilles Caulier.
Committed on 09/01/2012 at 13:22.
Pushed by cgilles into branch 'master'.

apply patch #67613 to save and restore all states of Caption/Edit sidebar between sessions
BUGS: 283491

M  +23   -1    libs/imageproperties/captionedit.cpp
M  +4    -1    libs/imageproperties/captionedit.h
M  +21   -28   libs/imageproperties/imagedescedittab.cpp
M  +4    -1    libs/imageproperties/imagedescedittab.h
M  +8    -2    libs/imageproperties/imagepropertiessidebardb.cpp
M  +1    -1    libs/imageproperties/imagepropertiessidebardb.h
M  +1    -1    libs/imageproperties/imagepropertiesversionstab.cpp
M  +1    -1    libs/imageproperties/imagepropertiesversionstab.h

http://commits.kde.org/digikam/02d35d3b4a1bbd2709526dac5cabe88bd5e8c1d0
Comment 17 caulier.gilles 2012-01-09 12:31:58 UTC
Git commit f3ea9a0d518d38bbe1f08ca66aa5b00e74daa9cb by Gilles Caulier.
Committed on 09/01/2012 at 13:20.
Pushed by cgilles into branch 'master'.

apply patch from 67613 to add libkexiv2 method to handle current language code property

M  +4    -3    CMakeLists.txt
M  +14   -2    libkexiv2/altlangstredit.cpp
M  +6    -4    libkexiv2/altlangstredit.h

http://commits.kde.org/libkexiv2/f3ea9a0d518d38bbe1f08ca66aa5b00e74daa9cb