diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-23 03:55:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-23 04:10:23 +0300 |
commit | 4dc6259cfe4ccf3fac1a14a9e37c81912c5925ef (patch) | |
tree | 7bf67b7d72e512c75ac9cb4b585f22c811cedc39 /source/blender/editors/interface | |
parent | faecac0b5e14ef9f79b02b379980a9b8a919a121 (diff) |
Cleanup: doxy sections & function name
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 86f672f9779..f859df558ca 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2464,9 +2464,15 @@ static void ui_but_paste(bContext *C, uiBut *but, uiHandleButtonData *data, cons MEM_freeN((void *)buf_paste); } -/** - * Password Text - * ============= +void ui_but_clipboard_free(void) +{ + curvemapping_free_data(&but_copypaste_curve); +} + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Button Text Password * * Functions to convert password strings that should not be displayed * to asterisk representation (e.g. 'mysecretpasswd' -> '*************') @@ -2475,7 +2481,8 @@ static void ui_but_paste(bContext *C, uiBut *but, uiHandleButtonData *data, cons * the cursor position and selection start/end. * * \note: remapping is used, because password could contain UTF-8 characters. - */ + * + * \{ */ static int ui_text_position_from_hidden(uiBut *but, int pos) { @@ -2534,7 +2541,13 @@ void ui_but_text_password_hide(char password_str[UI_MAX_PASSWORD_STR], uiBut *bu } } -static void ui_but_text_clear(bContext *C, uiBut *but, uiHandleButtonData *data) +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Button Text Selection/Editing + * \{ */ + +static void ui_textedit_string_clear_and_exit(bContext *C, uiBut *but, uiHandleButtonData *data) { /* most likely NULL, but let's check, and give it temp zero string */ if (!data->str) { @@ -2546,17 +2559,6 @@ static void ui_but_text_clear(bContext *C, uiBut *but, uiHandleButtonData *data) button_activate_state(C, but, BUTTON_STATE_EXIT); } -void ui_but_clipboard_free(void) -{ - curvemapping_free_data(&but_copypaste_curve); -} - -/** \} */ - -/* -------------------------------------------------------------------- */ -/** \name Button Text Selection/Editing - * \{ */ - static void ui_textedit_string_ensure_max_length(uiBut *but, uiHandleButtonData *data, int maxlen) { BLI_assert(data->is_str_dynamic); @@ -3985,7 +3987,7 @@ static int ui_do_but_TEX( const bool has_icon_extra = ui_but_icon_extra_get(but) == UI_BUT_ICONEXTRA_CLEAR; if (has_icon_extra && ui_but_is_mouse_over_icon_extra(data->region, but, &event->x)) { - ui_but_text_clear(C, but, data); + ui_textedit_string_clear_and_exit(C, but, data); } else { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); @@ -4022,7 +4024,7 @@ static int ui_do_but_SEARCH_UNLINK( if (event->val == KM_RELEASE) { /* unlink */ if (extra_icon_type == UI_BUT_ICONEXTRA_CLEAR) { - ui_but_text_clear(C, but, data); + ui_textedit_string_clear_and_exit(C, but, data); } /* eyedropper */ else if (extra_icon_type == UI_BUT_ICONEXTRA_EYEDROPPER) { |