diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_header.c | 95 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_intern.h | 3 |
3 files changed, 0 insertions, 100 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 384ad3e919c..d3c3b78cc50 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -415,8 +415,6 @@ void ED_spacetype_text(void) art->init= text_header_area_init; art->draw= text_header_area_draw; - - text_header_register(art); BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index fe00b86e19f..1b8149cb5a2 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -155,101 +155,6 @@ static uiBlock *text_plugin_scriptsmenu(bContext *C, void *args_unused) } #endif -static void text_editmenu_viewmenu(bContext *C, uiLayout *layout, void *arg_unused) -{ - uiItemEnumO(layout, "Top of File", 0, "TEXT_OT_move", "type", FILE_TOP); - uiItemEnumO(layout, "Bottom of File", 0, "TEXT_OT_move", "type", FILE_BOTTOM); -} - -static void text_editmenu_selectmenu(bContext *C, uiLayout *layout, void *arg_unused) -{ - uiItemO(layout, NULL, 0, "TEXT_OT_select_all"); - uiItemO(layout, NULL, 0, "TEXT_OT_select_line"); -} - -static void text_editmenu_markermenu(bContext *C, uiLayout *layout, void *arg_unused) -{ - uiItemO(layout, NULL, 0, "TEXT_OT_markers_clear"); - uiItemO(layout, NULL, 0, "TEXT_OT_next_marker"); - uiItemO(layout, NULL, 0, "TEXT_OT_previous_marker"); -} - -static void text_formatmenu(const bContext *C, Menu *menu) -{ - uiLayout *layout= menu->layout; - - uiItemO(layout, NULL, 0, "TEXT_OT_indent"); - uiItemO(layout, NULL, 0, "TEXT_OT_unindent"); - - uiItemS(layout); - - uiItemO(layout, NULL, 0, "TEXT_OT_comment"); - uiItemO(layout, NULL, 0, "TEXT_OT_uncomment"); - - uiItemS(layout); - - uiItemMenuEnumO(layout, NULL, 0, "TEXT_OT_convert_whitespace", "type"); -} - -static void text_editmenu_to3dmenu(bContext *C, uiLayout *layout, void *arg_unused) -{ - uiItemBooleanO(layout, "One Object", 0, "TEXT_OT_to_3d_object", "split_lines", 0); - uiItemBooleanO(layout, "One Object Per Line", 0, "TEXT_OT_to_3d_object", "split_lines", 1); -} - -static int text_menu_edit_poll(bContext *C) -{ - return (CTX_data_edit_text(C) != NULL); -} - -static void text_editmenu(const bContext *C, Menu *menu) -{ - uiLayout *layout= menu->layout; - - uiItemO(layout, NULL, 0, "ED_OT_undo"); - uiItemO(layout, NULL, 0, "ED_OT_redo"); - - uiItemS(layout); - - uiItemO(layout, NULL, 0, "TEXT_OT_cut"); - uiItemO(layout, NULL, 0, "TEXT_OT_copy"); - uiItemO(layout, NULL, 0, "TEXT_OT_paste"); - - uiItemS(layout); - - uiItemMenuF(layout, "View", 0, text_editmenu_viewmenu); - uiItemMenuF(layout, "Select", 0, text_editmenu_selectmenu); - uiItemMenuF(layout, "Markers", 0, text_editmenu_markermenu); - - uiItemS(layout); - - uiItemO(layout, NULL, 0, "TEXT_OT_jump"); - uiItemO(layout, NULL, 0, "TEXT_OT_properties"); - - uiItemS(layout); - - uiItemMenuF(layout, "Text to 3D Object", 0, text_editmenu_to3dmenu); -} - -/********************** header buttons ***********************/ - -void text_header_register(ARegionType *art) -{ - MenuType *mt; - - mt= MEM_callocN(sizeof(MenuType), "spacetype text menu edit"); - strcpy(mt->idname, "TEXT_MT_edit"); - strcpy(mt->label, "Edit"); - mt->draw= text_editmenu; - BLI_addhead(&art->menutypes, mt); - - mt= MEM_callocN(sizeof(MenuType), "spacetype text menu format"); - strcpy(mt->idname, "TEXT_MT_format"); - strcpy(mt->label, "Format"); - mt->draw= text_formatmenu; - BLI_addhead(&art->menutypes, mt); -} - /************************** properties ******************************/ ARegion *text_has_properties_region(ScrArea *sa) diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index 259811aee0f..31d29ac7f17 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -41,9 +41,6 @@ struct TextLine; struct wmOperatorType; struct wmWindowManager; -/* text_header.c */ -void text_header_register(struct ARegionType *art); - /* text_draw.c */ void draw_text_main(struct SpaceText *st, struct ARegion *ar); |