From 1738c45b87b9489f22d8e9bd73dc62eef906ff17 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 9 Jun 2023 02:41:57 +0300 Subject: [PATCH 34/34] sdl2: Strip trailing spaces from source files See osdn #48195 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/action_dialog.c | 8 +++---- client/gui-sdl2/canvas.c | 2 +- client/gui-sdl2/citydlg.c | 10 ++++---- client/gui-sdl2/cityrep.c | 2 +- client/gui-sdl2/cma_fe.c | 2 +- client/gui-sdl2/connectdlg.c | 6 ++--- client/gui-sdl2/dialogs.c | 28 +++++++++++----------- client/gui-sdl2/diplodlg.c | 4 ++-- client/gui-sdl2/gotodlg.c | 2 +- client/gui-sdl2/gui_main.c | 2 +- client/gui-sdl2/gui_mouse.c | 6 ++--- client/gui-sdl2/gui_tilespec.c | 2 +- client/gui-sdl2/mapctrl.c | 42 ++++++++++++++++----------------- client/gui-sdl2/mapview.c | 8 +++---- client/gui-sdl2/menu.c | 2 +- client/gui-sdl2/plrdlg.c | 2 +- client/gui-sdl2/repodlgs.c | 4 ++-- client/gui-sdl2/themecolors.c | 2 +- client/gui-sdl2/widget.c | 6 ++--- client/gui-sdl2/widget_edit.c | 12 +++++----- client/gui-sdl2/widget_label.c | 6 ++--- client/gui-sdl2/wldlg.c | 2 +- 22 files changed, 80 insertions(+), 80 deletions(-) diff --git a/client/gui-sdl2/action_dialog.c b/client/gui-sdl2/action_dialog.c index 7281afcb5e..0fdd8a6353 100644 --- a/client/gui-sdl2/action_dialog.c +++ b/client/gui-sdl2/action_dialog.c @@ -64,7 +64,7 @@ struct small_diplomat_dialog { action_id act_id; struct small_dialog *pdialog; }; - + extern bool is_unit_move_blocked; void popdown_diplomat_dialog(void); @@ -522,7 +522,7 @@ static int spy_steal_popup_shared(struct widget *pwidget) if (count > max_row) { diplomat_dlg->pdialog->active_widget_list = diplomat_dlg->pdialog->end_active_widget_list; count = max_row; - idx = create_vertical_scrollbar(diplomat_dlg->pdialog, col, count, TRUE, TRUE); + idx = create_vertical_scrollbar(diplomat_dlg->pdialog, col, count, TRUE, TRUE); } } else { count = 1; @@ -981,7 +981,7 @@ void popup_action_selection(struct unit *actor_unit, pstr->style |= TTF_STYLE_BOLD; pwindow = create_window_skeleton(NULL, pstr, 0); - + pwindow->action = diplomat_dlg_window_callback; set_wstate(pwindow, FC_WS_NORMAL); @@ -1322,7 +1322,7 @@ void popup_sabotage_dialog(struct unit *actor, struct city *pcity, } is_unit_move_blocked = TRUE; - + diplomat_dlg = fc_calloc(1, sizeof(struct diplomat_dialog)); diplomat_dlg->actor_unit_id = actor->id; diplomat_dlg->target_ids[ATK_CITY] = pcity->id; diff --git a/client/gui-sdl2/canvas.c b/client/gui-sdl2/canvas.c index 8ba1c1f1c1..d2a3e8d5a0 100644 --- a/client/gui-sdl2/canvas.c +++ b/client/gui-sdl2/canvas.c @@ -42,7 +42,7 @@ **************************************************************************/ struct canvas *canvas_create(int width, int height) { - struct canvas *result = fc_malloc(sizeof(*result)); + struct canvas *result = fc_malloc(sizeof(*result)); result->surf = create_surf(width, height, SDL_SWSURFACE); diff --git a/client/gui-sdl2/citydlg.c b/client/gui-sdl2/citydlg.c index 0ec3f5670f..0b00e6daff 100644 --- a/client/gui-sdl2/citydlg.c +++ b/client/gui-sdl2/citydlg.c @@ -130,7 +130,7 @@ static void rebuild_citydlg_title_str(struct widget *pwindow, struct city *pcity one. **************************************************************************/ struct impr_type *get_building_for_effect(enum effect_type effect_type) -{ +{ improvement_iterate(pimprove) { if (building_has_effect(pimprove, effect_type)) { return pimprove; @@ -1571,7 +1571,7 @@ void enable_city_dlg_widgets(void) } /* while */ } } - + if (!city_can_buy(pcity_dlg->pcity) && pcity_dlg->buy_button) { set_wstate(pcity_dlg->buy_button, FC_WS_DISABLED); } @@ -2366,7 +2366,7 @@ static void redraw_happiness_city_dialog(const struct widget *city_window, alphablit(tmp, NULL, city_window->dst->surface, &dest, 255); dest.y += (tmp->h + 1); - + FREESURFACE(tmp); } } requirement_vector_iterate_end; @@ -3210,7 +3210,7 @@ static void redraw_city_dialog(struct city *pcity) FREESURFACE(buf); FREESURFACE(buf2); - + if (count) { if (count > 11) { step = (adj_size(154) - icons->big_shield->h) / adj_size((10 + count - 11)); @@ -3436,7 +3436,7 @@ static void rebuild_imprm_list(struct city *pcity) pcity_dlg->imprv->active_widget_list = NULL; FC_FREE(pcity_dlg->imprv->scroll); } - + add_dock = pcity_dlg->add_point; buf = last = add_dock; diff --git a/client/gui-sdl2/cityrep.c b/client/gui-sdl2/cityrep.c index 07f4baf4b6..42cb82c249 100644 --- a/client/gui-sdl2/cityrep.c +++ b/client/gui-sdl2/cityrep.c @@ -602,7 +602,7 @@ static void real_info_city_report_dialog_update(void) pbuf->data.city = pcity; pbuf->action = popup_buy_production_from_city_report_callback; if (city_can_buy(pcity)) { - set_wstate(pbuf, FC_WS_NORMAL); + set_wstate(pbuf, FC_WS_NORMAL); } count += COL; diff --git a/client/gui-sdl2/cma_fe.c b/client/gui-sdl2/cma_fe.c index 69cd72d3f9..50916912fa 100644 --- a/client/gui-sdl2/cma_fe.c +++ b/client/gui-sdl2/cma_fe.c @@ -549,7 +549,7 @@ static void popup_load_del_presets_dialog(bool load, struct widget *button) } add_to_gui_list(MAX_ID - i, buf); - + if (i > 10) { set_wflag(buf, WF_HIDDEN); } diff --git a/client/gui-sdl2/connectdlg.c b/client/gui-sdl2/connectdlg.c index b5a99adda3..ae660ae19c 100644 --- a/client/gui-sdl2/connectdlg.c +++ b/client/gui-sdl2/connectdlg.c @@ -78,7 +78,7 @@ static void popup_new_user_passwd_dialog(const char *message); Provide a packet handler for packet_game_load **************************************************************************/ void handle_game_load(bool load_successful, const char *filename) -{ +{ /* PORTME */ } @@ -286,7 +286,7 @@ void popup_connection_dialog(bool lan_scan) if (!server_list) { if (lan_scan) { - output_window_append(ftc_client, _("No LAN servers found")); + output_window_append(ftc_client, _("No LAN servers found")); } else { output_window_append(ftc_client, _("No public servers found")); } @@ -749,7 +749,7 @@ static int send_passwd_callback(struct widget *pwidget) widget_redraw(pwidget); widget_mark_dirty(pwidget); - + flush_dirty(); send_packet_authentication_reply(&client.conn, &reply); diff --git a/client/gui-sdl2/dialogs.c b/client/gui-sdl2/dialogs.c index 467b3a27ac..fb76125f99 100644 --- a/client/gui-sdl2/dialogs.c +++ b/client/gui-sdl2/dialogs.c @@ -601,12 +601,12 @@ void popup_notify_dialog(const char *caption, const char *headline, FREESURFACE(headline_surf); FREESURFACE(lines_surf); - /* exit button */ + /* Exit button */ buf = pwindow->prev; buf->size.x = area.x + area.w - buf->size.w - 1; buf->size.y = pwindow->size.y + adj_size(2); - /* redraw */ + /* Redraw */ redraw_group(notify_dlg->begin_widget_list, pwindow, 0); widget_flush(pwindow); } @@ -629,7 +629,7 @@ static int upgrade_unit_window_callback(struct widget *pwindow) } /**********************************************************************//** - User interacted with upgrade unit dialog cancel -button + User interacted with upgrade unit dialog cancel -button **************************************************************************/ static int cancel_upgrade_unit_callback(struct widget *pwidget) { @@ -1224,7 +1224,7 @@ void unit_select_dialog_popup(struct tile *ptile) w -= n; } - /* exit button */ + /* Exit button */ buf = pwindow->prev; buf->size.x = area.x + area.w - buf->size.w - 1; buf->size.y = pwindow->size.y + adj_size(2); @@ -1241,7 +1241,7 @@ void unit_select_dialog_popup(struct tile *ptile) } /* ==================================================== */ - /* redraw */ + /* Redraw */ redraw_group(unit_select_dlg->begin_widget_list, pwindow, 0); widget_flush(pwindow); @@ -2152,13 +2152,13 @@ void popup_advanced_terrain_dialog(struct tile *ptile, units_h = 0; } - /* exit button */ + /* Exit button */ buf = pwindow->prev; buf->size.x = area.x + area.w - buf->size.w - 1; buf->size.y = pwindow->size.y + adj_size(2); - /* terrain info */ + /* Terrain info */ buf = buf->prev; buf->size.x = area.x + 1; @@ -2207,7 +2207,7 @@ void popup_advanced_terrain_dialog(struct tile *ptile, } /* -------------------- */ - /* redraw */ + /* Redraw */ redraw_group(advanced_terrain_dlg->begin_widget_list, pwindow, 0); widget_flush(pwindow); @@ -2360,21 +2360,21 @@ void popup_pillage_dialog(struct unit *punit, bv_extras extras) put_window_near_map_tile(pwindow, pwindow->size.w, pwindow->size.h, unit_tile(punit)); - /* setup widget size and start position */ + /* Setup widget size and start position */ - /* exit button */ + /* Exit button */ buf = pwindow->prev; buf->size.x = area.x + area.w - buf->size.w - 1; buf->size.y = pwindow->size.y + adj_size(2); - /* first special to pillage */ + /* First special to pillage */ buf = buf->prev; setup_vertical_widgets_position(1, area.x, area.y + 1, area.w, 0, pillage_dlg->begin_widget_list, buf); /* --------------------- */ - /* redraw */ + /* Redraw */ redraw_group(pillage_dlg->begin_widget_list, pwindow, 0); widget_flush(pwindow); @@ -3499,7 +3499,7 @@ void popup_races_dialog(struct player *pplayer) create_line(pwindow->theme, area.x, natinfo_y + natinfo_h - adj_size(7) - buf->prev->size.h - adj_size(10), - area.w - 1, + area.w - 1, natinfo_y + natinfo_h - adj_size(7) - buf->prev->size.h - adj_size(10), get_theme_color(COLOR_THEME_NATIONDLG_FRAME)); @@ -3682,7 +3682,7 @@ bool handmade_scenario_warning(void) void real_multipliers_dialog_update(void *unused) { /* PORTME */ -} +} /**********************************************************************//** Unit wants to get into some transport on given tile. diff --git a/client/gui-sdl2/diplodlg.c b/client/gui-sdl2/diplodlg.c index 91ee5b47cd..03fd68f392 100644 --- a/client/gui-sdl2/diplodlg.c +++ b/client/gui-sdl2/diplodlg.c @@ -296,7 +296,7 @@ static int vision_callback(struct widget *pwidget) if (!(pdialog = get_diplomacy_dialog(player_by_number(pwidget->data.cont->id1)))) { pdialog = get_diplomacy_dialog(player_by_number(pwidget->data.cont->id0)); } - + dsend_packet_diplomacy_create_clause_req(&client.conn, player_number(pdialog->treaty->plr1), pwidget->data.cont->id0, @@ -1280,7 +1280,7 @@ static void popdown_diplomacy_dialog(struct diplomacy_dialog *pdialog) pdialog->pdialog->end_widget_list); FC_FREE(pdialog->pdialog->scroll); - FC_FREE(pdialog->pdialog); + FC_FREE(pdialog->pdialog); FC_FREE(pdialog); } } diff --git a/client/gui-sdl2/gotodlg.c b/client/gui-sdl2/gotodlg.c index e695fc85f9..719258c9df 100644 --- a/client/gui-sdl2/gotodlg.c +++ b/client/gui-sdl2/gotodlg.c @@ -109,7 +109,7 @@ static int goto_city_callback(struct widget *pwidget) { if (PRESSED_EVENT(main_data.event)) { struct city *pdestcity = game_city_by_number(MAX_ID - pwidget->id); - + if (pdestcity) { struct unit *punit = head_of_units_in_focus(); diff --git a/client/gui-sdl2/gui_main.c b/client/gui-sdl2/gui_main.c index 2f911116db..0a59ae088b 100644 --- a/client/gui-sdl2/gui_main.c +++ b/client/gui-sdl2/gui_main.c @@ -478,7 +478,7 @@ static void update_button_hold_state(void) button_behavior.hold_state = MB_HOLD_LONG; button_down_on_map(&button_behavior); } - } + } } return; diff --git a/client/gui-sdl2/gui_mouse.c b/client/gui-sdl2/gui_mouse.c index 3974f7f375..f0feac5b96 100644 --- a/client/gui-sdl2/gui_mouse.c +++ b/client/gui-sdl2/gui_mouse.c @@ -126,7 +126,7 @@ void draw_mouse_cursor(void) } else { area = (SDL_Rect){0, 0, 0, 0}; } - } + } } /**********************************************************************//** @@ -163,7 +163,7 @@ void load_cursors(void) **************************************************************************/ void unload_cursors(void) { - enum cursor_type cursor; + enum cursor_type cursor; int frame; for (cursor = 0; cursor < CURSOR_LAST; cursor++) { @@ -177,7 +177,7 @@ void unload_cursors(void) } /**********************************************************************//** - This function is used to animate the mouse cursor. + This function is used to animate the mouse cursor. **************************************************************************/ void animate_mouse_cursor(void) { diff --git a/client/gui-sdl2/gui_tilespec.c b/client/gui-sdl2/gui_tilespec.c index d688ef1cde..aef77d83ef 100644 --- a/client/gui-sdl2/gui_tilespec.c +++ b/client/gui-sdl2/gui_tilespec.c @@ -402,7 +402,7 @@ void setup_auxiliary_tech_icons(void) FREESURFACE(surf); - /* TRANS: Future Technology */ + /* TRANS: Future Technology */ copy_chars_to_utf8_str(pstr, _("FT")); surf = create_text_surf_from_utf8(pstr); blit_entire_src(surf, future_tech_icon, diff --git a/client/gui-sdl2/mapctrl.c b/client/gui-sdl2/mapctrl.c index cb77bfeb03..5f8565f38f 100644 --- a/client/gui-sdl2/mapctrl.c +++ b/client/gui-sdl2/mapctrl.c @@ -2538,7 +2538,7 @@ bool map_event_handler(SDL_Keysym key) } return FALSE; - /* show national borders - Ctrl+b */ + /* Show national borders - Ctrl+b */ case SDLK_b: if (LCTRL || RCTRL) { key_map_borders_toggle(); @@ -2546,17 +2546,17 @@ bool map_event_handler(SDL_Keysym key) return FALSE; case SDLK_n: - /* show native tiles - Ctrl+Shift+n */ + /* Show native tiles - Ctrl+Shift+n */ if ((LCTRL || RCTRL) && (LSHIFT || RSHIFT)) { key_map_native_toggle(); } else if (LCTRL || RCTRL) { - /* show city names - Ctrl+n */ + /* Show city names - Ctrl+n */ key_city_names_toggle(); } return FALSE; - /* show city growth Ctrl+o */ - /* show pollution - Ctrl+Shift+o */ + /* Show city growth Ctrl+o */ + /* Show pollution - Ctrl+Shift+o */ case SDLK_o: if (LCTRL || RCTRL) { if (LSHIFT || RSHIFT) { @@ -2567,69 +2567,69 @@ bool map_event_handler(SDL_Keysym key) } return FALSE; - /* show bases - Ctrl+Shift+f */ + /* Show bases - Ctrl+Shift+f */ case SDLK_f: if ((LCTRL || RCTRL) && (LSHIFT || RSHIFT)) { request_toggle_bases(); } return FALSE; - /* show city productions - Ctrl+p */ + /* Show city productions - Ctrl+p */ case SDLK_p: if (LCTRL || RCTRL) { key_city_productions_toggle(); } return FALSE; - /* show city trade routes - Ctrl+d */ + /* Show city trade routes - Ctrl+d */ case SDLK_d: if (LCTRL || RCTRL) { key_city_trade_routes_toggle(); } return FALSE; - /* *** some additional shortcuts that work in the SDL client only *** */ + /* *** Some additional shortcuts that work in the SDL client only *** */ - /* show terrain - Ctrl+Shift+t */ + /* Show terrain - Ctrl+Shift+t */ case SDLK_t: if ((LCTRL || RCTRL) && (LSHIFT || RSHIFT)) { key_terrain_toggle(); } return FALSE; - /* (show coastline) */ + /* (Show coastline) */ - /* (show roads and rails) */ + /* (Show roads and rails) */ - /* show irrigation - Ctrl+i */ + /* Show irrigation - Ctrl+i */ case SDLK_i: if (LCTRL || RCTRL) { key_irrigation_toggle(); } return FALSE; - /* show mines - Ctrl+m */ + /* Show mines - Ctrl+m */ case SDLK_m: if (LCTRL || RCTRL) { key_mines_toggle(); } return FALSE; - /* show resources - Ctrl+s */ + /* Show resources - Ctrl+s */ case SDLK_s: if (LCTRL || RCTRL) { key_resources_toggle(); } return FALSE; - /* show huts - Ctrl+h */ + /* Show huts - Ctrl+h */ case SDLK_h: if (LCTRL || RCTRL) { key_huts_toggle(); } return FALSE; - /* show cities - Ctrl+c */ + /* Show cities - Ctrl+c */ case SDLK_c: if (LCTRL || RCTRL) { request_toggle_cities(); @@ -2638,14 +2638,14 @@ bool map_event_handler(SDL_Keysym key) } return FALSE; - /* show units - Ctrl+u */ + /* Show units - Ctrl+u */ case SDLK_u: if (LCTRL || RCTRL) { key_units_toggle(); } return FALSE; - /* (show focus unit) */ + /* (Show focus unit) */ /* Show city output - Ctrl+v */ case SDLK_v: @@ -2750,7 +2750,7 @@ static int move_new_city_dlg_callback(struct widget *pwindow) /* ============================== Native =============================== */ - + /**********************************************************************//** Popup a dialog to ask for the name of a new city. The given string should be used as a suggestion. @@ -2832,7 +2832,7 @@ void popup_newcity_dialog(struct unit *punit, const char *suggest_name) /* I make this hack to center label on window */ if (label->size.w < area.w) { label->size.w = area.w; - } else { + } else { area.w = MAX(pwindow->area.w, label->size.w + adj_size(10)); } diff --git a/client/gui-sdl2/mapview.c b/client/gui-sdl2/mapview.c index 8f9060f78a..e9ba84e507 100644 --- a/client/gui-sdl2/mapview.c +++ b/client/gui-sdl2/mapview.c @@ -289,7 +289,7 @@ void gui_flush(void) { if (C_S_RUNNING == client_state()) { refresh_overview(); - } + } } /* ===================================================================== */ @@ -599,7 +599,7 @@ void redraw_unit_info_label(struct unit_list *punitlist) const char *diplo_nation_plural_adjectives[DS_LAST] = {"" /* unused, DS_ARMISTICE */, Q_("?nation:Hostile"), "" /* unused, DS_CEASEFIRE */, - Q_("?nation:Peaceful"), Q_("?nation:Friendly"), + Q_("?nation:Peaceful"), Q_("?nation:Friendly"), Q_("?nation:Mysterious")}; if (tile_owner(ptile) == client.conn.playing) { @@ -1081,7 +1081,7 @@ void update_city_descriptions(void) **************************************************************************/ struct canvas *get_overview_window(void) { - return overview_canvas; + return overview_canvas; } /**********************************************************************//** @@ -1097,7 +1097,7 @@ void get_overview_area_dimensions(int *width, int *height) smaller than DEFAULT_OVERVIEW_H, increase OVERVIEW_TILE_SIZE by 1 until the height condition is met. */ - int overview_tile_size_bak = OVERVIEW_TILE_SIZE; + int overview_tile_size_bak = OVERVIEW_TILE_SIZE; int xfact = MAP_IS_ISOMETRIC ? 2 : 1; int shift = (MAP_IS_ISOMETRIC && !current_wrap_has_flag(WRAP_X)) ? -1 : 0; diff --git a/client/gui-sdl2/menu.c b/client/gui-sdl2/menu.c index c046671200..50f7f92ef0 100644 --- a/client/gui-sdl2/menu.c +++ b/client/gui-sdl2/menu.c @@ -634,7 +634,7 @@ void create_units_order_widgets(void) buf->info_label = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT); buf->key = SDLK_a; add_to_gui_list(ID_UNIT_ORDER_AUTO_WORKER, buf); - /* --------- */ + /* --------- */ /* Wake Up Others */ fc_snprintf(cbuf, sizeof(cbuf), "%s (%s)", diff --git a/client/gui-sdl2/plrdlg.c b/client/gui-sdl2/plrdlg.c index 3b7a9ed584..f971a043c5 100644 --- a/client/gui-sdl2/plrdlg.c +++ b/client/gui-sdl2/plrdlg.c @@ -430,7 +430,7 @@ void popup_players_dialog(bool raise) } set_wstate(buf, FC_WS_NORMAL); add_to_gui_list(ID_CHECKBOX, buf); - } + } /* ---------- */ players_iterate(pplayer) { diff --git a/client/gui-sdl2/repodlgs.c b/client/gui-sdl2/repodlgs.c index 3d0faf9f30..a8c1ad590d 100644 --- a/client/gui-sdl2/repodlgs.c +++ b/client/gui-sdl2/repodlgs.c @@ -2007,7 +2007,7 @@ void economy_report_dialog_popup(bool make_modal) add_to_gui_list(ID_CHANGE_TAXRATE_DLG_LUX_SCROLLBAR, buf); - w2 += adj_size(184); + w2 += adj_size(184); /* lux rate iconlabel */ @@ -2130,7 +2130,7 @@ void economy_report_dialog_popup(bool make_modal) text = create_text_surf_from_utf8(pstr); /*-----------------*/ - + zoomed = get_building_surface(pimprove); zoomed = zoomSurface(zoomed, DEFAULT_ZOOM * ((float)54 / zoomed->w), DEFAULT_ZOOM * ((float)54 / zoomed->w), 1); diff --git a/client/gui-sdl2/themecolors.c b/client/gui-sdl2/themecolors.c index d5fc09bea3..81d741157f 100644 --- a/client/gui-sdl2/themecolors.c +++ b/client/gui-sdl2/themecolors.c @@ -42,7 +42,7 @@ static char *color_names[] = { "custom_widget_normal_text", "custom_widget_selected_frame", "custom_widget_selected_text", - "custom_widget_pressed_frame", + "custom_widget_pressed_frame", "custom_widget_pressed_text", "custom_widget_disabled_text", "editfield_caret", diff --git a/client/gui-sdl2/widget.c b/client/gui-sdl2/widget.c index 29e7ec501f..d02fb68c59 100644 --- a/client/gui-sdl2/widget.c +++ b/client/gui-sdl2/widget.c @@ -217,7 +217,7 @@ SDL_Surface *create_bcgnd_surf(SDL_Surface *ptheme, enum widget_state state, /**********************************************************************//** Find the next visible widget in the widget list starting with start_widget that is drawn at position (x, y). If start_widget is NULL, - the search starts with the first entry of the main widget list. + the search starts with the first entry of the main widget list. **************************************************************************/ struct widget *find_next_widget_at_pos(struct widget *start_widget, int x, int y) @@ -423,7 +423,7 @@ void unselect_widget_action(void) if (!(get_wflags(selected_widget) & WF_HIDDEN)) { selected_widget->unselect(selected_widget); - /* turn off quick info timer/counter */ + /* Turn off quick info timer/counter */ widget_info_counter = 0; } } @@ -431,7 +431,7 @@ void unselect_widget_action(void) if (info_area) { flush_rect(info_area, FALSE); FC_FREE(info_area); - FREESURFACE(info_label); + FREESURFACE(info_label); } selected_widget = NULL; diff --git a/client/gui-sdl2/widget_edit.c b/client/gui-sdl2/widget_edit.c index 395f5b62c6..4f152ddfef 100644 --- a/client/gui-sdl2/widget_edit.c +++ b/client/gui-sdl2/widget_edit.c @@ -762,10 +762,10 @@ enum edit_return_codes edit_field(struct widget *edit_widget) } redraw_edit_chain(&edt); - + set_wstate(edit_widget, FC_WS_PRESSED); { - /* local loop */ + /* Local loop */ Uint16 rety = gui_event_loop((void *)&edt, NULL, edit_key_down, NULL, edit_textinput, NULL, NULL, NULL, edit_mouse_button_down, NULL, NULL); @@ -779,10 +779,10 @@ enum edit_return_codes edit_field(struct widget *edit_widget) } else { ret = (enum edit_return_codes) rety; - /* this is here because we have no knowledge that edit_widget exist + /* This is here because we have no knowledge that edit_widget exist or nor in force exit mode from gui loop */ - /* reset font settings */ + /* Reset font settings */ if (!((edit_widget->string_utf8->style & 0x0F) & TTF_STYLE_NORMAL)) { TTF_SetFontStyle(edit_widget->string_utf8->font, TTF_STYLE_NORMAL); } @@ -807,12 +807,12 @@ enum edit_return_codes edit_field(struct widget *edit_widget) FREESURFACE(edt.bg); - /* disable repeat key */ + /* Disable repeat key */ #if 0 SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL); - /* disable Unicode */ + /* Disable Unicode */ SDL_EnableUNICODE(0); #endif /* 0 */ diff --git a/client/gui-sdl2/widget_label.c b/client/gui-sdl2/widget_label.c index 56c5d2db64..d8e8e13876 100644 --- a/client/gui-sdl2/widget_label.c +++ b/client/gui-sdl2/widget_label.c @@ -35,12 +35,12 @@ #include "widget_p.h" static int (*baseclass_redraw)(struct widget *pwidget); - + /**********************************************************************//** Blit themelabel2 gfx to surface its on. **************************************************************************/ static inline int redraw_themelabel2(struct widget *label) -{ +{ SDL_Rect src = {0,0, label->size.w, label->size.h}; SDL_Rect dst = {label->size.x, label->size.y, 0, 0}; /* @@ -457,7 +457,7 @@ int redraw_iconlabel(struct widget *label) } text = create_text_surf_from_utf8(label->string_utf8); - + if (label->theme) { /* Icon */ if (text) { if (flags & WF_ICON_CENTER_RIGHT) { diff --git a/client/gui-sdl2/wldlg.c b/client/gui-sdl2/wldlg.c index 1aa2015f3e..8a5b310ba7 100644 --- a/client/gui-sdl2/wldlg.c +++ b/client/gui-sdl2/wldlg.c @@ -1836,7 +1836,7 @@ void popup_worklist_editor(struct city *pcity, struct global_worklist *gwl) area.h - 1, TRUE); } - + /* ----------------------------------- */ FREEUTF8STR(pstr); FREESURFACE(main_surf); -- 2.39.2