OLD | NEW |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 3911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3922 else { | 3922 else { |
3923 const char *t = RNA_stru
ct_ui_description(mt->ext.srna); | 3923 const char *t = RNA_stru
ct_ui_description(mt->ext.srna); |
3924 if (t && t[0]) | 3924 if (t && t[0]) |
3925 tmp = BLI_strdup
(t); | 3925 tmp = BLI_strdup
(t); |
3926 } | 3926 } |
3927 } | 3927 } |
3928 } | 3928 } |
3929 } | 3929 } |
3930 } | 3930 } |
3931 else if (type == BUT_GET_RNA_LABEL_CONTEXT) { | 3931 else if (type == BUT_GET_RNA_LABEL_CONTEXT) { |
3932 const char *_tmp = NULL; | |
3933 if (but->rnaprop) | 3932 if (but->rnaprop) |
3934 » » » » _tmp = RNA_property_translation_context(but->rna
prop); | 3933 » » » » tmp = BLI_strdup(RNA_property_translation_contex
t(but->rnaprop)); |
3935 else if (but->optype) | 3934 else if (but->optype) |
3936 » » » » _tmp = RNA_struct_translation_context(but->optyp
e->srna); | 3935 » » » » tmp = BLI_strdup(RNA_struct_translation_context(
but->optype->srna)); |
3937 else if (ELEM(but->type, MENU, PULLDOWN)) { | 3936 else if (ELEM(but->type, MENU, PULLDOWN)) { |
3938 MenuType *mt = uiButGetMenuType(but); | 3937 MenuType *mt = uiButGetMenuType(but); |
3939 if (mt) | 3938 if (mt) |
3940 » » » » » _tmp = RNA_struct_translation_context(mt
->ext.srna); | 3939 » » » » » tmp = BLI_strdup(RNA_struct_translation_
context(mt->ext.srna)); |
3941 } | 3940 } |
3942 if (!_tmp) { /* _tmp == BLF_I18NCONTEXT_DEFAULT */ | |
3943 _tmp = BLF_I18NCONTEXT_DEFAULT_BPY; | |
3944 } | |
3945 tmp = BLI_strdup(_tmp); | |
3946 } | 3941 } |
3947 else if (ELEM3(type, BUT_GET_RNAENUM_IDENTIFIER, BUT_GET_RNAENUM
_LABEL, BUT_GET_RNAENUM_TIP)) { | 3942 else if (ELEM3(type, BUT_GET_RNAENUM_IDENTIFIER, BUT_GET_RNAENUM
_LABEL, BUT_GET_RNAENUM_TIP)) { |
3948 PointerRNA *ptr = NULL; | 3943 PointerRNA *ptr = NULL; |
3949 PropertyRNA *prop = NULL; | 3944 PropertyRNA *prop = NULL; |
3950 int value = 0; | 3945 int value = 0; |
3951 ························ | 3946 ························ |
3952 /* get the enum property... */ | 3947 /* get the enum property... */ |
3953 if (but->rnaprop && RNA_property_type(but->rnaprop) == P
ROP_ENUM) { | 3948 if (but->rnaprop && RNA_property_type(but->rnaprop) == P
ROP_ENUM) { |
3954 /* enum property */ | 3949 /* enum property */ |
3955 ptr = &but->rnapoin; | 3950 ptr = &but->rnapoin; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4034 void UI_reinit_font(void) | 4029 void UI_reinit_font(void) |
4035 { | 4030 { |
4036 uiStyleInit(); | 4031 uiStyleInit(); |
4037 } | 4032 } |
4038 | 4033 |
4039 void UI_exit(void) | 4034 void UI_exit(void) |
4040 { | 4035 { |
4041 ui_resources_free(); | 4036 ui_resources_free(); |
4042 } | 4037 } |
4043 | 4038 |
OLD | NEW |