[PATCH] Only show tabs in kpluginselector config dialogs when needed

Aaron J. Seigo aseigo at kde.org
Mon Nov 19 16:18:29 GMT 2007


On Monday 19 November 2007, Will Stephenson wrote:
> space from the top of the widget, but not the extra margins brought in by
> the tabwidget.  Please review.

looks better; of course, it'll still show a tab widget if there are more than 
one module proxy but only one module is a realModule(). probably not a big 
issue though. one could move the initialization of the tab widget into the 
realModule() check, calling reparent etc as needed, i suppose... something 
like this completely untested bit of code:

if (currentModuleProxy->realModule()) {
     if (mainWidget && !newTabWidget) {
         // if we have a second module here, then create a tab widget for them
         newTabWidget = new KTabWidget(configDialog);
         moduleProxyParentWidget = newTabWidget;
         mainWidget->reparent(newTabWidget);
         mainWidget = newTabWidget;
         tabWidgets.insert(index.row(), newTabWidget);
     }

     if (newTabWidget) {

not sure if it's worth it, but it does also prevent a second run through the 
list. *shrug*

out of curiosity, does the currentModuleProxy object get deleted if it isn't a 
realModule()? does it matter?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071119/deb882d0/attachment.sig>


More information about the kde-core-devel mailing list