[Bf-blender-cvs] [4dc6259cfe4] master: Cleanup: doxy sections & function name

Campbell Barton noreply at git.blender.org
Sat Mar 23 02:19:14 CET 2019


Commit: 4dc6259cfe4ccf3fac1a14a9e37c81912c5925ef
Author: Campbell Barton
Date:   Sat Mar 23 11:55:36 2019 +1100
Branches: master
https://developer.blender.org/rB4dc6259cfe4ccf3fac1a14a9e37c81912c5925ef

Cleanup: doxy sections & function name

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list