From 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 10 Oct 2020 18:19:55 +1100 Subject: Cleanup: use C comments for descriptive text Follow our code style guide by using C-comments for text descriptions. --- source/blender/windowmanager/intern/wm_event_system.c | 9 +++++---- source/blender/windowmanager/intern/wm_jobs.c | 16 +++++++++++++--- source/blender/windowmanager/intern/wm_operators.c | 6 ++++-- source/blender/windowmanager/intern/wm_stereo.c | 2 +- source/blender/windowmanager/intern/wm_window.c | 6 +++--- 5 files changed, 26 insertions(+), 13 deletions(-) (limited to 'source/blender/windowmanager/intern') diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 76ec3bba368..afd88d6a680 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -453,7 +453,8 @@ void wm_event_do_notifiers(bContext *C) else if (note->data == ND_WORKSPACE_DELETE) { WorkSpace *workspace = note->reference; - ED_workspace_delete(workspace, CTX_data_main(C), C, wm); // XXX hrms, think this over! + ED_workspace_delete( + workspace, CTX_data_main(C), C, wm); /* XXX hrms, think this over! */ if (G.debug & G_DEBUG_EVENTS) { printf("%s: Workspace delete %p\n", __func__, workspace); } @@ -473,7 +474,7 @@ void wm_event_do_notifiers(bContext *C) WorkSpace *workspace = WM_window_get_active_workspace(win); WorkSpaceLayout *layout = note->reference; - ED_workspace_layout_delete(workspace, layout, C); // XXX hrms, think this over! + ED_workspace_layout_delete(workspace, layout, C); /* XXX hrms, think this over! */ if (G.debug & G_DEBUG_EVENTS) { printf("%s: screen delete %p\n", __func__, note->reference); } @@ -2262,7 +2263,7 @@ static int wm_handler_fileselect_do(bContext *C, wm_window_close(C, wm, temp_win); - CTX_wm_window_set(C, ctx_win); // wm_window_close() NULLs. + CTX_wm_window_set(C, ctx_win); /* #wm_window_close() NULLs. */ /* Some operators expect a drawable context (for EVT_FILESELECT_EXEC) */ wm_window_make_drawable(wm, ctx_win); /* Ensure correct cursor position, otherwise, popups may close immediately after @@ -3458,7 +3459,7 @@ void WM_event_fileselect_event(wmWindowManager *wm, void *ophandle, int eventval event.type = EVT_FILESELECT; event.val = eventval; - event.customdata = ophandle; // only as void pointer type check + event.customdata = ophandle; /* Only as void pointer type check. */ wm_event_add(win, &event); } diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index c9b125901e7..189657f7aa3 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -443,7 +443,11 @@ static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test) /* Possible suspend ourselves, waiting for other jobs, or de-suspend. */ test->suspended = suspend; - // if (suspend) printf("job suspended: %s\n", test->name); +#if 0 + if (suspend) { + printf("job suspended: %s\n", test->name); + } +#endif } /** @@ -679,8 +683,14 @@ void wm_jobs_timer(wmWindowManager *wm, wmTimer *wt) wm_job->run_customdata = NULL; wm_job->run_free = NULL; - // if (wm_job->stop) printf("job ready but stopped %s\n", wm_job->name); - // else printf("job finished %s\n", wm_job->name); +#if 0 + if (wm_job->stop) { + printf("job ready but stopped %s\n", wm_job->name); + } + else { + printf("job finished %s\n", wm_job->name); + } +#endif if (G.debug & G_DEBUG_JOBS) { printf("Job '%s' finished in %f seconds\n", diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 9d99e671369..f802b8f9746 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -367,7 +367,7 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr for (link = lb.first; link; link = link->next) { const char *identifier = link->data; PointerRNA ctx_item_ptr = { - {0}}; // CTX_data_pointer_get(C, identifier); // XXX, this isnt working + {0}}; /* CTX_data_pointer_get(C, identifier); */ /* XXX, this isn't working. */ if (ctx_item_ptr.type == NULL) { continue; @@ -3893,7 +3893,9 @@ static void gesture_box_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_assign(keymap, "NODE_OT_viewer_border"); WM_modalkeymap_assign(keymap, "PAINT_OT_hide_show"); WM_modalkeymap_assign(keymap, "OUTLINER_OT_select_box"); - // WM_modalkeymap_assign(keymap, "SCREEN_OT_box_select"); // template +#if 0 /* Template. */ + WM_modalkeymap_assign(keymap, "SCREEN_OT_box_select"); +#endif WM_modalkeymap_assign(keymap, "SEQUENCER_OT_select_box"); WM_modalkeymap_assign(keymap, "SEQUENCER_OT_view_ghost_border"); WM_modalkeymap_assign(keymap, "UV_OT_select_box"); diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 948b6854b02..be6f1079279 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -70,7 +70,7 @@ void wm_stereo3d_draw_sidebyside(wmWindow *win, int view) soffx = 0; } } - else { // RIGHT_LEFT_ID + else { /* #RIGHT_LEFT_ID */ if (cross_eyed) { soffx = 0; } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index e8575374022..8db8694e8a6 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1495,15 +1495,15 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr break; } case GHOST_kEventNativeResolutionChange: { - // only update if the actual pixel size changes + /* Only update if the actual pixel size changes. */ float prev_pixelsize = U.pixelsize; WM_window_set_dpi(win); if (U.pixelsize != prev_pixelsize) { BKE_icon_changed(WM_window_get_active_screen(win)->id.icon_id); - // close all popups since they are positioned with the pixel - // size baked in and it's difficult to correct them + /* Close all popups since they are positioned with the pixel + * size baked in and it's difficult to correct them. */ CTX_wm_window_set(C, win); UI_popup_handlers_remove_all(C, &win->modalhandlers); CTX_wm_window_set(C, NULL); -- cgit v1.2.3