From: <hep...@us...> - 2011-03-03 04:25:25
|
Revision: 1266 http://qterm.svn.sourceforge.net/qterm/?rev=1266&view=rev Author: hephooey Date: 2011-03-03 04:25:19 +0000 (Thu, 03 Mar 2011) Log Message: ----------- Bring back the actions on the toolbars Modified Paths: -------------- trunk/qterm-qt4/src/qtermframe.cpp trunk/qterm-qt4/src/shortcutsdialog.cpp trunk/qterm-qt4/src/toolbardialog.cpp Modified: trunk/qterm-qt4/src/qtermframe.cpp =================================================================== --- trunk/qterm-qt4/src/qtermframe.cpp 2011-03-03 04:25:14 UTC (rev 1265) +++ trunk/qterm-qt4/src/qtermframe.cpp 2011-03-03 04:25:19 UTC (rev 1266) @@ -1097,7 +1097,7 @@ toolbar->addSeparator(); else { act=findChild<QAction*>(action); - if (act != 0 ) // kingson: I forgot why && act->actionGroup()==0) + if (act != 0 && act->actionGroup()->objectName() == "extraGroup") // Only the actions in the extraGroup can be added to the toolbar toolbar->addAction(act); } } @@ -1206,6 +1206,7 @@ QList<QAction*> actions = findChildren<QAction*>(QRegExp("action*")); actionsExtra = new QActionGroup(this); + actionsExtra->setObjectName("extraGroup"); actionsExtra->setExclusive(false); connect(actionsExtra, SIGNAL(triggered(QAction*)), this, SLOT(actionsDispatcher(QAction*))); Modified: trunk/qterm-qt4/src/shortcutsdialog.cpp =================================================================== --- trunk/qterm-qt4/src/shortcutsdialog.cpp 2011-03-03 04:25:14 UTC (rev 1265) +++ trunk/qterm-qt4/src/shortcutsdialog.cpp 2011-03-03 04:25:19 UTC (rev 1266) @@ -22,7 +22,7 @@ createDefaultShortcut(); foreach(QAction* action, actions) { //toolTip() gives text without '&' - if (action->actionGroup() != 0) + if (action->actionGroup()->objectName() != "extraGroup") continue; QTableWidgetItem *itemAction = new QTableWidgetItem(action->toolTip()); QString shortcut = action->shortcut().toString(); Modified: trunk/qterm-qt4/src/toolbardialog.cpp =================================================================== --- trunk/qterm-qt4/src/toolbardialog.cpp 2011-03-03 04:25:14 UTC (rev 1265) +++ trunk/qterm-qt4/src/toolbardialog.cpp 2011-03-03 04:25:19 UTC (rev 1266) @@ -16,7 +16,7 @@ QList<QAction*> actions = parent->findChildren<QAction*>(QRegExp("action*")); QAction* action; foreach(action, actions) { - if (action->actionGroup() != 0) + if (action->actionGroup()->objectName() != "extraGroup") continue; QListWidgetItem* item = new QListWidgetItem(action->toolTip()); item->setIcon(action->icon()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |