|
From: <mbe...@us...> - 2010-05-14 09:48:37
|
Revision: 780
http://scstudio.svn.sourceforge.net/scstudio/?rev=780&view=rev
Author: mbezdeka
Date: 2010-05-14 09:48:31 +0000 (Fri, 14 May 2010)
Log Message:
-----------
- message numbering bugs fixed
- help: new frontend picture, some text changes in messsage numbering help and shortcuts
Modified Paths:
--------------
trunk/doc/help/frontend/message-numbering.html
trunk/doc/help/frontend/pictures/frontend.png
trunk/doc/help/frontend/pictures/message_numbering_options.png
trunk/doc/help/frontend/shortcuts.html
trunk/doc/help/frontend.html
trunk/src/view/visio/addon/GlobalSettingsDlg.cpp
trunk/src/view/visio/addon/document.cpp
trunk/src/view/visio/addon/numberingGlobalDlg.cpp
Modified: trunk/doc/help/frontend/message-numbering.html
===================================================================
--- trunk/doc/help/frontend/message-numbering.html 2010-05-14 01:07:15 UTC (rev 779)
+++ trunk/doc/help/frontend/message-numbering.html 2010-05-14 09:48:31 UTC (rev 780)
@@ -15,10 +15,8 @@
<img src="pictures/message_numbering_options.png" alt="Message Numbering options dialog">
</p>
-<p>You can choose specific numbering type (numbers, letters, capital letters, romans), starting index (1-9999) and additional string following the index such as ".", ",", …</p>
+<p>You can choose specific numbering type (numbers, letters, capital letters, romans), starting index (1-9999) and additional string following the index such as ".", "-", …</p>
-<p>If <code>automatically enumerate new messages</code> is checked, any newly dropped messages will be enumerate according to the nearest numbered group.</p>
-
<p>Numbering can be deleted by pressing Delete numbering button <img src="pictures/icon_message_enumeration_disable.png" alt="Disable message numbering"> on the toolbar or by using hotkey <Code>Ctrl+Alt+D.</Code></p>
</body>
Modified: trunk/doc/help/frontend/pictures/frontend.png
===================================================================
(Binary files differ)
Modified: trunk/doc/help/frontend/pictures/message_numbering_options.png
===================================================================
(Binary files differ)
Modified: trunk/doc/help/frontend/shortcuts.html
===================================================================
--- trunk/doc/help/frontend/shortcuts.html 2010-05-14 01:07:15 UTC (rev 779)
+++ trunk/doc/help/frontend/shortcuts.html 2010-05-14 09:48:31 UTC (rev 780)
@@ -14,7 +14,7 @@
<tr><td><code>Ctrl+Alt+F</code></td><td><a href="automatic-drawing.html#add_instances">Add instances</a></td></tr>
<tr><td><code>Ctrl+Alt+S</code></td><td><a href="automatic-drawing.html#message_sequence">Message sequence</a></td></tr>
<tr><td><code>Ctrl+Alt+E</code></td><td><a href="message-numbering.html">Message Numbering</a></td></tr>
-<tr><td><code>Ctrl+Alt+D</code></td><td><a href="message-numbering.html">Delete Message Numbering</a></td></tr>
+<tr><td><code>Ctrl+Alt+D</code></td><td><a href="message-numbering.html">Delete message numbering</a></td></tr>
</table>
</body>
Modified: trunk/doc/help/frontend.html
===================================================================
--- trunk/doc/help/frontend.html 2010-05-14 01:07:15 UTC (rev 779)
+++ trunk/doc/help/frontend.html 2010-05-14 09:48:31 UTC (rev 780)
@@ -17,6 +17,7 @@
<ul>
<li><a href="frontend/shape-selection.html">Shape selection</a></li>
<li><a href="frontend/automatic-drawing.html">Automatic drawing</a></li>
+<li><a href="frontend/message-numbering.html">Message numbering</a></li>
</ul>
<p>Many SCStudio functions define their own keyboard accelerators.
Modified: trunk/src/view/visio/addon/GlobalSettingsDlg.cpp
===================================================================
--- trunk/src/view/visio/addon/GlobalSettingsDlg.cpp 2010-05-14 01:07:15 UTC (rev 779)
+++ trunk/src/view/visio/addon/GlobalSettingsDlg.cpp 2010-05-14 09:48:31 UTC (rev 780)
@@ -119,6 +119,6 @@
}
int CGlobalSettingsDlg::SaveRegistryData()
-{
+{
return 0;
}
Modified: trunk/src/view/visio/addon/document.cpp
===================================================================
--- trunk/src/view/visio/addon/document.cpp 2010-05-14 01:07:15 UTC (rev 779)
+++ trunk/src/view/visio/addon/document.cpp 2010-05-14 09:48:31 UTC (rev 780)
@@ -260,17 +260,8 @@
case ST_BMSC_MESSAGE_FOUND:
if(vsoShape->Text.length() == 0)
vsoShape->Text = _T("NAME");
-
- //Message numbering
- // if(m_vsoApp->ActivePage->PageSheet->GetCellExists(_T("User.AutoEnum1"),0))
- //autoEnumerate(vsoShape);
- // else if(m_vsoApp->ActivePage->PageSheet->GetCellExists(_T("User.AutoEnum2"),0))
- // {
-
- // }
- if((_tcsicmp(vsoShape->Data3,_T("")) != 0) && (_tcsicmp(vsoShape->Data1,_T("")) != 0))
- enumerate(m_vsoApp,vsoShape->Data3,false,true);
-
+ if((_tcsicmp(vsoShape->Data3,_T("")) != 0) && (_tcsicmp(vsoShape->Data1,_T("")) != 0))
+ drawNumbers(m_vsoApp->ActivePage->Shapes,vsoShape->Data3);
break;
case ST_COMMENT:
@@ -442,12 +433,12 @@
}
itemMessageEnumerating = itemDrawing->MenuItems->Add();
- itemMessageEnumerating->Caption = "&Message numbering";
+ itemMessageEnumerating->Caption = "Message &numbering";
itemMessageEnumerating->BeginGroup = true;
itemMessageEnumerating->CmdNum = Visio::visCmdHierarchical;
Visio::IVMenuItemPtr itemEnableEnumerating = itemMessageEnumerating->MenuItems->Add();
- itemEnableEnumerating->Caption = "&Message numbering";
+ itemEnableEnumerating->Caption = "Message &numbering";
itemEnableEnumerating->AddOnName = ADDON_NAME;
itemEnableEnumerating->AddOnArgs = stringize() << L"/event=" << MENU_ENABLE_MESSAGE_ENUMERATION;
vslIconFile = vslFileName+_T(",8");
@@ -506,11 +497,12 @@
itemCheckOptions->AddOnName = ADDON_NAME;
itemCheckOptions->AddOnArgs = stringize() << L"/event=" << MENU_CHECK_OPTIONS;
- Visio::IVMenuItemPtr globalSettings = itemDrawing->MenuItems->Add();
- globalSettings->Caption = "&Settings...";
- globalSettings->AddOnName = ADDON_NAME;
- globalSettings->BeginGroup = true;
- globalSettings->AddOnArgs = stringize() << L"/event=" << MENU_GLOBAL_SETTINGS;
+ //TODO: Dialog for message numbering global settings
+ //Visio::IVMenuItemPtr globalSettings = itemDrawing->MenuItems->Add();
+ //globalSettings->Caption = "&Settings...";
+ //globalSettings->AddOnName = ADDON_NAME;
+ //globalSettings->BeginGroup = true;
+ //globalSettings->AddOnArgs = stringize() << L"/event=" << MENU_GLOBAL_SETTINGS;
// step 2: create accelerators
// note: the accelerators must be created in this custom menu set
@@ -1398,7 +1390,7 @@
{
static int startingIndex = 1;
static int numberingType = 0;
- static BSTR add = _T(". ");
+ static BSTR add = _T(".");
CEnumerationDlg options(startingIndex,numberingType, add);
if(options.DoModal() != IDOK)
@@ -1430,6 +1422,9 @@
Visio::IVSelectionPtr selection = vsoApp->ActiveWindow->Selection;
Visio::IVShapePtr page = vsoApp->ActivePage->PageSheet;
std::set<_bstr_t> groups;
+
+ long undo_id = vsoApp->BeginUndoScope("DeleteNumbering");
+
int ID = CEnumerateUtils::getGroupCount(vsoApp);
//get all numbered messages on the page
@@ -1450,7 +1445,7 @@
selectedMessages++;
}
- if (selection->Count && (selectedMessages != numberedMessages))
+ if (selection->Count && (selectedMessages != numberedMessages) && (selectedMessages > 0))
{
//get which groups are selected
for(int i=1; i<= selection->Count; i++)
@@ -1476,6 +1471,8 @@
CEnumerateUtils::setGroupCount(vsoApp,0);
}
+ vsoApp->EndUndoScope(undo_id,true);
+
return VAORC_SUCCESS;
}
@@ -1609,7 +1606,7 @@
//Default values
int index = 1;
int enumerationType = 0;
- std::wstring addition = _T(". ");
+ std::wstring addition = _T("");
CEnumerateUtils::loadGroupSettings(shapesOnPage->Application,groupID,index,enumerationType,addition);
//for all message shapes check whether they are checked as numbered (Data1 == 1)
Modified: trunk/src/view/visio/addon/numberingGlobalDlg.cpp
===================================================================
--- trunk/src/view/visio/addon/numberingGlobalDlg.cpp 2010-05-14 01:07:15 UTC (rev 779)
+++ trunk/src/view/visio/addon/numberingGlobalDlg.cpp 2010-05-14 09:48:31 UTC (rev 780)
@@ -41,6 +41,8 @@
else if(wID == IDCANCEL)
EndDialog(wID);
+ SaveRegistryData();
+
return 0;
}
@@ -66,11 +68,12 @@
int CNumberingGlobalDlg::SaveRegistryData()
{
- if(getAutoEnumEnabled() == 1)
- {
+ //if(getAutoEnumEnabled() == 1)
+ //{
SetRegistry<int>(HKEY_CURRENT_USER, GetRegistryFolder(), _T("AutoEnum1"), getAutoEnum1Type());
SetRegistry<int>(HKEY_CURRENT_USER, GetRegistryFolder(), _T("AutoEnum2"), getAutoEnum2Type());
- }
+ MessageBox(_T("Done!"));
+ //}
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|