|
From: <cre...@us...> - 2006-09-18 19:42:22
|
Revision: 1511
http://svn.sourceforge.net/frontierkernel/?rev=1511&view=rev
Author: creecode
Date: 2006-09-18 12:42:21 -0700 (Mon, 18 Sep 2006)
Log Message:
-----------
in langexternalzoomfilewindow function add file extension for when file is saved
Modified Paths:
--------------
Frontier/branches/FSRef_Migration/Common/source/langexternal.c
Modified: Frontier/branches/FSRef_Migration/Common/source/langexternal.c
===================================================================
--- Frontier/branches/FSRef_Migration/Common/source/langexternal.c 2006-09-18 19:34:23 UTC (rev 1510)
+++ Frontier/branches/FSRef_Migration/Common/source/langexternal.c 2006-09-18 19:42:21 UTC (rev 1511)
@@ -2119,15 +2119,19 @@
boolean langexternalzoomfilewindow (const tyvaluerecord *val, ptrfilespec fs, boolean flhidden) {
- /*
- create and open a new window containing the file-based external value in val.
- val should be in memory
- */
+ //
+ //
+ // create and open a new window containing the file-based external value in val. val should be in memory
+ //
+ // 2006-09-16 creedon: add a file extension for when the file is saved
+ //
register hdlexternalvariable hv;
- bigstring bstitle;
+ bigstring bsfileextension, bstitle;
Rect rzoom;
+ setemptystring ( bsfileextension );
+
hv = (hdlexternalvariable) (*val).data.externalvalue;
assert ((**hv).flinmemory);
@@ -2139,9 +2143,73 @@
if (fs != nil)
getfsfile (fs, bstitle); //5.0b9 dmb: new routine
- else
+ else {
getuntitledfilename (bstitle);
-
+
+ switch ( ( **hv).id ) { /// add an extension
+
+ case idtableprocessor:
+
+ pushstring ( "\x04" "fttb", bsfileextension );
+
+ break;
+
+ case idoutlineprocessor:
+
+ pushstring ( "\x04" "ftop", bsfileextension );
+
+ break;
+
+ case idscriptprocessor:
+
+ pushstring ( "\x04" "ftsc", bsfileextension );
+
+ break;
+
+ case idwordprocessor:
+
+ pushstring ( "\x04" "ftwp", bsfileextension );
+
+ break;
+
+ case idmenuprocessor:
+
+ pushstring ( "\x04" "ftmb", bsfileextension );
+
+ break;
+
+ /* case idpictprocessor:
+ updateconfigsettings (pictvaluetype, idpictconfig);
+
+ fl = pictverbnew (hdata, &hvariable);
+
+ break;
+
+ #ifdef fliowa
+
+ case idcardprocessor:
+ updateconfigsettings (cardvaluetype, idiowaconfig);
+
+ fl = cardverbnew (hdata, &hvariable);
+
+ break;
+
+ #endif
+
+ default:
+ fl = false; */
+
+ } // switch
+
+ if ( ! isemptystring ( bsfileextension ) ) {
+
+ insertchar ( '.', bsfileextension );
+
+ pushstring ( bsfileextension, bstitle );
+
+ }
+ }
+
if (!langexternaledit (hv, nil, fs, bstitle, &rzoom))
return (false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|