diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-23 11:50:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-23 11:51:11 +0300 |
commit | e92baab34893f5a5b3d6f59238fdb7855b72d7fe (patch) | |
tree | 457da9be1190b111803eb4a92e7b9384f243cfcd /source/blender/editors/interface/interface_ops.c | |
parent | 37b5c52f111d4fe6e024c1cd66ba965b3b6bd83d (diff) | |
parent | d886e32270edb8273ec48a41d1bdcef1fe802835 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/interface/interface_ops.c')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 3c65f727133..5c2fb0e7aaa 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -4,7 +4,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2009 Blender Foundation. * All rights reserved. - * + * * Contributor(s): Blender Foundation, Joshua Leung * * ***** END GPL LICENSE BLOCK ***** @@ -78,7 +78,7 @@ static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op)) ui_theme_init_default(); ui_style_init_default(); WM_event_add_notifier(C, NC_WINDOW, NULL); - + return OPERATOR_FINISHED; } @@ -88,10 +88,10 @@ static void UI_OT_reset_default_theme(wmOperatorType *ot) ot->name = "Reset to Default Theme"; ot->idname = "UI_OT_reset_default_theme"; ot->description = "Reset to the default theme colors"; - + /* callbacks */ ot->exec = reset_default_theme_exec; - + /* flags */ ot->flag = OPTYPE_REGISTER; } @@ -109,7 +109,7 @@ static int copy_data_path_button_poll(bContext *C) if (ptr.id.data && ptr.data && prop) { path = RNA_path_from_ID_to_property(&ptr, prop); - + if (path) { MEM_freeN(path); return 1; @@ -255,7 +255,7 @@ static int reset_default_button_poll(bContext *C) int index; UI_context_active_but_prop_get(C, &ptr, &prop, &index); - + return (ptr.data && prop && RNA_property_editable(&ptr, prop)); } @@ -268,7 +268,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) /* try to reset the nominated setting to its default value */ UI_context_active_but_prop_get(C, &ptr, &prop, &index); - + /* if there is a valid property that is editable... */ if (ptr.data && prop && RNA_property_editable(&ptr, prop)) { if (RNA_property_reset(&ptr, prop, (all) ? -1 : index)) @@ -291,7 +291,7 @@ static void UI_OT_reset_default_button(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_UNDO; - + /* properties */ RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array"); } @@ -800,7 +800,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot) /* Reports to Textblock Operator ------------------------ */ -/* FIXME: this is just a temporary operator so that we can see all the reports somewhere +/* FIXME: this is just a temporary operator so that we can see all the reports somewhere * when there are too many to display... */ @@ -815,10 +815,10 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op)) Main *bmain = CTX_data_main(C); Text *txt; char *str; - + /* create new text-block to write to */ txt = BKE_text_add(bmain, "Recent Reports"); - + /* convert entire list to a display string, and add this to the text-block * - if commandline debug option enabled, show debug reports too * - otherwise, up to info (which is what users normally see) @@ -843,7 +843,7 @@ static void UI_OT_reports_to_textblock(wmOperatorType *ot) ot->name = "Reports to Text Block"; ot->idname = "UI_OT_reports_to_textblock"; ot->description = "Write the reports "; - + /* callbacks */ ot->poll = reports_to_text_poll; ot->exec = reports_to_text_exec; |