Diff for /Amaya/amaya/templates.c between versions 1.222 and 1.223

version 1.222, 2008/11/18 15:35:45 version 1.223, 2008/11/19 08:42:36
Line 842  static char* QueryStringFromMenu (Docume Line 842  static char* QueryStringFromMenu (Docume
 }  }
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
   
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
 void FillInsertableElemList (Document doc, Element elem, DLList list);  void FillInsertableElemList (Document doc, Element elem, DLList list);
 #endif /* AMAYA_DEBUG */  #endif /* TEMPLATE_DEBUG */
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 char *Template_GetListTypes (XTigerTemplate t, Element el)  char *Template_GetListTypes (XTigerTemplate t, Element el)
Line 915  ThotBool BagButtonClicked (NotifyElement Line 915  ThotBool BagButtonClicked (NotifyElement
       listtypes = Template_GetListTypes (t, bagEl);        listtypes = Template_GetListTypes (t, bagEl);
       if (listtypes)        if (listtypes)
         {          {
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
           printf("BagButtonClicked : \n  > %s\n", listtypes);            printf("BagButtonClicked : \n  > %s\n", listtypes);
           //      {            //      {
           //        DLList list = DLList_Create();            //        DLList list = DLList_Create();
Line 929  ThotBool BagButtonClicked (NotifyElement Line 929  ThotBool BagButtonClicked (NotifyElement
           //        }            //        }
           //        DLList_Destroy(list);            //        DLList_Destroy(list);
           //      }            //      }
 #endif /* AMAYA_DEBUG */  #endif /* TEMPLATE_DEBUG */
           result = QueryStringFromMenu (doc, listtypes);            result = QueryStringFromMenu (doc, listtypes);
           TtaFreeMemory (listtypes);            TtaFreeMemory (listtypes);
           if (result)            if (result)
Line 1094  ThotBool RepeatButtonClicked (NotifyElem Line 1094  ThotBool RepeatButtonClicked (NotifyElem
           listtypes = Template_GetListTypes (t, firstEl);            listtypes = Template_GetListTypes (t, firstEl);
           if (listtypes)            if (listtypes)
             {              {
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
               printf("RepeatButtonClicked : \n  > %s\n", listtypes);                printf("RepeatButtonClicked : \n  > %s\n", listtypes);
 #endif /* AMAYA_DEBUG */  #endif /* TEMPLATE_DEBUG */
   
               result = QueryStringFromMenu (doc, listtypes);                result = QueryStringFromMenu (doc, listtypes);
               TtaFreeMemory (listtypes);                TtaFreeMemory (listtypes);
Line 1166  ThotBool UseButtonClicked (NotifyElement Line 1166  ThotBool UseButtonClicked (NotifyElement
       if (types)        if (types)
         {          {
           listtypes = Template_ExpandTypes(t, types, NULL, FALSE);            listtypes = Template_ExpandTypes(t, types, NULL, FALSE);
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
           printf("UseButtonClicked : \n  > %s\n", listtypes);            printf("UseButtonClicked : \n  > %s\n", listtypes);
 #endif /* AMAYA_DEBUG */  #endif /* TEMPLATE_DEBUG */
   
           result = QueryStringFromMenu(doc, listtypes);            result = QueryStringFromMenu(doc, listtypes);
           if (result)            if (result)
Line 1336  void Template_FillFromDocument (Document Line 1336  void Template_FillFromDocument (Document
   
   if (t)    if (t)
     {      {
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
       printf("Template_FillFromDocument state: %d\n", t->state);        printf("Template_FillFromDocument state: %d\n", t->state);
 #endif  #endif
       SetTemplateDocument (t, doc);        SetTemplateDocument (t, doc);
       Template_PrepareTemplate(t, doc);        Template_PrepareTemplate(t, doc);
       if (IsTemplateInstanceDocument (doc))        if (IsTemplateInstanceDocument (doc))
         {          {
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
           printf("  > instance\n");            printf("  > instance\n");
 #endif  #endif
           // fix all access rights in the instance            // fix all access rights in the instance
Line 1352  void Template_FillFromDocument (Document Line 1352  void Template_FillFromDocument (Document
           Template_FixAccessRight (t, root, doc);            Template_FixAccessRight (t, root, doc);
           TtaUpdateAccessRightInViews (doc, root);            TtaUpdateAccessRightInViews (doc, root);
         }          }
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
       else if (t->state&templLibraryFlag)        else if (t->state&templLibraryFlag)
         printf("  > library\n");          printf("  > library\n");
       else if (t->state&templTemplate)        else if (t->state&templTemplate)
Line 1363  void Template_FillFromDocument (Document Line 1363  void Template_FillFromDocument (Document
       TtaSetDocumentUnmodified (doc);        TtaSetDocumentUnmodified (doc);
       UpdateTemplateMenus (doc);        UpdateTemplateMenus (doc);
   
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
       DumpAllDeclarations();        DumpAllDeclarations();
 #endif /* AMAYA_DEBUG */  #endif /* TEMPLATE_DEBUG */
     }      }
 #endif /* TEMPLATES */  #endif /* TEMPLATES */
 }  }
Line 1382  ThotBool Template_CheckAndPrepareTemplat Line 1382  ThotBool Template_CheckAndPrepareTemplat
   
   if (IsXTiger(docURL))    if (IsXTiger(docURL))
     {      {
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
       printf("Template_CheckAndPrepareTemplate %s templTemplate\n", docURL);        printf("Template_CheckAndPrepareTemplate %s templTemplate\n", docURL);
 #endif  #endif
       t = LookForXTigerTemplate (docURL);        t = LookForXTigerTemplate (docURL);
Line 1390  ThotBool Template_CheckAndPrepareTemplat Line 1390  ThotBool Template_CheckAndPrepareTemplat
     }      }
   else if (IsXTigerLibrary(docURL))    else if (IsXTigerLibrary(docURL))
     {      {
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
       printf("Template_CheckAndPrepareTemplate %s templLibrary\n", docURL);        printf("Template_CheckAndPrepareTemplate %s templLibrary\n", docURL);
 #endif  #endif
       t = LookForXTigerLibrary (docURL);        t = LookForXTigerLibrary (docURL);
Line 1585  ThotBool TemplateElementWillBeCreated (N Line 1585  ThotBool TemplateElementWillBeCreated (N
   if (event->info == 1)    if (event->info == 1)
     return FALSE;      return FALSE;
   
 #ifdef AMAYA_DEBUG  #ifdef TEMPLATE_DEBUG
   printf("TemplateElementWillBeCreated\n");    printf("TemplateElementWillBeCreated\n");
 #endif  #endif
   if (!TtaGetDocumentAccessMode(doc))    if (!TtaGetDocumentAccessMode(doc))

Removed from v.1.222  
changed lines
  Added in v.1.223


Webmaster