Diff for /Amaya/amaya/templates.c between versions 1.66 and 1.67

version 1.66, 2006/08/16 14:53:56 version 1.67, 2006/09/01 14:19:34
Line 16 Line 16
   
 #ifdef TEMPLATES  #ifdef TEMPLATES
 #include "Template.h"  #include "Template.h"
   #include "templates.h"
 #include "templateDeclarations.h"  #include "templateDeclarations.h"
 #include "templateLoad.h"  
 #include "templateInstanciation.h"  
   
 struct menuType  
 {  
         char *label;  
         int   type;  
 };  
   
   #include "templateLoad_f.h"
   #include "templateInstanciation_f.h"
   #include "templateDeclarations_f.h"
 #include "appdialogue_wx.h"  #include "appdialogue_wx.h"
 #include "init_f.h"  #include "init_f.h"
 #include "wxdialogapi_f.h"  #include "wxdialogapi_f.h"
Line 172  ThotBool UseMenuClicked (NotifyElement * Line 168  ThotBool UseMenuClicked (NotifyElement *
         ElementType      elt = TtaGetElementType(el);          ElementType      elt = TtaGetElementType(el);
         Attribute        at;          Attribute        at;
         AttributeType    att;          AttributeType    att;
     XTigerTemplate   t;
     Declaration      dec;
         int              nbitems, size;          int              nbitems, size;
         struct menuType *items;          struct menuType *items;
   char            *types, *menuString;    char            *types, *menuString;
                   
     t = (XTigerTemplate) Get(templates, DocumentMeta[doc]->template_url);
     if (!t)
       return FALSE; // no template ?!?!
   
         att.AttrSSchema = elt.ElSSchema;          att.AttrSSchema = elt.ElSSchema;
         att.AttrTypeNum = Template_ATTR_types;          att.AttrTypeNum = Template_ATTR_types;
         at = TtaGetAttribute (el, att);          at = TtaGetAttribute (el, att);
Line 185  ThotBool UseMenuClicked (NotifyElement * Line 187  ThotBool UseMenuClicked (NotifyElement *
         TtaGiveTextAttributeValue (at, types, &size);          TtaGiveTextAttributeValue (at, types, &size);
   
         giveItems (types, size, &items, &nbitems);          giveItems (types, size, &items, &nbitems);
     if (nbitems == 1)
       {
         dec = GetDeclaration(t, items[0].label);
         if (dec)
           /* if it's a union, display the menu of this union */
           {
             /* @@@@@@@ */
           }
       }
         menuString = createMenuString (items, nbitems);          menuString = createMenuString (items, nbitems);
         TtaNewScrollPopup (BaseDialog + OptionMenu, TtaGetViewFrame (doc, 1), NULL,           TtaNewScrollPopup (BaseDialog + OptionMenu, TtaGetViewFrame (doc, 1), NULL, 
                      nbitems, menuString , NULL, false, 'L');                       nbitems, menuString , NULL, false, 'L');
Line 195  ThotBool UseMenuClicked (NotifyElement * Line 206  ThotBool UseMenuClicked (NotifyElement *
         TtaShowDialogue (BaseDialog + OptionMenu, FALSE);          TtaShowDialogue (BaseDialog + OptionMenu, FALSE);
         TtaWaitShowProcDialogue();          TtaWaitShowProcDialogue();
         TtaDestroyDialogue (BaseDialog + OptionMenu);          TtaDestroyDialogue (BaseDialog + OptionMenu);
     
     /* result: items[ReturnOption].label @@@@@ */
     dec = GetDeclaration(t, items[ReturnOption].label);
     if (dec)
       {
         size = 1; /* @@@@ */
       }
     TtaFreeMemory (items);
   return FALSE;    return FALSE;
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
         //ReturnOption          //ReturnOption

Removed from v.1.66  
changed lines
  Added in v.1.67


Webmaster