Bug 291080 - In settings, arrange ALL export options at ONE place
Summary: In settings, arrange ALL export options at ONE place
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Setup-Plugins (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 20:02 UTC by Axel Krebs
Modified: 2019-01-04 10:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.0


Attachments
showing the overwhelming variety of export capabilities (286.94 KB, image/png)
2012-01-09 20:02 UTC, Axel Krebs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Krebs 2012-01-09 20:02:54 UTC
Created attachment 67625 [details]
showing the overwhelming variety of export capabilities

Version:           2.5.0 (using KDE 4.7.3) 
OS:                Linux

at the moment, we have 34 modules where about 15 takes care of export issues (please see pic enclosed)

Reproducible: Always

Steps to Reproduce:
just open settings

Actual Results:  
always _too_ many items to select- this is not ergonomical, but time wasting. 

Because everytime, one searches a specific export function, you have to read/check _all_ possible export possibilities. This is old ergonimics... 

Expected Results:  
why don´t you arrange all export issue at one place, maybe on some type of table or so?

In this case, you could in the first column the names, the second the settng for that expoort type and in the third column a checkbox.
Comment 1 caulier.gilles 2012-08-06 21:17:45 UTC
Git commit 417dba20114529eb4a0994a4281fc67c4cd11777 by Gilles Caulier.
Committed on 06/08/2012 at 23:12.
Pushed by cgilles into branch 'development/2.0.0'.

new libkipi plugins config widget layout to group tools by categories for a better readablility
FIXED-IN: 3.0.0

M  +2    -2    libkipi/configwidget.cpp
M  +110  -18   libkipi/configwidget_p.cpp
M  +21   -5    libkipi/configwidget_p.h

http://commits.kde.org/libkipi/417dba20114529eb4a0994a4281fc67c4cd11777
Comment 2 caulier.gilles 2012-08-07 08:47:13 UTC
Git commit ec9387e7daa9905c615dcf82d95f600f0b42d6b8 by Gilles Caulier.
Committed on 07/08/2012 at 10:43.
Pushed by cgilles into branch 'development/2.0.0'.

better model/view to sort plugin list by categories

M  +54   -79   libkipi/configwidget_p.cpp
M  +1    -15   libkipi/configwidget_p.h

http://commits.kde.org/libkipi/ec9387e7daa9905c615dcf82d95f600f0b42d6b8
Comment 3 caulier.gilles 2012-08-07 09:53:09 UTC
Git commit e84a4844c9132667f493c8f1c00a226c07b591c2 by Gilles Caulier.
Committed on 07/08/2012 at 11:50.
Pushed by cgilles into branch 'development/2.0.0'.

add capability to filter plugins list based on text search over plugin name, categories, and description

M  +52   -27   libkipi/configwidget.cpp
M  +9    -0    libkipi/configwidget.h
M  +37   -1    libkipi/configwidget_p.cpp
M  +10   -1    libkipi/configwidget_p.h
M  +11   -0    tests/kipisetup.cpp

http://commits.kde.org/libkipi/e84a4844c9132667f493c8f1c00a226c07b591c2
Comment 4 Victor Dodon 2012-08-07 10:07:01 UTC
with the last 2 commits digikam and kxmlkipicmd are crashing when activanting the action "Configure Digikam" and "Configure kxmlkipicmd" respectively when there are plugins that must not be loaded. The backtrace:

Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7facc370c980 (LWP 22012))]

Thread 9 (Thread 0x7fac9c8f7700 (LWP 22013)):
#0  0x00007facbb1c9954 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007facbb45ad1b in wait (time=<optimized out>, this=0x2df2e10) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2c68d58, time=<optimized out>) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005fba49 in Digikam::ScanController::run (this=0x2da19a0) at /home/printesoi/kde/digikam/core/digikam/database/scancontroller.cpp:698
#4  0x00007facbb45a188 in QThreadPrivate::start (arg=0x2da19a0) at thread/qthread_unix.cpp:307
#5  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 8 (Thread 0x7fac97fff700 (LWP 22014)):
#0  0x00007facba150ebd in poll () from /usr/lib/libc.so.6
#1  0x00007facb361e744 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007facb361e864 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007facbb5bfa56 in QEventDispatcherGlib::processEvents (this=0x7fac900008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007facbb58523f in QEventLoop::processEvents (this=this@entry=0x7fac97ffebe0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007facbb585498 in QEventLoop::exec (this=0x7fac97ffebe0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007facbb456afd in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007facbb55f2c3 in QInotifyFileSystemWatcherEngine::run (this=0x2da0900) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007facbb45a188 in QThreadPrivate::start (arg=0x2da0900) at thread/qthread_unix.cpp:307
#9  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 7 (Thread 0x7fac977fe700 (LWP 22016)):
#0  0x00007facbb1c9954 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007facbb45ad1b in wait (time=<optimized out>, this=0x2f1a0a0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2f1bc98, time=<optimized out>) at thread/qwaitcondition_unix.cpp:158
#3  0x00007facc0502441 in Digikam::ParkingThread::run (this=0x2f1bc80) at /home/printesoi/kde/digikam/core/libs/threads/threadmanager.cpp:119
#4  0x00007facbb45a188 in QThreadPrivate::start (arg=0x2f1bc80) at thread/qthread_unix.cpp:307
#5  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 6 (Thread 0x7facc3665700 (LWP 22021)):
#0  0x00007facbb1c9954 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fac8e1eafbf in ?? () from /usr/lib/libvlccore.so.5
#2  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#3  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7fac8d79c700 (LWP 22026)):
#0  0x00007facbb1c9cc1 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007facbb45ab1a in wait (time=<optimized out>, this=0x3033a90) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x3033a08, time=<optimized out>) at thread/qwaitcondition_unix.cpp:158
#3  0x00007facbb44cd71 in QThreadPoolThread::run (this=0x3033b70) at concurrent/qthreadpool.cpp:141
#4  0x00007facbb45a188 in QThreadPrivate::start (arg=0x3033b70) at thread/qthread_unix.cpp:307
#5  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7fac750bb700 (LWP 22033)):
#0  0x00007facbb1c9cc1 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007facbb45ab1a in wait (time=<optimized out>, this=0x2f1dfe0) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2f43ec8, time=<optimized out>) at thread/qwaitcondition_unix.cpp:158
#3  0x00007facbb44cd71 in QThreadPoolThread::run (this=0x66055a0) at concurrent/qthreadpool.cpp:141
#4  0x00007facbb45a188 in QThreadPrivate::start (arg=0x66055a0) at thread/qthread_unix.cpp:307
#5  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fac748ba700 (LWP 22034)):
#0  0x00007facbb1c9cc1 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007facbb45ab1a in wait (time=<optimized out>, this=0x2f1dfe0) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2f43ec8, time=<optimized out>) at thread/qwaitcondition_unix.cpp:158
#3  0x00007facbb44cd71 in QThreadPoolThread::run (this=0x6450650) at concurrent/qthreadpool.cpp:141
#4  0x00007facbb45a188 in QThreadPrivate::start (arg=0x6450650) at thread/qthread_unix.cpp:307
#5  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fac6ffff700 (LWP 22035)):
#0  0x00007facbb1c9cc1 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007facbb45ab1a in wait (time=<optimized out>, this=0x2f1dfe0) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2f43ec8, time=<optimized out>) at thread/qwaitcondition_unix.cpp:158
#3  0x00007facbb44cd71 in QThreadPoolThread::run (this=0x5d8b8f0) at concurrent/qthreadpool.cpp:141
#4  0x00007facbb45a188 in QThreadPrivate::start (arg=0x5d8b8f0) at thread/qthread_unix.cpp:307
#5  0x00007facbb1c5e0f in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007facba15904d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7facc370c980 (LWP 22012)):
[KCrash Handler]
#5  0x00007facc11ecccf in KIPI::Plugin::actions (this=0x0, widget=0x0) at /home/printesoi/kde/digikam/extra/libkipi/libkipi/plugin.cpp:196
#6  0x00007facc11f216e in KIPI::PluginCheckBox::PluginCheckBox (this=0x78c4800, info=0x3c2f660, parent=0x78bef30) at /home/printesoi/kde/digikam/extra/libkipi/libkipi/configwidget_p.cpp:61
#7  0x00007facc11f2988 in KIPI::PluginListView::PluginListView (this=0x78bef30, parent=0x78bdf40) at /home/printesoi/kde/digikam/extra/libkipi/libkipi/configwidget_p.cpp:148
#8  0x00007facc11f159f in KIPI::ConfigWidget::ConfigWidget (this=0x78935d0, parent=0x0) at /home/printesoi/kde/digikam/extra/libkipi/libkipi/configwidget.cpp:106
#9  0x00000000004de16f in Digikam::Setup::Setup (this=0x6c337c0, parent=0x2e5b200) at /home/printesoi/kde/digikam/core/utilities/setup/setup.cpp:295
#10 0x00000000004df1d0 in Digikam::Setup::exec (parent=0x2e5b200, page=Digikam::Setup::LastPageUsed) at /home/printesoi/kde/digikam/core/utilities/setup/setup.cpp:416
#11 0x00000000005b0e03 in Digikam::DigikamApp::setup (this=0x2e5b200) at /home/printesoi/kde/digikam/core/digikam/main/digikamapp.cpp:2343
#12 0x00000000005b0de4 in Digikam::DigikamApp::slotSetup (this=0x2e5b200) at /home/printesoi/kde/digikam/core/digikam/main/digikamapp.cpp:2338
#13 0x000000000059a7ff in Digikam::DigikamApp::qt_static_metacall (_o=0x2e5b200, _c=QMetaObject::InvokeMetaMethod, _id=24, _a=0x7fff6ca754a0) at /home/printesoi/kde/digikam/build/core/digikam/digikamapp.moc:182
#14 0x00007facbb59fbc7 in QMetaObject::activate (sender=0x3b6ac20, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff6ca754a0) at kernel/qobject.cpp:3547
#15 0x00007facbc1ea8f2 in QAction::triggered (this=this@entry=0x3b6ac20, _t1=false) at .moc/debug-shared/moc_qaction.cpp:277
#16 0x00007facbc1eaadc in QAction::activate (this=0x3b6ac20, event=<optimized out>) at kernel/qaction.cpp:1257
#17 0x00007facbb5a6a7e in QObject::event (this=0x3b6ac20, e=<optimized out>) at kernel/qobject.cpp:1195
#18 0x00007facbc1eabcf in QAction::event (this=0x3b6ac20, e=0x3cacbf0) at kernel/qaction.cpp:1187
#19 0x00007facbcfd9497 in KAction::event(QEvent*) () from /usr/lib/libkdeui.so.5
#20 0x00007facbc1efda1 in QApplicationPrivate::notify_helper (this=this@entry=0x2bb7c30, receiver=receiver@entry=0x3b6ac20, e=e@entry=0x3cacbf0) at kernel/qapplication.cpp:4551
#21 0x00007facbc1f7b29 in QApplication::notify (this=0x7fff6ca76020, receiver=0x3b6ac20, e=0x3cacbf0) at kernel/qapplication.cpp:4412
#22 0x00007facbd0b2856 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#23 0x00007facbb58730e in QCoreApplication::notifyInternal (this=0x7fff6ca76020, receiver=receiver@entry=0x3b6ac20, event=event@entry=0x3cacbf0) at kernel/qcoreapplication.cpp:915
#24 0x00007facbb58ab58 in sendEvent (event=0x3cacbf0, receiver=0x3b6ac20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#25 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x2b244d0) at kernel/qcoreapplication.cpp:1539
#26 0x00007facbb5bf5a3 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#27 postEventSourceDispatch (s=0x2bb8c80) at kernel/qeventdispatcher_glib.cpp:279
#28 0x00007facb361e475 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007facb361e7a8 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007facb361e864 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007facbb5bfa36 in QEventDispatcherGlib::processEvents (this=0x2b25db0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#32 0x00007facbc2afaee in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007facbb58523f in QEventLoop::processEvents (this=this@entry=0x7fff6ca75ea0, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007facbb585498 in QEventLoop::exec (this=0x7fff6ca75ea0, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007facbb58af78 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#36 0x00000000006e172a in main (argc=1, argv=0x7fff6ca76718) at /home/printesoi/kde/digikam/core/digikam/main/main.cpp:232

When a plugin is not loaded then the info->plugin() is null and you are calling actions() on it.
Comment 5 caulier.gilles 2012-08-07 10:18:54 UTC
Git commit 479657bbf6c491b0d99caa1a9c456fb9234a89a6 by Gilles Caulier.
Committed on 07/08/2012 at 12:17.
Pushed by cgilles into branch 'development/2.0.0'.

prevent crash if info, plugin, or KAction list are null

M  +40   -28   libkipi/configwidget_p.cpp

http://commits.kde.org/libkipi/479657bbf6c491b0d99caa1a9c456fb9234a89a6
Comment 6 caulier.gilles 2012-08-07 11:01:57 UTC
Git commit 0c1af110f1f384cfdf3fffe04000fc4bb15b184f by Gilles Caulier.
Committed on 07/08/2012 at 12:59.
Pushed by cgilles into branch 'development/2.0.0'.

Active filtering of plugins list through case sensitive filter

M  +30   -16   libkipi/configwidget.cpp
M  +2    -2    libkipi/configwidget.h
M  +27   -16   libkipi/configwidget_p.cpp
M  +4    -3    libkipi/configwidget_p.h
M  +6    -1    tests/kipisetup.cpp
M  +1    -0    tests/kipisetup.h

http://commits.kde.org/libkipi/0c1af110f1f384cfdf3fffe04000fc4bb15b184f
Comment 7 caulier.gilles 2012-08-07 11:02:50 UTC
Git commit 5fccda0cdba5c07945d3824e68de783807ab7687 by Gilles Caulier.
Committed on 07/08/2012 at 13:00.
Pushed by cgilles into branch 'development/3.0.0'.

use new plugins filtering list feature in digiKam setup dialog

M  +17   -1    utilities/setup/setup.cpp
M  +2    -0    utilities/setup/setup.h

http://commits.kde.org/digikam/5fccda0cdba5c07945d3824e68de783807ab7687
Comment 8 caulier.gilles 2012-08-07 11:43:21 UTC
Git commit ae7c379c477d016880438291dbe5a1e96cccf45e by Gilles Caulier.
Committed on 07/08/2012 at 13:40.
Pushed by cgilles into branch 'development/2.0.0'.

add a way to extract author name from plugins deskop files. Print it to Plugins config widget.

M  +13   -6    libkipi/configwidget_p.cpp
M  +6    -0    libkipi/pluginloader.cpp
M  +1    -0    libkipi/pluginloader.h

http://commits.kde.org/libkipi/ae7c379c477d016880438291dbe5a1e96cccf45e
Comment 9 caulier.gilles 2012-08-07 12:00:33 UTC
Git commit 6463d5b36327a51bb0897b5a437cb9fdcde3bb83 by Gilles Caulier.
Committed on 07/08/2012 at 13:58.
Pushed by cgilles into branch 'development/2.0.0'.

polish author info to display and fix column layout

M  +2    -2    libkipi/configwidget_p.cpp

http://commits.kde.org/libkipi/6463d5b36327a51bb0897b5a437cb9fdcde3bb83
Comment 10 caulier.gilles 2012-08-07 12:08:25 UTC
KIPI plugins setup page from digiKam 3.0.0 config dialog

http://www.flickr.com/photos/digikam/7732407706/sizes/o/in/photostream/

Gilles Caulier
Comment 11 Victor Dodon 2012-08-07 12:38:29 UTC
Gilles, with my last commit http://commits.kde.org/libkipi/5a0e89c7bac19a0cfe18c4d79a81fee833cf177d I changed the way we can get plugin categories. I added a new property X-KIPI-PluginCategories. All it's needed now is to patch *.desktop files of the kipi-plugins and add a line X-KIPI-PluginCategories=[categories]. What you think?

This way we can get the categories for the plugins that are not loaded, impossible thing with the previous implementation..
Comment 12 caulier.gilles 2012-08-07 13:15:43 UTC
Victor,

Do you set the new properties X-KIPI-PluginCategories for each plugin actions, as it set in hard coded version ? I hope it's not a general property for the plugin as well.

Anyway, yes, using desktop file instead hard-cede version is a good way. This want mean tha a category API in KIPI::Plugin class can be removed. Right? 

Gilles
Comment 13 caulier.gilles 2012-08-07 13:22:18 UTC
Victor,

I see you your commit. But how to know which plugin action can be considerated as Import, Export, Image, etc.. category, as current hard coded way do ?

Gilles
Comment 14 caulier.gilles 2012-08-07 13:54:05 UTC
Victor,

there is a problem with libkipi/kipiplugin.desktop file that you have patched with your mast commit.

I think this file is a duplicate of kipi-plugins/common/libkipiplugins/kipiplugins.desktop (note 's' at end of file name)

Libkipi desktop file must be removed. file from kipi-plugins must be used instead. What do you think about ?

I would to include kipi-plugins release version into desktop file, to be able to display it into kipi host application. This cannot be do through libkipi of course, only by kipi-plugins...

Gilles
Comment 15 caulier.gilles 2012-08-07 14:02:50 UTC
Victor,

I'm not sure if i'm right with my last comment #14. Sound like libkipi/kipiplugin.desktop is to discribe desktop plugin template, and libkipiplugins/kipiplugins.desktop is to add the right entry in KDE help center for kipi-plugins.

What do you think about ?

Gilles
Comment 16 Victor Dodon 2012-08-07 14:08:29 UTC
Gilles, they are two different things and both must be kept. Look at the places that they are installed:
kipiplugin.desktop is installed in the ${SERVICETYPES_INSTALL_DIR} while kipiplugins.desktop is installed in the ${XDG_APPS_INSTALL_DIR}.

This means that kipiplugin.desktop from libkipi must be kept as it makes possible the loading of the plugins through KServiceTypeTrader(try to remove the kipiplugin.desktop from /usr/share/kde4/servicetypes/ and you will see that no plugin will be loaded).
Comment 17 Victor Dodon 2012-08-07 14:15:01 UTC
Gilles, about plugin actions: as I can see the only use of Plugin::category method is only in KipiTestPluginLoader and KipiPluginLoader(from core) the build actionCategories in the "Configure Shortcuts" dialog. In such case we can freely use info->pluginCategories() to know in wich category we need the include the plugin.. Am I wrong?
Comment 18 caulier.gilles 2012-08-07 15:49:03 UTC
Victor,

Look like each action are wrapped around category in each plugin definition through Plugin::category() method. 

Look in plugin_rawconverter.cpp::line 199 for ex...

This is the problem : with desktop file you can identify that a plugin has Tool and Batch actions but you cannot identify which action exactly.

A solution based to patch each plugin .rc file will be better; if it's possible, as each action are defined in this xml file. But i don't know if it's possible to to add xml properties which are easily suitable in libkipi through KDE API...

Gilles
Comment 19 Axel Krebs 2012-08-07 19:58:08 UTC
Am 09.01.2012 21:28, schrieb Gilles Caulier:
> https://bugs.kde.org/show_bug.cgi?id=291080
> 
> 
> Gilles Caulier <caulier.gilles@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |caulier.gilles@gmail.com
>           Component|Export                      |libkipi
> 
> 
> 
> 
Thanks for your information Gilles!

...looks great... thank you for your efforts!

Axel
Comment 20 Victor Dodon 2012-08-08 00:05:56 UTC
Gilles, look at my commit http://commits.kde.org/libkipi/7fda90dd9ea659b96eed892cb5ff83bf0c88a4d2 . This is the solution I propose with getting the category of the action. The code needs polish and it's not finished, but you need to look at and to tell what you think. Use kxmlkipicmd to test that plugin actions are added right in the "Configure shortcuts dialog".

By the way, do we realy need to store more widgets in a map in Plugin class?
Comment 21 caulier.gilles 2012-08-08 05:24:06 UTC
Victor,

1/ Instead to use a dedicated method to group KAction + Category :

 void addAction(KAction* const action, Category cat);

... why not to store Category in Kaction Container as extra data :

http://qt-project.org/doc/qt-4.8/qaction.html#setData
http://qt-project.org/doc/qt-4.8/qaction.html#data

This will simplify code a lots...

2/ Your last changes include to change both code + desktop files to describe Categories used in a plugin. Do you need that ?

3/ Instead to use code or/and desktop file to assign Categories in plugin, what's about to use XML file as well to add extra data in XML Action definition ? It's possible ? If yes, no code need to be changed and recompiled to assign or change Category, if libkipi is able to manage it...

Gilles
Comment 22 Victor Dodon 2012-08-08 07:34:47 UTC
Gilles,
> 1/ Instead to use a dedicated method to group KAction + Category :
> 
>  void addAction(KAction* const action, Category cat);
> 
> ... why not to store Category in Kaction Container as extra data :
> 
> http://qt-project.org/doc/qt-4.8/qaction.html#setData
> http://qt-project.org/doc/qt-4.8/qaction.html#data
> 
> This will simplify code a lots...

I think that is more intuitive to use addAction(KAction* const, Category), and in this way, plugins will no longer need the category method as it is implemented in the Plugin class. This will also simplify the code a lot.

> 2/ Your last changes include to change both code + desktop files to describe
> Categories used in a plugin. Do you need that ?

Changes in the desktop files were necessary to know the plugin category even when a plugin is not loaded. In the previous implementation we could not now the plugin category if the plugin is not loaded. This is how it looked when plugin were not loaded: http://img52.imageshack.us/img52/7243/shot50.png , and this is how it looks now: http://img19.imageshack.us/img19/1152/shot49.png

> 3/ Instead to use code or/and desktop file to assign Categories in plugin,
> what's about to use XML file as well to add extra data in XML Action
> definition ? It's possible ? If yes, no code need to be changed and
> recompiled to assign or change Category, if libkipi is able to manage it...

As I can see from xmlgui standard http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd accepted atributes for Action are only: name, group, append, text, whatsThis, tooltip, iconText, shortcut, icon, priority. And I don't think is a good idea to add non-standard attributes.
Comment 23 caulier.gilles 2012-08-08 09:00:16 UTC
1/ But internally, storing Category to KAction as extra data will simplify map container :

you can use old map :
    QMap<QWidget*, QList<KAction*> >   actions;

instead new one :

    QMap<QWidget*, QMap<KAction*, Category> > actionsCat;

2/ ok
3/ ok
Comment 24 Victor Dodon 2012-08-08 09:21:52 UTC
Gilles.
1. But then setData will not be available to programmers for use.
Comment 25 caulier.gilles 2012-08-08 09:30:14 UTC
1/ Right. Note that it's not common to use extra data with QAction. At least in kipi-plugins.
But as we let's action managed by KDELibs, we don't know if extra data are not add to action for rules purpose...

Gilles Caulier
Comment 26 caulier.gilles 2012-08-08 11:15:01 UTC
Git commit f7082c74e87c0861f7829eae70a0a7cb1f6145c7 by Gilles Caulier.
Committed on 08/08/2012 at 13:12.
Pushed by cgilles into branch 'development/2.0.0'.

add new method to extract kipi-plugins version from common kipiplugins.desktop file
Print libkipi and kipi-plugins version on plugins config widget

M  +11   -1    libkipi/configwidget.cpp
M  +20   -0    libkipi/pluginloader.cpp
M  +2    -0    libkipi/pluginloader.h

http://commits.kde.org/libkipi/f7082c74e87c0861f7829eae70a0a7cb1f6145c7