*/}}

3 İşlemeler e1549ee0e8 ... 7f50e54aae

Yazar SHA1 Mesaj Tarih
  YimingWu 7f50e54aae language set 11 ay önce
  YimingWu 4c01633aff Why did keep the ui list detect in collection selector 11 ay önce
  YimingWu 737a5261a4 use zh-hans 11 ay önce
6 değiştirilmiş dosya ile 18 ekleme ve 14 silme
  1. 1 1
      la_interface.h
  2. 1 1
      la_kernel.c
  3. 0 1
      la_util.h
  4. 6 1
      resources/la_properties.c
  5. 2 2
      resources/la_translations.c
  6. 8 8
      resources/la_widgets.c

+ 1 - 1
la_interface.h

@@ -2295,7 +2295,7 @@ STRUCTURE(laManagedSaveExtra){
 #define LA_UDF_SHARE_POINTER(id) \
     la_UDFAppendSharedTypePointer("" #id, id)
 
-void la_MakeTranslations();
+void la_MakeTranslations_zh_hans();
 
 laCanvasTemplate *la_GetCanvasTemplate(char *TargetContainerID, char* TemplateID);
 laPropContainer* laUiHasExtraProps(laUiType *ut, int size, int Hyper);

+ 1 - 1
la_kernel.c

@@ -1321,7 +1321,7 @@ int laGetReadyWith(laInitArguments* ia){
     laAddExtraExtension(LA_FILETYPE_UDF,"udf",0ll);
 
     la_InitProgressWindow();
-    la_MakeTranslations();
+    la_MakeTranslations_zh_hans();
 
     //tns_RegisterResourcesForSoftwareRender();
     la_RegisterDefaultSignals();

+ 0 - 1
la_util.h

@@ -764,7 +764,6 @@ void transDumpMissMatchRecord(const char * filename);
 void transNewEntry(const char * Target, const char * replacement);
 char * transLate(char * Target);
 void transState(void* UNUSED, int val);
-void transInitTranslation_zh_cn();
 
 #include <stdlib.h>
 #include <stdbool.h>

+ 6 - 1
resources/la_properties.c

@@ -750,6 +750,11 @@ void laset_EnableGLDebug(void* unused, int e){ MAIN.EnableGLDebug=e; la_NotifyGL
 void laset_GLDebugSync(void* unused, int e){ MAIN.GLDebugSync=e; la_NotifyGLDebugChanges(); }
 void laset_GLDebugLevel(void* unused, int e){  MAIN.GLDebugLevel=e; la_NotifyGLDebugChanges(); }
 
+void laset_Language(void* unused, laTranslationNode* lang){
+    MAIN.Translation.CurrentLanguage = lang;
+    laRedrawAllWindows();
+}
+
 //void laget_DetachedPropContainerID(laProp* p, char * result) {
 //	strcpy(result, p->Detached->Container->Identifier);
 //}
@@ -1755,7 +1760,7 @@ void la_RegisterInternalProps(){
                 laAddEnumItem(ep, "no", "No", "Use original english string", 0);
                 laAddEnumItem(ep, "yes", "Yes", "Use translated string", 0);
             }
-            laAddSubGroup(p, "languages", "Language", "The language list in the software", "la_translation_language",0,0,laui_IdentifierOnly, offsetof(LA, Translation.CurrentLanguage), 0,0,0,0,0,0,offsetof(LA, Translation.Languages),LA_UDF_IGNORE);
+            laAddSubGroup(p, "languages", "Language", "The language list in the software", "la_translation_language",0,0,laui_IdentifierOnly, offsetof(LA, Translation.CurrentLanguage), 0,0,0,laset_Language,0,0,offsetof(LA, Translation.Languages),LA_UDF_IGNORE);
             
             laAddSubGroup(p, "resource_folders", "Resource Folders", "Folders to search for resources", "la_resource_folder",0,0,0,-1, 0,0,0,0,0,0,offsetof(LA, ResourceFolders), 0);
             ep = laAddEnumProperty(p, "manager_default_view", "UDF Manager Default View", "Prefer to show data blocks or files when saving", 0,0,0,0,0,offsetof(LA, ManagerDefaultView), 0,0,0,0,0,0,0,0,0,0);{

+ 2 - 2
resources/la_translations.c

@@ -514,8 +514,8 @@ static const char *entries[]={
 "Version","版本",
 0,0};
 
-void la_MakeTranslations(){
-    transSetLanguage("zh-CN");
+void la_MakeTranslations_zh_hans(){
+    transSetLanguage("zh-hans");
     for(int i=0;;i++){if(!entries[i*2])break;
         transNewEntry(entries[i*2],entries[i*2+1]);
     }

+ 8 - 8
resources/la_widgets.c

@@ -3238,14 +3238,14 @@ int OPMOD_CollectionSelector(laOperator *a, laEvent *e){
         return LA_FINISHED;
     }
 
-    int lx = e->x, ly = e->y;
-    laUiList *ToUil =
-        a->ToPanel->MenuRefer ? a->ToPanel->MenuRefer : &a->ToPanel->UI;
-    laUiList* uil = la_DetectUiListRecursive(ToUil, lx, ly, 10000, 0, 0, 0, 0, 0);
-    if (uil != ((laUiListDrawItem *)a->LocalUiLists.pFirst)->Target) {
-        printf("%d %d EXIT\n",((laUiListDrawItem *)a->LocalUiLists.pFirst)->Target, uil);
-        return LA_FINISHED;
-    }
+    //int lx = e->x, ly = e->y;
+    //laUiList *ToUil =
+    //    a->ToPanel->MenuRefer ? a->ToPanel->MenuRefer : &a->ToPanel->UI;
+    //laUiList* uil = la_DetectUiListRecursive(ToUil, lx, ly, 10000, 0, 0, 0, 0, 0);
+    //if (uil != ((laUiListDrawItem *)a->LocalUiLists.pFirst)->Target) {
+    //    printf("%d %d EXIT\n",((laUiListDrawItem *)a->LocalUiLists.pFirst)->Target, uil);
+    //    return LA_FINISHED;
+    //}
 
     if (e->type == LA_TIME_IDLE && !ui->State && !NoTooltip){
         int GX = e->x, GY = e->y; laLocalToWindow(a, a->ToPanel, &GX, &GY);