Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1209 → Rev 1210

/branches/Version13x/Scribus/scribus/menumanager.cpp
99,16 → 99,20
return retVal;
}
 
bool addMenuToActionWidget(const QString menuName, const QString widgetActionName)
bool MenuManager::addMenuToWidgetOfAction(const QString menuName, ScrAction *action)
{
bool retVal;
if (menuList[menuname] && menuList[widgetActionName])
if (menuList[menuName] && action!=NULL)
{
QString menuItemListClassName=menuList[widgetActionName]->getWidgetAddedTo()->className();
QWidget *w=action->getWidgetAddedTo();
QString menuItemListClassName=w->className();
if (menuItemListClassName=="QToolButton")
qDebug(QString("blah %1 %2").arg(menuName).arg(widgetActionName));
{
qDebug(QString("blah %1 %2").arg(menuName));
dynamic_cast<QToolButton *>(w)->setPopup(menuList[menuName]->getLocalPopupMenu());
}
else
qDebug(QString("blah2 %1 %2").arg(menuName).arg(widgetActionName));
qDebug(QString("blah2 %1 %2").arg(menuName));
}
}
 
/branches/Version13x/Scribus/scribus/scraction.h
38,7 → 38,7
const int getMenuIndex();
bool addTo(QWidget *w);
const QWidget *getWidgetAddedTo();
QWidget *getWidgetAddedTo();
signals:
void activatedDLL(int);
void activatedRecentFile(QString);
/branches/Version13x/Scribus/scribus/scraction.cpp
96,13 → 96,13
popupMenuAddedTo=menu;
}
 
void ScrAction::addedTo( QWidget * actionWidget, QWidget * container );
void ScrAction::addedTo( QWidget * actionWidget, QWidget * container )
{
widgetAddedTo = actionWidget;
containerWidgetAddedTo = container;
}
 
const QWidget* getActionWidget()
QWidget* ScrAction::getWidgetAddedTo()
{
return widgetAddedTo;
}
/branches/Version13x/Scribus/scribus/menumanager.h
39,7 → 39,7
void setMenuEnabled(const QString menuName, const bool enabled);
bool addMenuToMenuBar(const QString menuName);
bool removeMenuFromMenuBar(const QString menuName);
bool addMenuToActionWidget(const QString menuName, const QString widgetActionName);
bool addMenuToWidgetOfAction(const QString menuName, ScrAction *action);
bool addMenuItem(ScrAction *menuAction, const QString parent);
bool addMenuItemAfter(ScrAction *menuAction, const QString parent, ScrAction *afterMenuAction);
/branches/Version13x/Scribus/scribus/scribus.cpp
276,6 → 276,7
WerkTools2 = new QToolBar( tr("File"), this);
scrActions["fileNew"]->addTo(WerkTools2);
scrActions["fileOpen"]->addTo(WerkTools2);
scrMenuMgr->addMenuToWidgetOfAction("FileOpenRecent", scrActions["fileOpen"]);
scrActions["fileSave"]->addTo(WerkTools2);
scrActions["fileClose"]->addTo(WerkTools2);
scrActions["filePrint"]->addTo(WerkTools2);