Diff for /Amaya/amaya/templates.c between versions 1.79 and 1.80

version 1.79, 2006/10/09 07:23:38 version 1.80, 2006/10/09 09:56:19
Line 294  ThotBool UseButtonClicked (NotifyElement Line 294  ThotBool UseButtonClicked (NotifyElement
     }      }
   if (nbitems > 0)    if (nbitems > 0)
     {      {
         TtaCancelSelection (doc);
       menuString = createMenuString (items, nbitems);        menuString = createMenuString (items, nbitems);
       TtaNewScrollPopup (BaseDialog + OptionMenu, TtaGetViewFrame (doc, 1),        TtaNewScrollPopup (BaseDialog + OptionMenu, TtaGetViewFrame (doc, 1),
                          NULL, nbitems, menuString , NULL, false, 'L');                           NULL, nbitems, menuString , NULL, false, 'L');
Line 321  ThotBool UseButtonClicked (NotifyElement Line 322  ThotBool UseButtonClicked (NotifyElement
               /* copy element dec->componentType.content */                /* copy element dec->componentType.content */
               comp = TtaCopyTree (dec->componentType.content, doc, doc, el);                comp = TtaCopyTree (dec->componentType.content, doc, doc, el);
               TtaInsertFirstChild (&comp, el, doc);                TtaInsertFirstChild (&comp, el, doc);
                 el = comp;
               /* @@@@@ */                /* @@@@@ */
               break;                break;
             case UnionNat :              case UnionNat :
Line 332  ThotBool UseButtonClicked (NotifyElement Line 334  ThotBool UseButtonClicked (NotifyElement
             }              }
         }          }
     }      }
     TtaSelectElement (doc, el);
   return TRUE;    return TRUE;
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
         return TRUE;          return TRUE;
Line 362  ThotBool OptionButtonClicked (NotifyElem Line 365  ThotBool OptionButtonClicked (NotifyElem
        elType.ElTypeNum != Template_EL_useSimple) ||         elType.ElTypeNum != Template_EL_useSimple) ||
       elType.ElSSchema != elType1.ElSSchema)        elType.ElSSchema != elType1.ElSSchema)
     return FALSE;      return FALSE;
   
     TtaCancelSelection (doc);
   grandChild = TtaGetFirstChild (child);    grandChild = TtaGetFirstChild (child);
   if (!grandChild)    if (!grandChild)
     /* the "use" element is empty. Instantiate it */      /* the "use" element is empty. Instantiate it */
Line 383  ThotBool OptionButtonClicked (NotifyElem Line 388  ThotBool OptionButtonClicked (NotifyElem
         }          }
       while (next);        while (next);
     }      }
     TtaSelectElement (doc, event->element);
   return TRUE; /* don't let Thot perform normal operation */    return TRUE; /* don't let Thot perform normal operation */
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
         return TRUE;          return TRUE;
Line 412  ThotBool RepeatButtonClicked (NotifyElem Line 418  ThotBool RepeatButtonClicked (NotifyElem
   t = (XTigerTemplate) Get (Templates_Dic, DocumentMeta[doc]->template_url);    t = (XTigerTemplate) Get (Templates_Dic, DocumentMeta[doc]->template_url);
   if (!t)    if (!t)
     return FALSE; // no template ?!?!      return FALSE; // no template ?!?!
   
     TtaCancelSelection (doc);
         types = "begining end";           types = "begining end"; 
         size = strlen (types);          size = strlen (types);
         giveItems (types, size, &items, &nbitems);          giveItems (types, size, &items, &nbitems);
Line 423  ThotBool RepeatButtonClicked (NotifyElem Line 431  ThotBool RepeatButtonClicked (NotifyElem
         TtaShowDialogue (BaseDialog + OptionMenu, FALSE);          TtaShowDialogue (BaseDialog + OptionMenu, FALSE);
         TtaWaitShowProcDialogue ();          TtaWaitShowProcDialogue ();
         TtaDestroyDialogue (BaseDialog + OptionMenu);          TtaDestroyDialogue (BaseDialog + OptionMenu);
     el = event->element;
   if (ReturnOption == 0 || ReturnOption == 1)    if (ReturnOption == 0 || ReturnOption == 1)
     {      {
       el = event->element;  
       child = TtaGetFirstChild (el);        child = TtaGetFirstChild (el);
       if (child)        if (child)
         {          {
Line 450  ThotBool RepeatButtonClicked (NotifyElem Line 458  ThotBool RepeatButtonClicked (NotifyElem
                     {                      {
                       child = TtaGetLastChild (el);                        child = TtaGetLastChild (el);
                       TtaInsertSibling (newEl, child, FALSE, doc);                        TtaInsertSibling (newEl, child, FALSE, doc);
                         el = newEl;
                     }                      }
                   TtaSetStructureChecking (oldStructureChecking, doc);                    TtaSetStructureChecking (oldStructureChecking, doc);
                 }                  }
             }              }
         }          }
     }      }
     TtaSelectElement (doc, el);
   return TRUE; /* don't let Thot perform normal operation */    return TRUE; /* don't let Thot perform normal operation */
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
         return TRUE;          return TRUE;

Removed from v.1.79  
changed lines
  Added in v.1.80


Webmaster