mainwindow.cpp
changeset 790 133e2ed6b9c5
parent 789 d85834ad8c54
child 791 f1006de05c54
     1.1 --- a/mainwindow.cpp	Mon Aug 24 14:39:07 2009 +0000
     1.2 +++ b/mainwindow.cpp	Thu Sep 03 08:52:00 2009 +0000
     1.3 @@ -21,6 +21,7 @@
     1.4  #include "settings.h"
     1.5  #include "texteditor.h"
     1.6  #include "warningdialog.h"
     1.7 +#include "xlinkitem.h"
     1.8  
     1.9  #if defined(Q_OS_WIN32)
    1.10  // Define only this structure as opposed to
    1.11 @@ -3382,26 +3383,21 @@
    1.12  				actionFormatHideLinkUnselected->setEnabled (true);
    1.13  			}
    1.14  
    1.15 -			if (selbi)	// FIXME-4 many properties of former BranchObj are in TreeItem meanwhile...
    1.16 +			if (selbi)	
    1.17  			{
    1.18 -				// Take care of links  // updateActions: FIXME-1
    1.19 -				/*
    1.20 -				if (bo->countXLinks()==0)
    1.21 +				// Take care of xlinks  
    1.22 +				branchXLinksContextMenuEdit->clear();
    1.23 +				branchXLinksContextMenuFollow->clear();
    1.24 +				if (selbi->xlinkCount()>0)
    1.25  				{
    1.26 -					branchXLinksContextMenuEdit->clear();
    1.27 -					branchXLinksContextMenuFollow->clear();
    1.28 -				} else
    1.29 -				{
    1.30 -					BranchObj *bot;
    1.31 +					BranchItem *bi;
    1.32  					QString s;
    1.33 -					branchXLinksContextMenuEdit->clear();
    1.34 -					branchXLinksContextMenuFollow->clear();
    1.35 -					for (int i=0; i<=bo->countXLinks();i++)
    1.36 +					for (int i=0; i<selbi->xlinkCount();++i)
    1.37  					{
    1.38 -						bot=bo->XLinkTargetAt(i);
    1.39 -						if (bot)
    1.40 +						bi=selbi->getXLinkNum(i)->getPartnerBranch();
    1.41 +						if (bi)
    1.42  						{
    1.43 -							s=bot->getHeading();
    1.44 +							s=bi->getHeading();
    1.45  							if (s.length()>xLinkMenuWidth)
    1.46  								s=s.left(xLinkMenuWidth)+"...";
    1.47  							branchXLinksContextMenuFollow->addAction (s);
    1.48 @@ -3409,7 +3405,6 @@
    1.49  						}	
    1.50  					}
    1.51  				}
    1.52 -				*/
    1.53  				//Standard Flags
    1.54  				standardFlagsMaster->updateToolBar (selbi->activeStandardFlagNames() );
    1.55