|
From: <cre...@us...> - 2007-02-19 01:30:45
|
Revision: 1616
http://svn.sourceforge.net/frontierkernel/?rev=1616&view=rev
Author: creecode
Date: 2007-02-18 17:30:23 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c 2007-02-19 01:25:35 UTC (rev 1615)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c 2007-02-19 01:30:23 UTC (rev 1616)
@@ -239,30 +239,32 @@
static boolean dockmenuinsertmenuitem (hdlmenu hmenu, short itemnumber, hdlheadrecord hnode) {
- /*
- Insert one menu item.
-
- 7.1b42 PBS: check menu items that should be checked.
- */
+ //
+ // Insert one menu item.
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ // 7.1b42 PBS: check menu items that should be checked.
+ //
+ Handle handleHeadString;
bigstring bsheadstring;
- boolean flenabled = true;
- boolean flchecked = false;
-
- getheadstring (hnode, bsheadstring);
-
+ boolean flchecked = false, flenabled = true;
+
+ opGetHeadTextHandle ( hnode, &handleHeadString );
+
+ texthandletostring ( handleHeadString, bsheadstring);
+
+ disposehandle ( handleHeadString );
+
mereduceformula (bsheadstring);
mereducemenucodes (bsheadstring, &flenabled, &flchecked); /*7.0b23 PBS: items can be disabled.*/
- pushpopupitem (hmenu, bsheadstring, flenabled, menuid);
+ pushpopupitem ( hmenu, bsheadstring, flenabled, menuid );
- #if TARGET_API_MAC_CARBON == 1
-
- SetMenuItemCommandID (hmenu, countmenuitems (hmenu), menuid);
+ SetMenuItemCommandID (hmenu, countmenuitems (hmenu), menuid);
- #endif
-
if (flchecked) /*7.1b42 PBS: support for checked menu items.*/
checkmenuitem (hmenu, countmenuitems (hmenu), flchecked);
@@ -270,10 +272,13 @@
dockmenuinsertsubmenu (hmenu, itemnumber, hnode);
#ifdef MACVERSION
+
flstackneedsdisposing = true;
+
#endif
return (true);
+
} /*dockmenuinsertmenuitem*/
@@ -313,19 +318,22 @@
static boolean dockmenufillpopup (hdlmenu hmenu, hdlmenurecord *hmreturned) {
- /*
- 7.1b44 PBS: call menuverbgetsize to make sure the menu is in memory.
- */
-
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ //
+ // 7.1b44 PBS: call menuverbgetsize to make sure the menu is in memory.
+ //
+
+ Handle handleAddress;
+ boolean fl = false;
+ hdlexternalhandle h;
+ hdlhashnode hnode;
hdlhashtable htable;
- hdlhashnode hnode;
+ hdlheadrecord hsummit;
hdlmenurecord hm;
+ long menusize = 0;
tyvaluerecord valaddress, val;
- hdlexternalhandle h;
- hdlheadrecord hsummit;
- bigstring bsaddress;
- boolean fl = false;
- long menusize = 0;
if (roottable == nil) /*9.1b1 JES: If there's no system root, don't crash.*/
return (false);
@@ -336,10 +344,10 @@
if (valaddress.valuetype != addressvaluetype)
goto exit;
- if (!getaddressvalue (valaddress, &htable, bsaddress))
+ if (!getaddressvalue (valaddress, &htable, &handleAddress))
goto exit;
- if (!langsymbolreference (htable, bsaddress, &val, &hnode))
+ if (!langsymbolreference (htable, handleAddress, &val, &hnode))
goto exit;
if (val.valuetype != externalvaluetype)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|