Changeset 1546 for trunk/dll/eas.c


Ignore:
Timestamp:
Oct 24, 2010, 12:33:00 AM (15 years ago)
Author:
Gregg Young
Message:

Add menu item to allow opening of directory container from the collector based on the path of the selected item. (Ticket 362) Add open file button to EAs dialog to allow opening of a new file's eas (Ticket 439). Initial work on populating the help table (It provides F1 help a few more places) (Ticket 95). Some minor code cleanup and help file updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/eas.c

    r1498 r1546  
    2525  12 Jul 09 GKY Add xDosQueryAppType and xDosAlloc... to allow FM/2 to load in high memory
    2626  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     27  23 Oct 10 GKY Added button to allow opening of a new file's eas from the EA dialog.
    2728
    2829***********************************************************************/
     
    5859#include "misc.h"                       // PaintRecessedWindow
    5960#include "fortify.h"
     61#include "getnames.h"                   // insert_filename
     62#include "pathutil.h"                   // ForwardslashToBackslash
    6063
    6164#pragma data_seg(DATA1)
     
    494497            MLEclearall(WinWindowFromID(hwnd, EA_MLE));
    495498            WinShowWindow(WinWindowFromID(hwnd, EA_MLE), FALSE);
    496             WinShowWindow(WinWindowFromID(hwnd, EA_CHANGE), FALSE);
     499            WinShowWindow(WinWindowFromID(hwnd,EA_CHANGE), FALSE);
    497500            WinShowWindow(WinWindowFromID(hwnd, EA_DELETE), FALSE);
    498501            WinShowWindow(WinWindowFromID(hwnd, EA_HEXDUMP), FALSE);
     
    829832  case WM_COMMAND:
    830833    switch (SHORT1FROMMP(mp1)) {
     834    case EA_OPENFILE:
     835      {
     836        CHAR filename[CCHMAXPATH];
     837        CHAR *p;
     838        CHAR **list = NULL;
     839
     840        if (*eap->filename)
     841          strcpy(filename, eap->filename);
     842        WinDismissDlg(hwnd, 1);
     843        ForwardslashToBackslash(filename);
     844        p = strrchr(filename, '\\');
     845        if (p) {
     846          p++;
     847          *p = 0;
     848        }
     849        else
     850          *filename = 0;
     851        strcat(filename, "*");
     852        list = xmalloc(sizeof(CHAR *) * 2, pszSrcFile, __LINE__);
     853       
     854        if (list) {
     855          if (insert_filename(HWND_DESKTOP,filename,TRUE,FALSE) &&
     856              *filename && *filename != '*') {
     857            list[0] = filename;
     858            list[1] = NULL;
     859            WinDlgBox(HWND_DESKTOP,
     860                      HWND_DESKTOP,
     861                      DisplayEAsProc,
     862                      FM3ModHandle,
     863                      EA_FRAME,
     864                      (PVOID)list);
     865          }
     866          else
     867            free(list);
     868        }
     869        break;
     870      }
    831871    case EA_ADD:
    832872      {
Note: See TracChangeset for help on using the changeset viewer.