Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #819488 ยป 0018-Add-space-between-and-following-where-ever-it-was-mi.patch

Marko Lindqvist, 2019-06-02 04:36 PM

View differences:

ai/default/aiair.c
}
if (can_city_build_unit_now(pcity, punittype)) {
struct unit *virtual_unit =
struct unit *virtual_unit =
unit_virtual_create(pplayer, pcity, punittype,
do_make_unit_veteran(pcity, punittype));
int profit = find_something_to_bomb(ait, virtual_unit, NULL, NULL);
if (profit > choice->want){
if (profit > choice->want) {
/* Update choice */
choice->want = profit;
choice->value.utype = punittype;
client/gui-gtk-3.0/citydlg.c
return;
}
if (!pdialog->misc.block_signal){
if (!pdialog->misc.block_signal) {
struct city *pcity = pdialog->pcity;
bv_city_options new_options;
client/gui-gtk-3.0/pages.c
int def_idx = -1;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(ruleset_combo));
for (i = 0; i < num_rulesets; i++){
for (i = 0; i < num_rulesets; i++) {
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(ruleset_combo), rulesets[i]);
if (!strcmp("default", rulesets[i])) {
client/gui-gtk-3.0/plrdlg.c
**************************************************************************/
void popup_players_dialog(bool raise)
{
if (!players_dialog_shell){
if (!players_dialog_shell) {
create_players_dialog();
}
gui_dialog_present(players_dialog_shell);
client/gui-gtk-3.22/citydlg.c
return;
}
if (!pdialog->misc.block_signal){
if (!pdialog->misc.block_signal) {
struct city *pcity = pdialog->pcity;
bv_city_options new_options;
client/gui-gtk-3.22/pages.c
int def_idx = -1;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(ruleset_combo));
for (i = 0; i < num_rulesets; i++){
for (i = 0; i < num_rulesets; i++) {
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(ruleset_combo), rulesets[i]);
if (!strcmp("default", rulesets[i])) {
client/gui-gtk-3.22/plrdlg.c
**************************************************************************/
void popup_players_dialog(bool raise)
{
if (!players_dialog_shell){
if (!players_dialog_shell) {
create_players_dialog();
}
gui_dialog_present(players_dialog_shell);
client/gui-gtk-4.0/citydlg.c
return;
}
if (!pdialog->misc.block_signal){
if (!pdialog->misc.block_signal) {
struct city *pcity = pdialog->pcity;
bv_city_options new_options;
client/gui-gtk-4.0/pages.c
int def_idx = -1;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(ruleset_combo));
for (i = 0; i < num_rulesets; i++){
for (i = 0; i < num_rulesets; i++) {
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(ruleset_combo), rulesets[i]);
if (!strcmp("default", rulesets[i])) {
client/gui-gtk-4.0/plrdlg.c
**************************************************************************/
void popup_players_dialog(bool raise)
{
if (!players_dialog_shell){
if (!players_dialog_shell) {
create_players_dialog();
}
gui_dialog_present(players_dialog_shell);
client/gui-qt/chatline.cpp
}
} conn_list_iterate_end;
players_iterate (pplayer){
players_iterate(pplayer) {
str = pplayer->name;
if (!word_list.contains(str)){
if (!word_list.contains(str)) {
word_list << str;
}
} players_iterate_end
client/gui-qt/cityrep.cpp
{
struct city *pcity;
foreach(pcity, selected_cities){
foreach(pcity, selected_cities) {
Q_ASSERT(pcity != NULL);
cityrep_buy(pcity);
}
......
{
struct city *pcity;
if (selected_cities.isEmpty()){
if (selected_cities.isEmpty()) {
return;
}
pcity= selected_cities[0];
pcity = selected_cities[0];
Q_ASSERT(pcity != NULL);
center_tile_mapcanvas(pcity->tile);
gui()->game_tab_widget->setCurrentIndex(0);
......
connect(act, &QAction::triggered, this, &city_widget::select_coastal);
act = menu->addAction(_("Same Island"));
connect(act, &QAction::triggered, this, &city_widget::select_same_island);
if (selected_cities.isEmpty()){
if (selected_cities.isEmpty()) {
act->setDisabled(true);
}
menu->addSeparator();
......
int col;
for (col = 0; col < list_model->columnCount(); col++) {
if (!list_model->hide_data(col).toBool()){
if (!list_model->hide_data(col).toBool()) {
setColumnHidden(col, !isColumnHidden(col));
}
}
......
if (indexes.isEmpty()) {
return;
}
foreach(i,indexes){
foreach(i,indexes) {
qvar = i.data(Qt::UserRole);
if (qvar.isNull()) {
continue;
client/gui-qt/dialogs.cpp
}
index = indexes.at(0);
if (indexes.isEmpty()){
if (indexes.isEmpty()) {
return;
}
qvar = index.data(Qt::UserRole);
......
void notify_dialog::mousePressEvent(QMouseEvent *event)
{
cursor = event->globalPos() - geometry().topLeft();
if (event->button() == Qt::RightButton){
if (event->button() == Qt::RightButton) {
was_destroyed = true;
close();
}
......
***************************************************************************/
void popdown_races_dialog(void)
{
if (is_race_dialog_open){
if (is_race_dialog_open) {
race_dialog->close();
is_race_dialog_open = false;
}
......
***************************************************************************/
void races_update_pickable(bool nationset_change)
{
if (is_race_dialog_open){
if (is_race_dialog_open) {
race_dialog->refresh();
}
}
......
choice_dialog *cd;
struct extra_type *tgt;
if (is_showing_pillage_dialog){
if (is_showing_pillage_dialog) {
return;
}
cd = new choice_dialog(_("What To Pillage"), _("Select what to pillage:"),
......
choice_dialog *cd;
cd = gui()->get_diplo_dialog();
if (cd != NULL){
if (cd != NULL) {
did_not_decide = true;
cd->close();
}
client/gui-qt/diplodlg.cpp
QWidget *w;
w = find_widget(party);
if (w == NULL){
if (w == NULL) {
return;
}
setCurrentWidget(w);
client/gui-qt/fc_client.cpp
return;
}
if (page == PAGE_NETWORK){
if (page == PAGE_NETWORK) {
destroy_server_scans();
}
menuBar()->setVisible(false);
......
showMaximized();
gui()->infotab->chtwdg->update_widgets();
status_bar->setVisible(false);
if (gui_options.gui_qt_fullscreen){
if (gui_options.gui_qt_fullscreen) {
gui()->showFullScreen();
gui()->game_tab_widget->showFullScreen();
}
......
****************************************************************************/
void fc_client::update_unit_sel()
{
if (unit_sel != NULL){
if (unit_sel != NULL) {
unit_sel->update_units();
unit_sel->create_pixmap();
unit_sel->update();
......
****************************************************************************/
void fc_client::popdown_unit_sel()
{
if (unit_sel != nullptr){
if (unit_sel != nullptr) {
unit_sel->close();
delete unit_sel;
unit_sel = nullptr;
......
cruleset->clear();
cruleset->blockSignals(true);
for (i = 0; i < num_rulesets; i++){
for (i = 0; i < num_rulesets; i++) {
cruleset->addItem(rulesets[i], i);
if (!strcmp("default", rulesets[i])) {
def_idx = i;
client/gui-qt/menu.cpp
/* TRANS: Transfrom terrain to specific type */
arg(QString(get_tile_change_menu_text
(unit_tile(punit), ACTIVITY_MINE))));
} else if (units_have_type_flag(punits, UTYF_SETTLERS, TRUE)){
} else if (units_have_type_flag(punits, UTYF_SETTLERS, TRUE)) {
struct extra_type *pextra = NULL;
/* FIXME: this overloading doesn't work well with multiple focus
......
/* TRANS: Transfrom terrain to specific type */
arg(QString(get_tile_change_menu_text
(unit_tile(punit), ACTIVITY_IRRIGATE))));
} else if (units_have_type_flag(punits, UTYF_SETTLERS, TRUE)){
} else if (units_have_type_flag(punits, UTYF_SETTLERS, TRUE)) {
struct extra_type *pextra = NULL;
/* FIXME: this overloading doesn't work well with multiple focus
client/gui-qt/messagewin.cpp
resxy = true;
return;
}
if (event->y() > 0 && event->y() < 5){
if (event->y() > 0 && event->y() < 5) {
resize_mode = true;
resy = true;
} else if (event->x() > width() - 5 && event->x() < width()){
} else if (event->x() > width() - 5 && event->x() < width()) {
resize_mode = true;
resx = true;
}
client/gui-qt/pages.cpp
QTimer::singleShot(timeout, this, SLOT(clear_status_bar()));
} else {
status_bar_queue.append(message);
while (status_bar_queue.count() > 3){
while (status_bar_queue.count() > 3) {
status_bar_queue.removeFirst();
}
}
......
**************************************************************************/
void fc_client::start_scenario()
{
if (!is_server_running()){
if (!is_server_running()) {
client_start_server();
send_chat("/detach");
}
......
**************************************************************************/
void fc_client::start_from_save()
{
if (!is_server_running()){
if (!is_server_running()) {
client_start_server();
send_chat("/detach");
}
client/gui-qt/plrdlg.cpp
- opt.fontMetrics.height() / 2);
rct.setBottom((rct.top()+rct.bottom()) / 2
+ opt.fontMetrics.height() / 2);
if (index.data().toInt() == -1){
if (index.data().toInt() == -1) {
str = "?";
} else {
str = index.data().toString();
......
break;
case COL_RIGHT_TEXT:
str = pdc->func(ipplayer);
if (str.toInt() != 0){
if (str.toInt() != 0) {
return str.toInt();
} else if (str == "?") {
return -1;
......
plr_list.clear();
beginResetModel();
players_iterate(pplayer) {
if ((is_barbarian(pplayer))){
if ((is_barbarian(pplayer))) {
continue;
}
pi = new plr_item(pplayer);
......
int col;
for (col = 0; col < list_model->columnCount(); col++) {
if (!list_model->hide_data(col).toBool()){
if (!list_model->hide_data(col).toBool()) {
setColumnHidden(col, !isColumnHidden(col));
}
}
......
}
players_iterate(pplayer) {
if ((is_barbarian(pplayer))){
if ((is_barbarian(pplayer))) {
continue;
}
player_count++;
client/gui-qt/repodlgs.cpp
pix = NULL;
sprite = get_building_sprite(tileset, pimprove);
if (sprite != NULL){
if (sprite != NULL) {
pix = sprite->pm;
}
if (pix != NULL){
if (pix != NULL) {
pix_scaled = pix->scaledToHeight(h);
} else {
pix_scaled.fill();
......
pix = NULL;
sprite = get_unittype_sprite(tileset, putype, direction8_invalid());
if (sprite != NULL){
if (sprite != NULL) {
pix = sprite->pm;
}
id = cid_encode_unit(putype);
......
item->setTextAlignment(Qt::AlignHCenter);
switch (j) {
case 0:
if (pix != NULL){
if (pix != NULL) {
pix_scaled = pix->scaledToHeight(h);
item->setData(Qt::DecorationRole, pix_scaled);
}
......
break;
case 1:
pix = get_nation_flag_sprite(tileset, nation_of_player(pplayer))->pm;
if (pix != NULL){
item->setData(Qt::DecorationRole, *pix);
if (pix != NULL) {
item->setData(Qt::DecorationRole, *pix);
}
break;
case 2:
......
int i;
QWidget *w;
if (client_is_global_observer()){
if (client_is_global_observer()) {
return;
}
if (!gui()->is_repo_dlg_open("SCI")) {
client/gui-sdl2/repodlgs.c
/* send sell */
city_list_iterate(client.conn.playing->cities, pCity) {
if (!pCity->did_sell && city_has_building(pCity, improvement_by_number(imp))){
if (!pCity->did_sell
&& city_has_building(pCity, improvement_by_number(imp))) {
count++;
city_sell_improvement(pCity, imp);
client/reqtree.c
if (width) {
*width = reqtree->diagram_width;
}
if (height){
if (height) {
*height = reqtree->diagram_height;
}
}
common/generate_packets.py
extra=""
if self.dataio_type=="memory":
return '''%(extra)s
if (!DIO_GET(%(dataio_type)s, &din, &field_addr, real_packet->%(name)s, %(array_size_u)s)){
if (!DIO_GET(%(dataio_type)s, &din, &field_addr, real_packet->%(name)s, %(array_size_u)s)) {
RECEIVE_PACKET_FIELD_ERROR(%(name)s);
}'''%self.get_dict(vars())
elif self.is_array==2 and self.dataio_type!="string" \
server/cityhand.c
return;
}
pplayer->economic.gold-=cost;
if (pcity->shield_stock < total){
pplayer->economic.gold -= cost;
if (pcity->shield_stock < total) {
/* As we never put penalty on disbanded_shields, we can
* fully well add the missing shields there. */
pcity->disbanded_shields += total - pcity->shield_stock;
server/generator/mapgen.c
landmass = (wld.map.xsize * (wld.map.ysize - 6) * wld.map.server.landpercent)/100;
/* subtracting the arctics */
if (landmass > 3 * wld.map.ysize + player_count() * 3){
if (landmass > 3 * wld.map.ysize + player_count() * 3) {
landmass -= 3 * wld.map.ysize;
}
islandmass= (landmass)/(3 * bigislands);
islandmass = (landmass)/(3 * bigislands);
if (islandmass < 4 * maxmassdiv6) {
islandmass = (landmass)/(2 * bigislands);
}
......
make_island(islandmass, 1, pstate, DMSIS);
}
if (j == 500){
if (j == 500) {
log_normal(_("Generator 3 didn't place all big islands."));
}
islandmass= (islandmass * 11)/8;
islandmass = (islandmass * 11) / 8;
/*!PS: I'd like to mult by 3/2, but starters might make trouble then */
if (islandmass < 2) {
islandmass= 2;
islandmass = 2;
}
while (checkmass > islandmass && ++j < 1500) {
server/savegame/savegame2.c
} player_slots_iterate_end;
/* Load shuffled player list. */
for (i = 0; i < player_count(); i++){
for (i = 0; i < player_count(); i++) {
int shuffle
= secfile_lookup_int_default(loading->file, -1,
"players.shuffled_player_%d", i);
......
if (shuffle_loaded) {
/* Insert missing numbers. */
int shuffle_index = player_count();
for (i = 0; i < player_slot_count(); i++){
for (i = 0; i < player_slot_count(); i++) {
if (!shuffled_player_set[i]) {
shuffled_players[shuffle_index] = i;
shuffle_index++;
server/savegame/savegame3.c
} player_slots_iterate_end;
/* Load shuffled player list. */
for (i = 0; i < player_count(); i++){
for (i = 0; i < player_count(); i++) {
int shuffle
= secfile_lookup_int_default(loading->file, -1,
"players.shuffled_player_%d", i);
......
if (shuffle_loaded) {
/* Insert missing numbers. */
int shuffle_index = player_count();
for (i = 0; i < player_slot_count(); i++){
for (i = 0; i < player_slot_count(); i++) {
if (!shuffled_player_set[i]) {
shuffled_players[shuffle_index] = i;
shuffle_index++;
......
sg_check_ret();
set_count = 0;
for (i = 0; i < PLRF_COUNT; i++){
for (i = 0; i < PLRF_COUNT; i++) {
if (player_has_flag(plr, i)) {
flag_names[set_count++] = plr_flag_id_name(i);
}
server/savegame/savemain.c
}
/* If orig_filename is NULL or empty, use a generated default name. */
if (filename[0] == '\0'){
if (filename[0] == '\0') {
/* manual save */
generate_save_name(game.server.save_name, filename,
sizeof(stdata->filepath) + stdata->filepath - filename, "manual");
server/unittools.c
(If specified cost is -1, then teleportation costs all movement.)
**************************************************************************/
bool teleport_unit_to_city(struct unit *punit, struct city *pcity,
int move_cost, bool verbose)
int move_cost, bool verbose)
{
struct tile *src_tile = unit_tile(punit), *dst_tile = pcity->tile;
if (city_owner(pcity) == unit_owner(punit)){
if (city_owner(pcity) == unit_owner(punit)) {
log_verbose("Teleported %s %s from (%d,%d) to %s",
nation_rule_name(nation_of_unit(punit)),
unit_rule_name(punit), TILE_XY(src_tile), city_name_get(pcity));
utility/inputfile.c
/* skip any whitespace: */
inf->cur_line_pos = len;
c = astr_str(&inf->cur_line) + len;
while (*c != '\0' && fc_isspace(*c)){
while (*c != '\0' && fc_isspace(*c)) {
c++;
}
if (*c != '\"') {
inf_log(inf, LOG_ERROR,
inf_log(inf, LOG_ERROR,
"Did not find opening doublequote for '*include' line");
return FALSE;
}
utility/log.c
}
if (level == prev_level && 0 == strncmp(msg, last_msg,
MAX_LEN_LOG_LINE - 1)){
MAX_LEN_LOG_LINE - 1)) {
repeated++;
if (repeated == next) {
fc_snprintf(buf, sizeof(buf),
    (1-1/1)