DELTA 12290 24787 2062
SVN  ¤U­iq’, …I €\ j…{€( G  Y‡:€„Q G  Y‡:… bb€ Ÿ˜ £O G  v‡:€< ƒZ‰c€M ‚?€‚e i‘s€ ‚“b€ƒ C–}† A—G€e T™n€A ‚`›fc_config.h>
#endif

/* SDL */
#include <SDL.h>

/* utility */
#include "log.h"

/* gui-sdl2widget.h"
#include "widget_p.h"

static int (*checkbox_baseclass_redraw)(struct widget *pwidget);
static int (*textcheckbox_baseclass_redraw)(struct widget *pwidget);

atic int redraw_icon(struct widget *pIcon)
{
  int ret;
  SDL_Rect src, area = pIcon->size;

  ret = (*checkbox_baseclass_redraw)(pIcon);
  if (ret != 0) {
    return ret;
  }

  if (!pIcon->theme) {
    return -3;
  }

  src.x = (pIcon->theme->w / 4) * (Uint8) (get_wstate(pIcon));
  src.y = 0;
  src.w = (pIcon->theme->w / 4);
  src.h = pIcon->theme->h;

  if (pIcon->size.w != src.w) {
    area.x += (pIcon->size.w - src.w) / 2;
  }

  if (pIcon->size.h != src.h) {
    area.y += (pIcon->size.h - src.h) / 2;
  }

  return alphablit(pIcon->theme, &src, pIcon->dst->surface, &area, 255);
}

atic 
  ret = (*textcheckbox_baseclass_redraw)(pCBox);
  if (ret != 0) {
    return ret;
  }

  if (pCBox->string_utf8 == NULL) {
    return widget_redraw
  pCBox->theme = pIcon;
struct gui_layer *pDest, bool state,
                               Uint32 flags)
{
  struct widget *pCBox = widget_new();
  struct CHECKBOX *pTmp = fc_calloc(1, sizeof(struct CHECKBOX));

  checkbox_baseclass_redraw = pCBox->redraw;
  pCBox->redraw = redraw_icon;
create_textcheckbox(struct gui_layer *pDest, bool state,
                                   utf8_str *pstr, Uint32 flags)
{
  struct widget *pCBox;
  struct CHECKBOX *pTmp;
  SDL_Surface *pSurf, *pIcon;
  struct widget *pTmpWidget;

  if (pstr == NULL) {
    return create_checkbox(pDest, state, flags);
  }

  pTmp = fc_calloc(1, sizeof(struct CHECKBOX));

  pIcon = create_icon_from_theme(pSurf, 0);
  pCBox = create_iconlabel(pIcon, pDest, pstr, (flags | WF_FREE_PRIVATE_DATA));

  ps
  pTmpWidget = widget_new();
  /* we can't use pCBox->redraw here, because it is of type iconlabel */
  textcheckbox_baseclass_redraw = pTmpWidget->redraw;
  FREEWIDGET(pTmpWidget);
  pCBox->redraw = redraw_textcheckbox;

  return pCBox;
}

int set_new_checkbox_theme(struct widget *pCBox,
                           SDL_Surface *pTrue, SDL_Surface *pFalse)
{
  struct CHECKBOX *pTmp;

  if 
  if 
  pTmp = pCBox->private_data.cbox;
  pTmp->pTRUE_Theme = pTrue;
  pTmp->pFALSE_Theme = pFalse;
  if 
  return 0;
}

void togle_checkbox(struct widget *pCBox)
{
  if ENDREP
DELTA 27322 26130 3635
SVN  ÀÀ<&! —h § N·  ˜8€d ”;š• ;¡@ R°' Ž±yFree resources allocated for the widgetUTF8STR(pGUI->string_utf8);
  }
  if (get_wflags(pGUI) & WF_WIDGET_HAS_INFO_LABEL) {
    FREEUTF8STRdirty_sdl_rect(&rect)&ENDREP
DELTA 27385 8317 19
SVN  ŠŠ
 ‡/ Œ ‚Z‡?utf8_str *psENDREP
DELTA 27201 0 12390
SVN  ƒÖ4ƒÓGƒv—` çE ¾ …èA€W uîŒ ]þ€ „?… S¯@ ‚k†)… ‚Ž) ‚x‹/… …<Ž)… ‚Ž) ‚b•}…   :† ~«; ‚›… L¯@ bžV… „V :… ‚
 : ‚v§…   : „
«4… ‚¯@„ ‰5±V… K¯@ Z¿j ‚s¼2… ‰¿'… ‹È,… K¯@“ „Ô… š!Ø-Œ ‡ò^€ ‚*û ‘ Fý<° >þ2 ƒ2ÿq€ >þ2 ÿq x‚  ‚:‚ˆp¤ ƒ&‚‹P„ L‚Ž{® M«: s‚ˆo ŸW‚‘6£ ‚P‚±4€c ‚´h€ƒ #‚¸w ‚D‚º€y Q‚Ì~« |‚¾T  Á‚ÀpŒ ‚Kƒ‚€~ ‚aƒ…b€V –LƒŠ€q (ƒ¡P€ †ƒ£{€f \ƒª}ž „zƒ«y… ‚gƒ°u€ Hƒ®< _ƒµ'€d mƒ±o ‚cƒ¹h… ‚ ƒ¼M ‚8ƒ¾k… 6ƒÁ%€ †oƒÅ¢ dƒÓ)€h QƒÏt  _ƒÏf ƒƒÓ_utf8->text != NULL) {
      sscanf(pWidget->string_utf8->textpWidget->string_utf8->text == NULL) {
      copy_chars_to_utf8_str(pWidget->string_utf8utf8_str *psstr = create_utf8_from_char(nation_adjective_for_player(pPlayer0), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, ps_utf8_utf8_utf8_utf8_utf8vision_utf8_utf8_utf8_utf8_utf8utf8_utf8_utf8_utf8_utf8  pBuf->string_utf8_utf8utf8_str *psstr = create_utf8_from_char(cBuf, adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, psstr = create_utf8str->style |= (TTF_STYLE_BOLD|SF_CENTER);
    pssstr = create_utf8_from_char(nation_adjective_for_player(pPlayer1), adj_font(12));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
    pssutf8_from_char(_("Cancel meeting"),
utf8adj_font(12));
    pBuf->action = accept_treatutf8_str *pstr;
  struct widget *pbstr = create_utf8_from_char(cBuf, adj_font(12));
    pbuf = create_iconlabel(NULL, pWindow->dst, psbuf->string_utf8->style |= SF_CENTER_RIGHT;
    }

    pbuf->data.cont = fc_calloc(1, sizeof(struct CONTAINER));
    pbuf->data.cont->id0 = player_number(pclause->from);
    pbuf->data.cont->id1 = player_number(pdialog->treaty.plr1);
    pbuf->data.cont->value = ((int)pclause->type << 16) + pclause->value;

    pbuf->action = remove_clause_callback;
    set_wstate(pbuf, FC_WS_NORMAL);

    pbbbuf = pdialog->pdialog->pEndActiveWidgetList->next;
      do {
        pbuf = pbuf->prev;
        pbuf->size.w -= len;
    FREESURFACE(pbuf->gfx);
      } while (pbbuf);
      widget_mark_dirty(pbutf8_str *psstr = create_utf8_from_char(cBuf, adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, psstr = create_utf8_from_char(cBuf, adj_font(14));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
  pstr->fgcol = *get_theme_color(COLOR_THEME_WARDLG_TEXT);

  pText = create_text_surf_from_utf8(pstr);
  FREEUTF8STR(psutf8_str *pstr;
    SDL_Surface *pText;
    SDL_Rect dst;
    bool shared;
    SDL_Rect area;
    int buttons = 0str = create_utf8_from_char(cBuf, adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, psstr = create_utf8_from_char(cBuf, adj_font(14));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
    psutf8(pstr);
    FREEUTF8STR(ps_utf8      buttons++;
    }

    shared = gives_shared_vision(client.conn.playing, pPlayer);

    if (shared) {
      /* shared vision pWindow->dst,
pBuf->action = withdraw_vision_dlg_callback;
      set_wstate(pBuf, FC_WS_NORMAL);
      pBuf->data.player = pPlayer;
      pBuf->key = SDLK_w;
      pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT)      buttons++;_utf8    buttons++_utf8    buttons++;

    button_h += adj_size(4);
    area.w = MAX(area.w, button_w + adj_size(20));

    area.h += buttons * (button_h + adj_size(10));/* war: meet, peace: cancel treatyx = area.x + (area.w - (pBuf->size.w)) / 2;
    pBuf->size.y = dst.y;

    if (shared) {
      /* vision    }

    if (type != DS_WAR) {ENDREP
DELTA 27376 46528 1929
SVN  ‚ÿq‚þ‰\  €B ˜8T„ ˆbš€\ ‚¤Fœ ‡S¦w€‚ 5²€E ^³m€ ¶« „R·5€^ „(¼j¨ ½Á<£ DÁ<  @ÿ8… —‚Ÿz… „*‚·… ŠS‚»7€6 ’"‚ÇH„ ‡8‚Ùo¹ ž‚á]_utf8->style |= TTF_STYLE_BOLD;
  widget->info_label = create_utf8utf8utf8_str(widget->string_utf8, buf);
    }
    break;

  case OT_STRING:
    copy_chars_to_utf8_str(widget->string_utf8, option_str_get(poption));
    break;

  case OT_ENUM:
    copy_chars_to_utf8_str(widget->string_utf8utf8_str(widget->string_utf8int value;

      if (str_to_int(widget->string_utf8->text, &value)) {
        (void) option_int_set(poption, value);
      }
    }
    break;

  case OT_STRING:
    (void) option_str_set(poption, widget->string_utf8->text);
    break;

  case OT_ENUM:
    {!strcmp(strvec_get(widget->data.vector, i), widget->string_utf8->text}
    break;

  case OT_VIDEO_MODE:
    {
      struct video_mode mode;

      if (string_to_video_mode(widget->string_utf8->textwidget->string_utf8->text, &mode));
      }utf8_str *str;

  pdialog->mode = ODM_MAIN;

  /* Create window widget. */
  str = create_utf8utf8_from_char(_("Close Dialog (Esc)"),
utf8_from_char(_("Apply changes"),
_utf8_utf8_utf8
  create_frame(background->theme,
               0, 0, background->theme->w - 1, background->theme->h - 1,
               get_theme_color(COLOR_THEME_OPTIONDLG_WORKLISTLIST_FRAME));utf8utf8_str(option_dialog->worklist.edited_name->string_utf8ENDREP
DELTA 23579 20267 10595
SVN  †  †  ‘™{ ˆ š ‚‰ †(‹¹ ‚‘|€p f•) ‡G–€K S‚”? ‚%ž{ r¿ ‚G¡v y¤>¨ [¥<¨ u§™ O¨6€‚ ƒªg u­j€v c´; }°L¾ c´; ²x I³{¾ !µ€P ¸ |¹ ]‚Ð8 …
ºv ƒ^À€G qÑt ‚9Å” d‚Õ €T „É.© ƒAÍe© ƒcÑP ƒ;Õ7© ƒkÙ­ _ß@ YË@ ‚tßŒ <â€ eäl€U Wç+· I‚å}‰ \é eêp· 'ì aí5™ f†|‹ vÿ5 ð)¥ f†|ž qÿ:š ð:Œ )õ ƒ0ö4 ùj‰ *ö= ‚
ü$ yþ2 ‚2ÿ& <Z„ ‚ƒ I† ‚G‡g Š0‰ qÿ: HŒ;€J i‚÷,€C ‚K’ F”R ‚– …3˜;€ƒ ]¡5… ¢€` „H£-… §u… ¨x… x©{… …ªs¼ „B°6€x nµ€V w¶?€w ‚6¸x€7 !¼k {¾€H k¿V€O gô:± oÂ1€…M R‚”@¬ NË@ Ê¦ –:Ë€„K ƒiæ €| &êV ƒ9ë~€ƒ ‚ò5 {ô:€z 0ö2 x÷c¢ Cùg¢ ’/û0 V‚‘… _ß@ YË@‹ f‚„} U‚| R‚’W eß@ h‚˜x Šv‚– €S „A‚¡N ‡‚¦€ Q‚®'“ @ƒ–@€l ‚²B¨ ‚z‚³S¨ ‚z‚¶R­ ‚'‚¹}€T ‚½ €„u w‚Â}· ‚Ä2€} Z‚ÆJ ‡<‚È( Š>‚Ïf€G ‚‚Úq® o‚Ý'  B‚Þ< @‚à  _ß@– [Ë@€t a‚ã€ I‚å} H‚æG€] ‚<‚èt€f k‚ì€e ^‚ík  ‚î:€_ !‚ð? a‚ña€c ‚/‚ô/ ‚Y‚ö` [‚ù= ‚û ‚ü f‚ý% ~‚þ ƒJ‚ÿ€y MƒƒK ƒ>ƒ…’ ƒ	ƒˆW€‚" vƒM’ 7ƒE ‚]ƒ~ ƒ“] nƒ”~ Rƒ•n Kƒ¼@ T‚Š• OË?€w Žgƒš? ƒ1ƒ©(¹ ƒ­ {ƒ®%€^ qƒ°* ƒ± ƒ²*‘ @‚à  _ß@’ E£@ ~ƒ¶3€Q xƒ¸
¢ Vƒ¹*› uƒº… [‚Ð< ƒ_ƒ»o€‚ ƒ$ƒÁW  „0ƒÄ… ƒtƒÉ/« hƒÄ …ƒÎ¿ Wƒá €O ƒÕ ¨ w§™ tƒä( ƒåˆ ~ƒËm€M hƒÄ pƒÎ „ƒÜ%¿ ƒá  ƒÕ ¨ w§ 	ƒÖ ‚:ƒå  ƒ ƒç\ ƒê~€B a„d iƒí3 ƒî lƒï3… ƒƒð… ‚aƒó1… ‚ƒö… ƒƒø! eƒû) @ƒü… +ƒýP… ‚qƒþ{… 	„l… ‚#„‚u… ‚d„…€\ b„ˆ5 ƒE„Šˆ [„dˆ ]„@€U ‚P„d€Z J„” €•g P„¦y€a „¨| t„Æ6 r„È) +„­)€M D„Ô4€‚$ „>„³6 „·|˜ s„á< 	„¹w€ƒV W„½s€‚N „Àk t„Æ6 r„È) „Å ‚e„Æ6 „Å½ D„Ô4€ 	„ä% b„Îm± D„Ô4€, o„Å?° D„Ô4€+ _„Å?½ D„Ô4€d ˆ„Ü€†, p„é; „?„ë-Š ƒ„ïu ‚9„ó´ Dƒ–@ ƒB„ö3… .„ùu T…â@ %„ûy… 8„ý T…â@ %„ÿ,  Dƒ–@ Q…0ˆ ‚a…‚… „_…„c€ `…±?Œ Y…â= …Œ €[ ‚Q…e€	 …‘X… m…§? _…“a´ …”d T…â@„ … ~… ƒM…—V h…›'€P …R€d `…±?‡ Y…â= … r… ,…¢ † …£-€g C…¥ ¬ w…¥H… =…§?ˆ …¨} T…â@ …ªY… p…«_† |…¬P ‚`…­P… t…°0ˆ 4…±% 7…²[… …´€T ‚j…µuš m…§?€Z …º- T…â@ …¼… ‚[…½  w…¿š …Á… m…Â¹ `…±?† Y…â= …Äz… ‚…Æ ƒ…Èš m…§?€[ …Ìm T…â@¯ W…–… g…ÏN ‚P…Ñ9– a…Ë= L…Ô{¢ `…±?ƒ W…â= …×… Y…Ø$ ‚W…Ú– a…Ë= †Q…ÝJ… ‚F…ä´ ‚L…èj… ‚S…ë6… B…î	€} |…ñS€B ƒ…ôˆ a…÷9€L  …øi… F…ú	€h U…ü= M†Œ~… 8…þg€B 9…èvƒ …ê1€F m…î=€‚ j†‡^ …öˆ a…÷9€S ,†Œ… d…þg T†Ž/€h ‚m†q t†’f€U/* SDL */
#include <SDL.h>2
  /* Penel group list */
  struct ADVANCED_DLG *pPanel;
  /* active area of specialist
                              0 - elvis
                              1 - taxman
                              2 - scientists
                              change when pressed on this area */
  bool specs[3];
 {
      return pImprove;
    }
  } improvement_iterate_end;

  return NULL                                                                                
    if (pHurry_Prod_Dlg)                                         pHurry_Prod_Dlg->pEndWidgetList);

      FC_FREE(pHurry_Prod_Dlg);
    }

    free_city_units_lists();
    popdown_city_menu_dlg(FALSE);

    popdown_window_group_dialog(pCityDlg->pBeginCityWidgetList,
                          && city_owner(pCityDlg->pCity) == client.conn.playing) {

      /* check elvis area */
      if (pCityDlg->specs[0]
 
      /* check TAXMANs area */
      if (pCityDlg->specs[1]
  && is_in_rect_area(Main.event.motion.x, Main.event.motion.y,
}

    if (!pCityDlg->lock) {
      if (pCityDlg->pPanel) {
        select_window_group_dialog(pCityDlg->pBeginCityWidgetList, pWindow);
        select_window_group_dialog(pCityDlg->pPanel->pBeginWidgetList,

    popdown_city_menu_dlg(TRUE);
    if (pUnit) {
      unit_focus_set
    if (pUnit) {
    pCityDlg->pEndCityMenuWidgetList);
      pCityDlg->pEndCityMenuWidgetList = NULL;

    popdown_city_menu_dlg(TRUE);
    if 
    popdown_city_menu_dlg(TRUE);
    if 
    popdown_city_menu_dlg(TRUE);
    if 
    popup_unit_upgrade_dlg(pUnit, TRUE);
  }Main unit order dlg. callbackutf8_str *ps
    pUnit = player_unit_by_number(client_player(), MAX_ID - pButton->ID);

    if (!pUnit || !can_client_issue_orders()) {
      return -1;
    }

    if ect_widget_action();
    disable_city_dlg_widgets();

    pUType = unit_type(pUnit);
str = create_utf8_from_char(cBuf, adj_font(12));
    psstr, 0);
str = create_utf8_from_char(cBuf, adj_font(12));
    pss
    /* Activate unit */
_("Activate
    /* Activate unit, close dlg. */
_("Activate unit, close dialogaction = activate_and_exit/* ----- */
_("Fortif
   _("Cancel
    /* ================================================== */
    unselect_widget_action();
    /* ================================================== */

    area.w += adj_size(10);
    hh += adj_size(4pWindow->prev->size.h +
                  (i * hh) + adj_size(5));

                                        int w, int h)
{
  SDL_Rect src_rect;
  SDL_Surface *pSurf, *pZoomed;
  struct canvas *destcanvas = canvas_create(tileset_full_tile_width(tileset),
                                            tileset_full_tile_height(tileset));

  put_unit(pUnit, destcanvas, 1.0, 0, 0);

  src_rect = get_smaller_surface_rect(destcanvas->surf);
  pSurf = create_surf, 255
  if (support) {
    int i, step;
    int free_unhappy;
    int happy_cost;
    SDL_Rect dest;
, 255, 255, 255, 255utf8_str *pstr;
  char cBuf[256];
  int num_x, num_y, w, h;
const char *vetname;

    pUType = unit_type(pUnit);
    vetname = utype_veteran_name_translation(pUType, pUnit->veteran%s\n%s\n(%d/%d)\n%s",
                utype_name_translation(pUType),
                FALSE),
                (vetname != NULL ? "\n" : ""),
                (vetname != NULL ? vetname : ""),
                unit_activity_text(pUnit),
                pUnit->hp, pUType->hp,
                pHome_City ? pHome_City->name : _("None"));
TRUE, w, h));
    } else {
      pSurf = adj_surf(create_unit_surface(pUnit, FALSE, w, h));
    }

    pstr = create_utf8_from_char(cBuf, adj_font(10));
    pstr->style |= SF_CENTER;
s
    if (++i > num_x * num_y) {
      set_wflag(pBuf, WF_HIDDEN);
    }

    pBuf->action = units_orders_city_dlg_callback;
  } unit_list_iterate_end;
End;
  pCityDlg->pPanel->pBeginWidgetList = pBuf;
  setup_vertical_widgets_position(num_x,
                                  pWindow->area.x + adj_size(5),
                                  pWindow->area.y + adj_size(44),
                                  0, 0, pCityDlg->pPanel->pBeginActiveWidgetList,
                                  pCityDlg->pPanel->pEndActiveWidgetList);

  if (i > num_x * num_y) {
    create_vertical_scrollbar(pCityDlg->pPanel,
                              num_x, num_y, TRUE, TRUE);

    setup_vertical_scrollbar_area(pCityDlg->pPanel->pScroll,
                                  pWindow->area.x + adj_size(185),
                                  pWindow->area.y + adj_size(45),
                                  adj_size(150), TRUE);
  }free city present/supported units panel list                                      
    switch (MAX_ID - pWidget->ID) {
    case 0x10:
      if (BV_ISSET(new_options, CITYO_DISBAND)) {
        BV_CLR(new_options, CITYO_DISBAND);
      } else {
        BV_SET(new_options, CITYO_DISBAND);
      }
      break;
    case 0x20:
      if (BV_ISSET(new_options, CITYO_NEW_EINSTEIN)) {
        BV_CLR(new_options, CITYO_NEW_EINSTEIN);
      } else {
        BV_SET(new_options, CITYO_NEW_EINSTEIN);
      }
      if (BV_ISSET(new_options, CITYO_NEW_TAXMAN)) {
        BV_CLR(new_options, CITYO_NEW_TAXMAN);
      } else {
        BV_SET(new_options, CITYO_NEW_TAXMAN);
      }
 {
        BV_CLR(new_options, CITYO_NEW_EINSTEIN);
      } else {
        BV_SET(new_options, CITYO_NEW_EINSTEIN);
      }
utf8_str *pstr;
  char cBuf[80];

  fc_snprintf(cBuf, sizeof(cBuf),
              _("Disband if build\nsettler at size 1"));
  pstr = create_utf8_from_char(cBuf, adj_font(10));
  pstr->style |= TTF_STYLE_BOLD;
  pstr->fgcol = *get_theme_color(COLOR_THEME_CHECKBOX_LABEL_TEXT);

  pBuf =
    create_textcheckbox(pWindow->dst, BV_ISSET(pCity->city_options, CITYO_DISBAND), pstr,
                      
  fc_snprintf(cBuf, sizeof(cBuf), "%s:", _("New citizens are"));
  pstr = create_utf8_from_char(cBuf, adj_font(11));
  pss                                ps                                ps}
  }buy productionsok_buy_prod}  char tBuf[512], cBuf[512];
  struct widget *pBuf = NULL, *pWindow;
  utf8_str *psstr = create_utf8_from_char(_("Buy it?"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;
  pWindow = create_window_skeleton(NULL, ps
  area.h += 1;

   */

  /* label */
  pstr = create_utf8_from_char(cBuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
  pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_BUY);

  pText = create_text_surf_from_utf8(pstr);
  FREEUTF8STR(ps                                                                                
  pHurry_Prod_Dlg->pBeginWidgetList = pBuf;

  area = pWindow->area;

  pBuf = pWindow->prev;

  if (city_dialog_is_open(pCity)) (is_city_report_open()) {
      fc_assert(selected_widget != NULL);
      if (selected_widget->size.x + tileset_tile_width(tileset) + pWindow->size.w > main_window_width()) {
        window_x = selected_widget->size.x - pWindow->size.w;
      } else {
        window_x = selected_widget->size.x + tileset_tile_width(tileset);
      }

      window_y = selected_widget->size.y + (selected_widget->size.h - pWindow->size.h) / 2;
      if (window_y + pWindow->size.h > main_window_height()) {
        window_y = main_window_height() - pWindow->size.h - 1;
      } else {
        if (window_y < 0) {
          window_y = 0;
        }

  widget_set_position(pWindow, window_x, window_y);
, 255);
  dst.y += pText->h + adj_size(5);
  FREESURFACE(pText);

  /* no */
  pBuf = pWindow->prev;
  pBuf->size.y = dst.y;

    city_sell_improvement(pCityDlg->pCity, MAX_ID - 3000 - pTmp->ID);

    pCityDlg->pEndCityMenuWidgetList = NULL;

    enable_city_dlg_widgets();
Popup Sell Imprvm. Dlgll_imprvm_dlg_callback(struct widget *pImpr)
{
  if (Main.event.button.button == SDL_BUTTON_LEFT) {
    utf8_str *ps
    unselect_widget_action();
    disable_city_dlg_widgets();

    pstr = create_utf8_from_char(_("Sell it?"), adj_font(12));
    pss

    area = pWindow->area;

    /* create text label */
    id = MAX_ID - 3000 - pImpr->ID;
str = create_utf8_from_char(cBuf, adj_font(10));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
    psstr, 0);
    add_to_gui_list(ID_LABEL, pLabel);

    /* create cancel button */
    pCancel_Button =

    set_wstate(pCancel_Button, FC_WS_NORMAL);
    add_to_gui_list(ID_BUTTON, pCancel_Button);

    add_to_gui_list(ID_BUTTON, pOK_Button);

    pCityDlg->pBeginCityMenuWidgetList = pOK_Button;
                    pCityDlg->pEndCityWidgetList->prev, FC_WS_NORMAL);

    if (pCityDlg->pImprv->pEndActiveWidgetList) {                               set_wstate(pTmpWidget, FC_WS_DISABLED);
          } else {
            set_wstate(pTmpWidget, FC_WS_NORMAL);
          }

          if (pTmpWidget == pCityDlg->pImprv->pBeginActiveWidgetList) {
            break;
          }

          pTmpWidget = pTmpWidget->prev;

        }                                                                   Return scaled city maSDL_Surface *get_scaled_city_map(struct city *pCity)
{
  SDL_Surface *pBuf = create_city_map(pCity);

  city_map_zoom = ((pBuf->w > pBuf->h) ?
                   (float)adj_size(249) / pBuf->w
                   : (float)adj_size(159) / pBuf->h);

    array = fc_calloc(1, size * sizeof(struct city *));

    qsort(array, non_open_size, sizeof(struct city *),
          city_comp_by_turn_founded);

    /* redraw */Rename city name:
if (pEdit->string_utf8->text != NULL) {
      if (strcmp(pEdit->string_utf8->textpEdit->string_utf8->text);
      }utf8_str(pEdit->string_utf8
  }

    fc_snprintf(name, MAX_LEN_NAME, "%s", pCityDlg->pCity_Name_Edit->string_utf8->text);
    if ((strcmp(city_name(pCity), name) != 0)
        || (SDL_Client_Flags & CF_CHANGED_CITY_NAME)) {
      copy_chars_to_utf8_str(pCityDlg->pCity_Name_Edit->string_utf8                                , 255                                           
  alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255 > 0) {
      redraw_group(pCityDlg->pPanel->pBeginWidgetList,
                                                        } else {
    if (size > 0                garrisonarmy_city_dialog(struct widget *pCityWindow,
                                
  alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255                                                                                                        
  alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255);
, 255, 255, 255, 255                                , 255, 255, 255, 255, 255iness_city_dialog(const struct widget *pCityWindow,
                                        , 255);
                   + pCity->specialists[SP_ELVIS] + pCity->specialists[SP_SCIENTIST]
                || pCity->feel[CITIZEN_CONTENT][j - 1] != pCity->feel[CITIZEN_CONTENT][j]
                || pCity->feel[CITIZEN_ANGRY][j - 1] != pCity->feel[CITIZEN_ANGRY][j]) {

      if (j != 0) {
        putline(pCityWindow->dst->renderer,
                dest.x, dest.y, dest.x + adj_size(176), dest.y,
                get_theme_color(COLOR_THEME_CITYDLG_FRAME));
        dest.y += adj_size(5);
      }

      if (pCity->feel[CITIZEN_HAPPY][j]) {
        pSurf = pIcons->pMale_Happy;
        for (i = 0; i < pCity->feel[CITIZEN_HAPPY][j]; i++) {
          alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
          if (pSurf == pIcons->pMale_Happy) {
            pSurf = pIcons->pFemale_Happy;
          } else {
            pSurf = pIcons->pMale_Happy;
          }
        }
      }

      if (pCity->feel[CITIZEN_CONTENT][j]) {
        pSurf = pIcons->pMale_Content;
        for (i = 0; i < pCity->feel[CITIZEN_CONTENT][j]; i++) {
          alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
          if (pSurf == pIcons->pMale_Content) {
            pSurf = pIcons->pFemale_Content;
          } else {
            pSurf = pIcons->pMale_Content;
          }
        }
      }

      if (pCity->feel[CITIZEN_UNHAPPY][j]) {
        pSurf = pIcons->pMale_Unhappy;
        for (i = 0; i < pCity->feel[CITIZEN_UNHAPPY][j]; i++) {
          alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
          if (pSurf == pIcons->pMale_Unhappy) {
            pSurf = pIcons->pFemale_Unhappy;
          } else {
            pSurf = pIcons->pMale_Unhappy;
          }
        }
      }

      if (pCity->feel[CITIZEN_ANGRY][j]) {
        pSurf = pIcons->pMale_Angry;
        for (i = 0; i < pCity->feel[CITIZEN_ANGRY][j]; i++) {
          alphablit(pSurf, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
          if (pSurf == pIcons->pMale_Angry) {
            pSurf = pIcons->pFemale_Angry;
          } else {
            pSurf = pIcons->pMale_Angry;
          }
        }
      }

      if (pCity->specialists[SP_ELVIS]) {
        for (i = 0; i < pCity->specialists[SP_ELVIS]; i++) {
          alphablit(pIcons->pSpec_Lux, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
        }
      }

      if (pCity->specialists[SP_TAXMAN]) {
        for (i = 0; i < pCity->specialists[SP_TAXMAN]; i++) {
          alphablit(pIcons->pSpec_Tax, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
        }
      }

      if (pCity->specialists[SP_SCIENTIST]) {
        for (i = 0; i < pCity->specialists[SP_SCIENTIST]; i++) {
          alphablit(pIcons->pSpec_Sci, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.x += step;
        }
      }

      if (j == 1) { /* luxury effect */
        dest.x =
              count = dest.y;
        dest.y += (pIcons->pMale_Happy->h -
                   pIcons->pBIG_Luxury->h) / 2;
        alphablit(pIcons->pBIG_Luxury, NULL, pCityWindow->dst->surface, &dest, 255);
        dest.y = count;

          }

        FREESURFACE(pSurf);

        effect_list_iterate(sources, psource) {          alphablit(pTmp, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp->h + 1);

          FREESURFACE(pTmp);
        } effect_list_iterate_end;

        effect_list_clear(sources);

	dest.y = i;

        /* TODO: check if code replacement above is correct */
#if 0
            ||                                if (pTmp1) { /* Temple */
          alphablit(pTmp1, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp1->h + 1);
        }

        if (pTmp2) { /* Colosseum */
          alphablit(pTmp2, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp2->h + 1);
        }

        if (pTmp3) { /* Cathedral */
          alphablit(pTmp3, NULL, pCityWindow->dst->surface, &dest, 255);
          /*dest.y += (pTmp3->h + 1); */
        /* 0 */
      }

      if (j == 3) { /* police effect */
        dest.x = pCityWindow->size.x + adj_size(187) - pIcons->pPolice->w - adj_size(5);
        i = dest.y;
        dest.y +=
          (pIcons->pMale_Happy->h - pIcons->pPolice->h) / 2;
        alphablit(pIcons->pPolice, NULL, pCityWindow->dst->surface, &dest, 255);
        
          }

          }
NO_UNHAPPY);

        effect_list_iterate(sources, psource) {          count += (pTmp->h + 1);

          FREESURFACE(pTmp);
        } effect_list_iterate_end;

        effect_list_clear(sources);

        effect_list_iterate(sources, psource) {          alphablit(pTmp, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp->h + 1);
 
          FREESURFACE(pTmp);
        } effect_list_iterate_end;
        effect_list_iterate(sources, psource) {          alphablit(pTmp, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp->h + 1);

          FREESURFACE(pTmp);
        } effect_list_iterate_end;NO_UNHAPPY);

        effect_list_iterate(sources, psource) {          alphablit(pTmp, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp->h + 1);

          FREESURFACE(pTmp);
        } effect_list_iterate_end;
        effect_list_clear(sources);

        dest.y = i;        dest.x = pCityWindow->size.x + adj_size(187) - pSurf->w - adj_size(2);
        i = dest.y;
        dest.y += (pIcons->pMale_Happy->h - count) / 2;

        if (pTmp1) { /* Cure of Cancer */
          alphablit(pTmp1, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp1->h + 1);
        }

        if (pTmp2) { /* Shakespeare Theater */
          alphablit(pTmp2, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp2->h + 1);
        }

        if (pTmp3) { /* J. S. Bach ... */
          alphablit(pTmp3, NULL, pCityWindow->dst->surface, &dest, 255);
          dest.y += (pTmp3->h + 1);
        }

        if (pTmp4) { /* Hanging Gardens */
          alphablit(pTmp4, NULL, pCityWindow->dst->surface, &dest, 255);
          /*dest.y += (pTmp4->h + 1); */
        
       ||               pCityDlg->pEndCityWidgetList, 0);

  , 255, 255, 255);

  FREESURFACE(pBuf);
          , 255, 255);
    dest.x += step;
  }

  fc_snprintf(cBuf, sizeof(cBuf), Q_("?food:Surplus: %d"),
              pCity->surplus[O_FOODFOOD_SURPLUS, 255);

  FREESURFACE(pBuf);

  /* draw surplus of food */
  if (pCity->surplus[O_FOOD]) {if (count > 2) {
      if (count < 18) {
        step = (adj_size(30) - pBuf->w) / (count - 1);
      } else {
        step = 1;
        , 255              pCity->surplus[O_SHIELD],
            200), 255, 255);
      dest.x += step;
      if (i > pCity->surplus[O_SHIELD]) {
                      pCity->prod[O_SHIELD] + pCity->waste[O_SHIELD] -
              pCity->surplus[O_SHIELDSUPPORT, 255                                              pCity->surplus[O_SHIELD]) > adj_size(30)) {
      step =
                                                  , 255        , 255      , 255        , 255      pWindow->size.y + adj_size(316) + (adj_size(16) - pIcons->pBIG_Trade->h) / 2;
                &dest, 255  /* gold label */
  fc_snprintf(cBuf, sizeof(cBuf), _("Gold: %d (%d) per turn"),
        , 255        step = 1;
        , 255              pCity->prod[O_GOLD] - pCity->surplus[O_GOLDUPKEEP, 255                &dest, 255  /* science label */
  fc_snprintf(cBuf, sizeof(cBuf), _("Science: %d per turn"),
        200);
  dest.y = pWindow->size.y + adj_size(376, 255, 255);
      dest.x +              pCity->prod[O_LUXURYLUX, 255, 255);
      dest.x +, 255
  if (get_city_bonus(pCity, EFT_GROWTH_FOOD) > 0) {, 255, 255fill_rect_alpha(pWindow->dst->surface, &dest, get_theme_color(COLOR_THEME_CITYDLG_GRANARY));

    create_frame(pWindow->dst->surface,
                 dest.x - 1, dest.y - 1, dest.w, dest.h,
                 get_theme_color(COLOR_THEME_CITYDLG_FRAME));
fill_rect_alpha(pWindow->dst->surface, &dest, get_theme_color(COLOR_THEME_CITYDLG_STOCKS));

    create_frame(pWindow->dst->surface,
                 dest.x - 1, dest.y - 1, dest.w, dest.h,
    
    if  (limit < 0) {
	limit = 0;
      }
    } else {
      limit = 0xffff;
    }
, 255 (i > limit - 1) {
	pBuf = pIcons->pBIG_Food_Corr;
      } else {
        if (i > pCity->food_stock - 1), 255 (i > limit - 1) {
	pBuf = pIcons->pBIG_Food_Corr;
      } else {
        if (i > pCity->food_stock - 1) {
	  pBuf = pIcons->pBIG_Food_Surplus;
        }
      }
    }

  } else {
    /* without144, 255);
    FREESURFACE(pBuf);

    /* food stock */

    /* draw bcgdadj_size(144);
    dest.h = i + adj_size(4);

    fill_rect_alpha(pWindow->dst->surface, &dest,
                    get_theme_color(COLOR_THEME_CITYDLG_FOODSTOCK));

    create_frame(pWindow->dst->surface,
                 dest.x - 1, dest.y - 1, dest.w, dest.h,
     
    if  (limit < 0) {
        limit = 0;
      }
    } else {
      limit = 0xffff;
    }
, 255 (i > limit - 1) {
	pBuf = pIcons->pBIG_Food_Corr;
      } else {
        if (i > pCity->food_stock - 1)
    pBuf2 = get_unittype_surface(pUnitType, DIR8_EAST);
    pBuf2 = zoomSurface(pBuf†  ³nÀPƒK¥€4   €‰3   ˆ $'… ,‚K® 
„ B…,€‚ cˆ{ 3‰b” s‹€‚G 3Ž<€I ‚57 q’p… a“a€> ƒ>•m ‚™- 8›I¾ z@¾ W@ # P¾ W@ £	€U M¥{ ‚L¦L… u© ‚M«… {­^ ‚P¯]… ‚v²- ‚@µ$ ]·fµ ƒv¸rŒ J¼x€b ¾)  ‚I¿9€‚( Ä2€S Æ ‚XÇL ƒhÊ,€ ƒ;Ï%€Q aÔ €ƒ/ ƒIØ€_ 'Ü?€u !Þ] \ß ‚à]¡ ƒ8ã¨ Kêz zç4 %é0£ ‚Aêz (í=¥ Kêz ‚ïW &ñv„ ‚Pó! %õs„ „÷ û> ƒ.üR’ (€„ „'C§ Kêz ƒX†^„ MŠ; „'‹	„ M5 „£ Kêz „•„ ƒ™
 ƒaœª …q "” ˆS¦. ,¯ °0„ F§ ½ F§  j³2, DEFAULT_ZOOM * ((float)32 / pBuf2->h),
                        DEFAULT_ZOOM * ((float)32 / pBuf2->h), 1);

    /* blit unit icon */
    dest.x = pWindow->size.x + adj_size(6) + , 255);

    dest.y += (pBuf2->h - pBuf->h) / 2;
    dest.x += pBuf2->w + adj_size(5);

  } else {
    struct impr_type *pImprove = pCity->production.value.building;

    if (improvement_has_flag(pImprove, IF_GOLD)) {

      if (pCityDlg->pBuy_Button
          && get_wstate(pCityDlg->pBuy_Button) != FC_WS_DISABLED) {
        set_wstate(pCityDlg->pBuy_Button, FC_WS_DISABLED);
        widget_redraw(pCityDlg->pBuy_Button);
      }

      /* You can't see capitalization progres */
      count = 0;

    } else {

      if (city_can_buy(pCity) && pCityDlg->pBuy_Button
          && (get_wstate(pCityDlg->pBuy_Button) == FC_WS_DISABLED)) {
        set_wstate(pCityDlg->pBuy_Button, FC_WS_NORMAL);
        widget_redraw(pCityDlg->pBuy_Button);
      }

      cost = impr_build_shield_cost(pImprove);
      count = cost / 10;
    }

    copy_chars_to_string16(pStr, improvement_name_translation(pImprove));
    pBuf = create_text_surf_from_str16(pStr);

    pBuf2 = get_building_surface(pCity->production.value.building);
    pBuf2 = zoomSurface(pBuf2, DEFAULT_ZOOM * ((float)32 / pBuf2->h), DEFAULT_ZOOM * ((float)32 / pBuf2->h), 1);

    /* blit impr icon */
    dest.x = pWindow->size.x + adj_size(6) + , 255);
, 255
      if (!step) {
        step = 1;
      }
fill_rect_alpha(pWindow->dst->surface, &dest,
                    get_theme_color(COLOR_THEME_CITYDLG_SHIELDSTOCK));

    create_frame(pWindow->dst->surface,
                 dest.x - 1, dest.y - 1, dest.w, dest.h,
                 get_theme_color(COLOR_THEME_CITYDLG_FRAME));
                                        pCity->shield_stock, cost, count, PL_("turn", "turns", count));
      }
    } else {
      fc_snprintf(cBuf, sizeof(cBuf), "(%d/%d) %s!",
                  pCity->shield_stock, cost, _("finished"));
    }

    copy_chars_to_string16(pStr, cBuf);
    pStr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_LUX);
, 255);

    FREESTRING16(pStr);
    FREESURFACE(pBuf);

    /* draw shie, 255        dest.x = pWindow->size.x + adj_size(31);
        dest.y += step;
      }
      i++;
      if (i > pCity->shield_stock - 1) {
        pBuf = pIcons->pBIG_Shield_Surplus;
      }
    }
      alphablit(pBuf, NULL, pWindow->dst->surface, &dest, 255
      alphablit(pBuf, NULL, pWindow->dst->surface, &dest, 255
      alphablit(pBuf, NULL, pWindow->dst->surface, &dest, 255
      alphablit(pBuf, NULL, pWindow->dst->surface, &dest, 255);
      dest.x += step;
      FREESURFACE(pBuf);
    }
  }

  pCityDlg->specs[0] = FALSE;
  pCityDlg->specs[1] = FALSE;
  pCityDlg->specs[2] = FALSE;
, 255, 255, 255i               pCityDlg->pEndCityMenuWidgetList, 0);
utf8_str *ps
  if (!pCityDlg->pImprv) {
    pCityDlg->pImprv = fc_calloc(1, sizeof(struct ADVANCED_DLG));
  }
                                
 
  pAdd_Dock = pCityDlg->pAdd_Point;
  pBuf = pLast = pAdd_Dock;

  /* allock new */
  city_built_iterate(pCity, pImprove) {
    pstr = create_utf8_from_char(city_improvement_name_translation(pCity, pImprove), adj_font(10));
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_IMPR);

    ps
    pBuf = create_iconlabel(pLogo, pWindow->dst, pstr,
                           
    prev_y += pBuf->size.h;

      create_vertical_scrollbar(pCityDlg->pImprv, 1, 7, TRUE, TRUE);

      setup_vertical_scrollbar_area(pCityDlg->pImprv->pScroll,
                                              struct city *pCity)
{
  char cbuf[512];

  fc_snprintf(cbuf, sizeof(cbuf),
              _("City of %s (Population %s citizens)"),
              city_name(pCity),
        buf, _(" - DISORDER"), sizeof(cbuf));
  } else {
    if (city_celebrating(pCity)) {
      fc_strlcat(cbuf, _(" - celebrating"), sizeof(cbuf));
    } else {
      if (city_happy(pCity)) {
	fc_strlcat(cbuf, _(" - happy"), sizeof(cbuf));
      }
    }
  }

  if (cma_is_city_under_agent(pCity, NULL)) {
    fc_strlcat(cbuf, _(" - under Citizen Governor control."), sizeof(cbuf));
  }

  copy_chars_to_utf8_str(pWindow->string_utf8, cbutf8_str *pstr = NULL;
  int cs;
  struct player *pOwner = city_owner(pCity);
  SDL_Rect area;

  pstr = create_utf8_str(NULL, 0, adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;
  pWindow = create_window(NULL, ps, 255);

  area = pWindow->area;
utf8_from_char(_("Close Dialog (Esc)"),
utf8_from_char(_("Present units"),
utf8_from_char(_("Supported units"),
utf8utf8
  /* -------- */
utf8utf8_from_char(_("Change production"),
utf8utf8utf8_from_char(_("Previous city"),
utf8
  pCityDlg->pBeginCityWidgetList = pBuf;

    flush_dirty();
                }

/****
  Return whether the dialog for the given city is open.
ENDREP
DELTA 27123 60708 251
SVN  á4âx-ˆH b Œ SÚ  ‚Ž@Œ SÚ  ‚Z‘+ !”Œ SÚ ¨ Nß  ‚–yŸ ™€G SÚ Œ UÞy xœ,€T …Q{€` w¤,€L 
¦n… y§z ‚¨s †ª}€ƒ \²tƒ G  ]µ¯ O·,€ ƒ!º„ O½3 ˆE¾„ ’
ÆM ƒyØV ØV ‚Ý] Mßwœ kàI
  return -1
  return -1
  return -1User has selected city for unit to go to
      if (pUnit) {
        if 
    popdown_goto_airlift_dialog();
    flush_dirty();
  }

  return -1Refresh gotoutf8_str *pstr;
  char cBuf[128];
  int n = 0;
  struct player *owner = NULL;

  if str = create_utf8_from_char(cBuf, adj_font(12));
      pstr->style |= TTF_STYLE_BOLD;

      if str,
    	(WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE));

      if _utf8                                     pGotoDlg->pEndWidgetList->area.x,
                                    pGotoDlg->pEndWidgetList->area.y,
                                    pGotoDlg->pScroll->pUp_Left_Button->size.x -
                                    pGotoDlg->pEndWidgetList->area.x - adj_size(2),
                                    0, pGotoDlg->pBeginActiveWidgetList,
                                   }

  struct widget *pBuf, *pWindow;
  utf8_str *psstr = create_utf8_from_char(_("Select destination"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, psutf8utf8                            ENDREP
DELTA 27322 731 399
SVN  ¼!»e/M  — $… g(… Š
‘€B ˜œŽ g´;Œ ‚¶/€P ƒ¹utf8(combo->string_utf8_utf8_utf8opy_chars_to_utf8_str(combo->string_utf8, label->string_utf8->textutf8_str *pstr_utf8 = pstrpstr) {
    combo->string_utf8->style |= SF_CENTER;
    buf = utf8_str_size(pstrENDREP
DELTA 25465 4141 1046
SVN  õ!û*‚H›h …m š ‡!…}Ÿ Aš@ l|› Aš@€H A ° Aš@ ‚,x¶ Aš@ I“i Q•4‘ A ¤ Aš@€e A © Aš@ !–w€^ A ¹ Aš@ :˜t‘ G « ` @° c£~¥ [ @€I l€2 G Œ ¤h …#¡# X¢v€8 G ¨ Iš@¤ „6ªR ¯Œ %°4‘ e±qŽ X¢v€Y x¶: Z·6› z¸3„ Qº2 0»€‚ ‚p¾c€ zÂx€c aÅ`€ Œ2ÇS€ Õ †Ö+„ FÜ>€‚ +ß+ ‚àV qân¹ cä$€ .æ¾ Zè° jê Xë Rì^ %î2 LïX€‚x 1óOš/* SDL */
#include <SDL.h>  Allocate intelligence dialog
/
void intel_dialog_init(void  Free intelligence dialog
/
void intel_dialog_done(void)
{
  dialog_list_destroy(dialog_list);
}


  Get intelligence dialog towards given player
  User interacted with the intelligence dialog window

  return -1;
}


  User interacted with tech widget
/
static int tech_callback(struct widget *pWidget)
{
  /* get tech help - PORT ME */
  return -1;
}


  User interacted with spaceship widget
/
    popdown_intel_dialog(pPlayer);
    popup_spaceship_dialog(pPlayer);
  }

  return -1;
}


  User interacted with intelligence dialog close button
/
  return -1;
}

****
  Close an intelligence dialog towardsclose_intel_dialog(struct player *p)
{
  popdownCreate an intelligence dialog towardsstatic struct intel_dialog *create_intel_dialog(struct player *pPlayer)
{
  pdialog->pdialog = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  pdialog->pos_x = 0;
  pdialog->pos_y = 0;

  dialog_list_prepend(dialog_list, pdialog);

  return pdialog;
}

****
  Popup
  if (pdialog) {
    popdown pdialog->pdialog->pEndWidgetList);

    dialog_list_remove(dialog_list, pdialog);

    FC_FREE(pdialog->pdialog->pScroll);
    FC_FREE(pdialog->pdialog);
    FC_FREE(pdialog);
  }
}

****
  Popdown all intelligence dialogs
*/
void popdown_intel_dialogs(void)
utf8_str *ps
  if (pdialog) {
      popdown   pdialog->pdialog->pEndWidgetList);
    }

    pstr = create_utf8_from_char(_("Foreign Intelligence Report") , adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, pstr, 0);

    area = pWindow->area;
utf8
    pBuf->key = SDLK_ESCAPE;

    add_to_gui_list(ID_BUTTON, pBuf);
    /* ---------- */

    pLogo = get_nation_flag_surface(nation_of_player(p));

    {
      double zoom = DEFAULT_ZOOM * 60.0 / pLogo->h;

      pText1 = zoomSurface(pLogo, zoom, zoom, 1);
    }

    pLogo = pText1;

                nation_adjective_for_player(p));
    pBuf->info_label = create_utf8_from_char(cBuf, adj_font(12));

    add_to_gui_list(ID_ICON, pBuf);

                nation_adjective_for_player(p));

    pstr = create_utf8_from_char(cBuf, adj_font(14));
    pstr->style |= TTF_STYLE_BOLD;
    pstr->bgcol = (SDL_Color) {0, 0, 0, 0};

    pText1 = create_text_surf_from_utf8(ps
    /* ---------- */

    pCapital = player_capital(p);
    research = research_get(p);
    change_ptsize_utf8(pstr, adj_font(10));
    ps
                  research->client.researching_cost);
      break;
    };

    copy_chars_to_utf8_str(pstr, cBuf);
    pInfo = create_text_surf_from_utf8(psutf8(advance_by_number(i)), adj_font(12));

        add_to_gui_list(ID_ICON, pBuf);

        if (n > ((2 * col) - 1)) {
          set_wflag(pBuf, WF_HIDDEN);
        }

        n++;
      }
    } advance_index_iterate_end;

    pdialog->pdialog->pBeginWidgetList = pBuf;
  
      area.w = MAX(area.w, col * pBuf->size.w + count);
utf8_str(pstr, cBuf);
      pstr->style |= TTF_STYLE_BOLD;
      pText2 = create_text_surf_from_utf8(pstr);
    }

    FREEUTF8STR(ps
    area = pWindow->area;

    /* ------------------------ */
    /* exit button */
    pBuf = pWindow->prev; area.x, dst.y, 0, 0,
                                      pdialog->pdialog->pBeginActiveWidgetList,
                                      pdialog->pdialog->pEndActiveWidgetList);

      if (pdialog->pdialog->pScroll) {
        setup_vertical_scrollbar_area(pdialog->pdialog->pScroll,
                                      area.x + area.w, dst.y,
                            
    flush_dirty();
  }
}
ENDREP
DELTA 27240 3211 9870
SVN  „óY„ò)5„z ½w ˆ Y½ˆ ŒË`ˆ ’×jˆ Š]éˆ rôdˆ Ø7õ^„ „=‚Î„ „.‚Ò\„ †‚×« ˜i‚ÝO„ „‚ö=„ „‚ú^„ „‚þx„ ƒGƒƒ„ ƒxƒ†d„ Š.ƒŠa„ Ÿƒ•¾ K„µ<› ƒ„¶€\ „è4 ‹„»qŒ ƒ^„Ç€@ G„Ë< ‡„Ì€q s„Ô|„ e„Õtutf8_strutf8_strutf8_strutf8_strutf8_strutf8_strutf8utf8utf8utf8_from_char(_("Hide Unit Info Window"),
utf8utf8utf8utf8utf8utf8utf8if (pNewCity_Dlg->pBeginWidgetList->string_utf8->text == NULL)utf8_str(pEdit->string_utf8
    finish_city(pOk_Button->data.tile, pNewCity_Dlg->pBeginWidgetList->string_utf8->text);
utf8_str *psstr = create_utf8_from_char(_("Build City"), adj_font(12));
  pssstr = create_utf8_from_char(_("What should we call our new city?"), adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
  pstr->fgcol = *get_theme_color(COLOR_THEME_NEWCITYDLG_TEXT);
  pLabel = create_iconlabel(NULL, pWindow->dst, psutf8ENDREP
DELTA 23270 28219 24
SVN  ŠJŠB* ‡2 œ  ‡NŽ F‰utf8_from_char(char_string, utf8_str *pstrENDREP
DELTA 27201 76810 619
SVN  ÅÅ0‚; œ] Œ „Lœm€@ H¡z ƒ\¢C¨ …,¦I¹ ‚¬/ U®I€ “y±!utf8_str *psstr = create_utf8_from_char(_("Find City") , adj_font(12));
  pssutf8_from_char(_("Close Dialog (Esc)"),
str = create_utf8_from_char(cBuf, adj_font(10));
      pss_utf8->style &= ~SF_CENTER;
      pBuf->string_utf8->fgcol = *(get_player_color(tileset, city_owner(pCity))->color);
      pBuf->string_utf8ENDREP
DELTA 27669 0 230
SVN  ‚Êi‚Ê7r‡$ ÐM ˆ ŠBÐUˆ §bÛŒ „$ƒ€U ‚0‰§ ‹5€, uŽ€S :‡ 2‘I… ¤’}€ «]¸$µ qä7 ˜Zæ)€1 ‚?‚€6Š ƒ‚ƒ  Ãk‚†~utf8_strutf8_strutf8_str *psstr = create_utf8_from_char(unit_name_translation(pUnit), adj_font(12));
      pstr->style |= TTF_STYLE_BOLD;
      pstr->bgcol = (SDL_Color) {0, 0, 0, 0};
      pName = create_text_surf_from_utf8(pstr);

      pschange_ptsize_utf8(pstr, adj_font(10));utf8_str(pstr, vetname);
        pstr->fgcol = *get_theme_color(COLOR_THEME_MAPVIEW_UNITINFO_VETERAN_TEXT);
        pVet_Name = create_text_surf_from_utf8(pstr);
        psin, city, etc.) */
      pstr->style |= SF_CENTER;

      copy_chars_to_utf8_str(psutf8(ps_utf8utf8_str(pstr, buffer);

        pInfo_II = create_text_surf_smaller_than_w(pstr, width - BLOCKU_W - adj_size(4));
      }

      FREEUTF8STR(psstr = create_utf8_from_char(buffer, 10);
          pssstr = create_utf8_from_char(buf, adj_font(14));
        pstr->style = SF_CENTER;
        pstr->bgcol = (SDL_Color) {0, 0, 0, 0};
        buf_surf = create_text_surf_from_utf8(psUTF8STR(psENDREP
DELTA 27322 24052 2049
SVN  ÐQÐp9 z  ‚|™ ”!) ƒK¤L‹ ‚)¨'‰ ƒªW´ „®‹ ²  œ³# )Ï(_utf8 != NULLutf8(pWindow->string_utf8_utf8 != NULLutf8_str *t_utf8 = ttitle != NULL) {
    SDL_Rect size = utf8_str_size(tutf8_str *ttENDREP
DELTA 18151 15273 100159
SVN  †  †  ’O‚ÏH ˆg ƒ mˆg †)ŠT L~ q’J 5”:‰ ‚•J€ƒU ‚˜p ušw <œp¼ Nžp ‚ =€a U£!€P P¥?€ z¨)€„1 bª;€. \¬vª ®€‚
 ]±0 zƒŒ(€g V³6€U S´k€] ‚P·/€_ ƒ”v¡ ‚$¼! 1¾I  uÀ bÁ aÂ{ aƒž{€f ‚"Æ1€N jÉ€x `Ê}š Eˆ  SÌ<‘ A€y }Î9€3 aÐs€†d HƒÀ|€Y vÙy cÚq„ ÜY eÝu€x .àB€b vé,€p é,€` é,€ƒU ~ív€ƒ\ \ò0€ƒX (ö%€% Kˆ}€e `?€{ Kˆ}€e `? G‚?€" Kˆ}€	 zþ%€, Kˆ}€	 zþ%€‚' Kˆ}€e `?€ƒZ Kˆ}€f 2? Ox |‘K€X L“$ g”p ‚•W€@ w˜:… wš0€6 ,†›i vž%€> X¬u€8 G£š §-‡ ¥|‡ §‡ ¨>‡ G©d€> ¬u€I ;®U€‚H ²e€> µ7ˆ ¶H€> ¹.ˆ º;€> ½!ˆ sÂ5 c¿!€‚$ )Â5€‚* pÆ€E Ç4› BÈOš Ë<š Ë<˜ Ë<˜ Ë<¦ Ë<Ÿ Ë<€‚W Ô• G  ‚Õz€a ‚Øs€„g ß  hà$ ‚?á %ãM€‰B bî%€‚ Eñ€~ óF· ]ü#€‚$ Eü;€‚j \ú{€J ü!€. 1þg² ‚€J€†r 6‚‡ i…º3 ‚	‚‰8† ƒ‚‹J eÇn M¢:€Y a‚@„ A‚’@ ‚‚‘e ‚_‚“j ‚–H± Oƒ¯2€r l‚™? ‚‚š7‘ G  b…ï@ ‚ž |‚ º G  ^…ï@€u ‚ ‚£0€T $‚¥W€‚ ‚© ‚ªŠ /‚«6€… ‚±Š |‚²&´ ‚³X€‚ ‚-‚· ‚¹;Š ‚)‚º`¯ l‚½0€X ‚I‚¾y€Q ‚‚Â ƒQ‚Ä9Ž ‚‚È‡ ‚Ä? ‚B‚Ë7¿ 9‚Î= }‚Ïx i‚Ñy€  ‚Ó^€ J‚Õx‘ G  b…ï@ ‚×{€A c‚Ù^€f h‚Û1º ‚ÜM€[ ‚å{¬ E‚à€O N‚àv€‚# w‚ë8 ‚*‚äT€u Q‚çv€& P‚és€ ‚‚ë8 ‚‚íM€K _‚ð?€Z T‚ò{€L N‚õ. ‚	‚ö{ ‚ù¬ ^‚–w {‚ûŒ F¥?€p L‚þ_ J‚ò{€X ‚OƒT ;ƒ„$€‚S f®/€‚d zƒŒ(€‚ 2ƒŽ {ƒ; ‚Nƒ‘<€b ƒ”v ‚hƒ– 1¾I  uÀ @ƒ›K >Â{£ -ƒž{€I G  Fƒ¡<€ˆy ƒƒ«} |ƒ¯€R ‚	ƒ± Ÿ ƒƒ³@€O ‚+ƒ·+ ƒ¹W€] ƒ½~€^ HƒÀ|“ X…ý)€„3 fƒÆm€‚u qƒÊT€‚ }ƒÍv€ ]ƒÏv€c fƒÒZ€‰t KƒÝx€‚ ‚8ƒà_ ‚ƒã› ‚#ƒå3¶ RƒÊs€„7 ƒà_ 7ƒî wƒã› cƒða› :ƒå3‰ Pƒïx’ qƒóq€„ ƒø\€~ &…ÿ>© I…Ó~€… A„‚&€	 L„„|€‚  e„‡n€Šc x„“g€D )„—<ˆ .„˜p¨ „š&¨ \„›K „)® Rº~ n„Ÿ>€ 4„¡1¼ )„£% ‚?„¤P Q„£4 ƒ„§n t„ªt€H `„­>€V 
„¯n… „°x€ V„³€| N„µb€‚= „¹}‰ n„Ài€‚ }„¾8 #„¿7 }„À\ 3„Â]€‚  „Å%€. ƒb„Æt€b ‚„Ë€† „ÓY  R„Õ€J h„×)€0 o„Ù; „s„Û'… ‚@„à ‚l„â[– „åG€‚ „è/€S D„é~ˆ E„êC€„w G  ]„ñ'€G G Š „ñ0ƒ M„ò7 ‚h„õh€@ D„øJ€f 6„ú~€ 
„ýlˆ y„ÿ€K P…€Z 
…ƒ:€ z…Ÿ}€„ a…”4€b ƒ…‹1€ƒ& ~…’R€A ‚)…”€\ }…—… ‚…˜€„a …že… z…Ÿ}» …¡)€‚> …©€_ …©€‚[ …­® o…®6€…  K…´|€W t…¶&€n „T…¸m h…½B‘ G  r…ï@ \‚–x \…ÁO‘ G  ‚…Ä€ G  ^…ï@€4 p…É7€ƒ HƒÀ| …Îr€] e…Ðh¨ P…Òw€/ `…Õt» )†…/ s…Ø5€a Q†Š5€‚( "…ÞO€s N…àr€H ‚…ã€B }…åf ‚N…æe€ ,†›i€} W†ž?€] K†Ÿ5¨ G  ‚B…ï@€E L…òH’ G  ^…ï@€9 ‚#…öD€ƒ3 HƒÀ| …Îr€Y cÚq¨ P…Òw $†‚g€- )†…/ s…Ø5€_ …÷3 N†Š8€K n†Œ{¾ ‚d†(– N…àr€fc_2   total->Unit_type_id uti = utype_index(pUnitType);
      int num_units;

      /* Account for build slots in city */
      (void) city_production_build_units(pCity, TRUE, &num_units);
      /* Unit is in progress even if it won't be done this turn */
      num_units = MAX(num_units, 1);
      (entries[uti].building_count) += num_units;
      (total->building_count) += num_units;
      entries[uti].soonest_completions =
        MIN(entries[uti].soonest_completions,
        
    dsend_packet_unit_type_upgrade(&client.conn, ut1);
  }
  pUnits_Upg_Dlg->pEndWidgetList);
      FC_FREE(pUnits_Upg_Dlg);
      flush_dirty();
    }
  }
tBuf[128], cBuf[128];
    struct widget *pBuf = NULL, *pWindow;
    utf8_str *psselected_widget = NULL;
    widget_redraw(pWidget);
    widget_mark_dirty(pWidget);

    pUnits_Upg_Dlg = fc_calloc(1, sizeof(struct SMALL_DLG));

    fc_snprintf(tBuf, ARRAY_SIZE(tBuf), PL_("Treasury contains %d gold.",
                                            "Treasury contains %d gold.",
                                            client_player()->economic.gold),
                client_player()->economic.gold);

    fc_snprintf(cBuf, sizeof(cBuf),
          /* TRANS: Last %s is pre-pluralised "Treasury contains %d gold." */
          PL_("Upgrade as many %s to %s as possible for %d gold each?\n%s",
              "Upgrade as many %s to %s as possible for %d gold each?\n%s",
              valuetBuf);

    pstr = create_utf8_from_char(_("Upgrade Obsolete Units"), adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, pstr, 0);

    add_to_gui_list(ID_WINDOW, pWindow);

    /* create text label */
    pstr = create_utf8_from_char(cBuf, adj_font(10));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
    pstr->fgcol = *get_theme_color(COLOR_THEME_UNITUPGRADE_TEXT);

    pText = create_text_surf_from_utf8(pstr);
    FREEUTF8STR(pstr);
                pWindow->dst, _("No"),
                                              adj_font(12), 0);

    area.h += (pBuf->size.h + adj_size(20));

    add_to_gui_list(ID_BUTTON, pBuf);

      pBuf->action = ok_upgrade_unit_window_callback;
      set_wstate(pBuf, FC_WS_NORMAL);

    pUnits_Upg_Dlg->pBeginWidgetList = pBuf;

    resize_window(pWindow, NULL, get_theme_color
    widget_set_position(pWindow,, 255);
    FREESURFACE(pText);
Units_Upg_Dlg->pBeginWidgetList, pWindow, 0);

    widget_mark_dirty(pWindow);
    flush_dirty();
  }
            pUnits_Upg_Dlg->pEndWidgetList);
         FC_FREE(pUnits_Upg_Dlg);pUnitsDlg->pEndWidgetList);
      FC_FREE(pUnitsDlg->pScroll);
      FC_FREE(pUnitsDlg);
      flush_dirty();
    }
  }
Rebuild the units report.

                SDL_Color bg_color = {255, 255, 255, 136};
  struct widget *pBuf = NULL;
  struct widget *pWindow, *pLast;
  utf8_str *psbuf[64];
  SDL_Rect dst;
  bool upgrade = FALSE;
  SDL_Rect area;

  if (pUnitsDlg) {
    popdown_window_group_dialog(pUnitsDlg->pBeginWidgetList,
                                
  }

  fc_snprintf(cbuf, sizeof(cbuf), _("active"));
  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= SF_CENTER;
  pText1 = create_text_surf_from_utf8(pstr);

  fc_snprintf(cbuf, sizeof(cbuf), _("under\nconstruction"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pText2 = create_text_surf_from_utf8(pstr);

  fc_snprintf(cbuf, sizeof(cbuf), _("soonest\ncompletion"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pText5 = create_text_surf_from_utf8(pstr);

  fc_snprintf(cbuf, sizeof(cbuf), _("Total"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pText3 = create_text_surf_from_utf8(pstr);

  fc_snprintf(cbuf, sizeof(cbuf), _("Units"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pText4 = create_text_surf_from_utf8(pstr);
  name_w = pText4->w;
  FREEUTF8STR(pstr);

  /* --------------- */
  pstr = create_utf8_from_char(_("Units Report"), adj_font(12));
  psstr, 0);
  set_wstate(pWindow, FC_WS_NORMAL);
  pWindow->action = units_dialog_callback;
utf8buf, sizeof(cbuf), "%d", total->active_count);

  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr,
                          WF_RESTORE_BACKGROUND);
buf, sizeof(cbuf), "%d", total->upkeep[O_SHIELD]);

  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);

  fc_snprintf(cbuf, sizeof(cbuf), "%d", total->upkeep[O_FOOD]);

  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);
buf, sizeof(cbuf), "%d", total->upkeep[O_GOLD]);

  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);
buf, sizeof(cbuf), "%d", total->building_count);

  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr,
                          WF_RESTORE_BACKGROUND);

  pBuf->size.w = pText2->w + adj_size(6);
  add_to_gui_list(ID_LABEL, pBuf);

  /* ------------------------- */
  pLast = pBuf;
  count = 0;
  unit_type_iterate(i) {
    if ((units[utype_index(i)].active_count > 0)
   
      /* unit type icon */
      pBuf = create_iconlabel(adj_surf(get_unittype_surface(i, direction8_invalid())), pWindow->dst, NULL,
                              WF_RESTORE_BACKGROUND | WF_FREE_THEME);
      if (count > adj_size(72)) {
        set_wflag(pBuf, WF_HIDDEN);
      }
      hh = pBuf->size.h;
      add_to_gui_list(MAX_ID - utype_number(i), pBuf);

      /* unit type name */
      pstr = create_utf8_from_char(utype_name_translation(i), adj_font(12));
      psstr,
                              (WF_RESTORE_BACKGROUND | WF_SELECT_WITHOUT_BAR));
      if (upgrade) {
        pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_UNITUPGRADE_TEXT);
        pBuf->action = popup_upgrade_unit_callback;
        set_wstate(pBuf, FC_WS_NORMAL);
      } else {
        pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_UNITSREP_TEXT);
      }
      pBuf->string_utf8->style &= ~SF_CENTER;
      if (count > adj_size(72)) {
        
      /* active */
      fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].active_count);
      pstr = create_utf8_from_char(cbuf, adj_font(10));
      psstr,
                              WF_RESTORE_BACKGROUND);
      if (count > adj_size(72)) {
        1->w + adj_size(6);
      add_to_gui_list(MAX_ID - utype_number(i), pBuf);

      /* shield upkeep */
      fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].upkeep[O_SHIELD]);
      pstr = create_utf8_from_char(cbuf, adj_font(10));
      psstr,
                              WF_RESTORE_BACKGROUND);
      if (count > adj_size(72)) {
        food upkeep */
      fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].upkeep[O_FOOD]);
      pstr = create_utf8_from_char(cbuf, adj_font(10));
      psstr,
                              WF_RESTORE_BACKGROUND);
      if (count > adj_size(72)) {
        set_wflag(pBuf, WF_HIDDEN);
      }

      /* gold upkeep */
      fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].upkeep[O_GOLD]);
      pstr = create_utf8_from_char(cbuf, adj_font(10));
      psstr,
                              WF_RESTORE_BACKGROUND);
      if (count > adj_size(72)) {
        set_wflag(pBuf, WF_HIDDEN);
      }

      /* building */
      if (units[utype_index(i)].building_count > 0) {
        fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].building_count);
      } else {
        fc_snprintf(cbuf, sizeof(cbuf), "--");
      }
      pstr = create_utf8_from_char(cbuf, adj_font(10));
      psstr,
                              WF_RESTORE_BACKGROUND);
      if (count > adj_size(72)) {
        2->w + adj_size(6);
      add_to_gui_list(MAX_ID - utype_number(i), pBuf);

      /* soonest completion */
      if (units[utype_index(i)].building_count > 0) {
        fc_snprintf(cbuf, sizeof(cbuf), "%d %s", units[utype_index(i)].soonest_completions,
                    PL_("turn", "turns", units[utype_index(i)].soonest_completions));
      } else {
        fc_snprintf(cbuf, sizeof(cbuf), "--");
      }

      pstr = create_utf8_from_char(cbuf, adj_font(10));
      psstr,
                              WF_RESTORE_BACKGROUND);

      if (count > adj_size(72)) {
        
               + (adj_size(4) * pText1->w + adj_size(46)) + (pText2->w + adj_size(16))
  
  area.h += pText1->h + adj_size(10);
  area.w += adj_size(2);
#if 0#endif /* 0 */

  area = pWindow->area;

  widget_set_position(pWindow,
                      (main_window_width() - pWindow->size.w) / 2,
                      (main_window_height()fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));
 - pText3->w) / 2;
  alphablit(pText3, NULL, pWindow->theme, &dst, 255);
  FREESURFACE(pText3);

  /* total active widget */
  pBuf = pBuf->prev;
  pBuf->size.x = area.x + name_w
    +dst.y;

  /* total shieldsdst.y;
dst.y;
dst.y;
dst.y;
fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));
, 255);
  FREESURFACE(pText4);

  /* active count background and label */fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));

  dst.x += adj_size(3);
  alphablit(pText1, NULL, pWindow->theme, &dst, 255);
  ww = pText1->w;
  hh = pText1->h;
  FREESURFACE(pText1);
fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));
, 255);
fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));
, 255);
fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));
, 255);
fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));

  dst.x += adj_size(3);
  alphablit(pText2, NULL, pWindow->theme, &dst, 255);
  FREESURFACE(pText2);
fill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_UNITSREP_FRAME));

  dst.x += adj_size(3);
  alphablit(pText5, NULL, pWindow->theme, &dst, 255);
  FREESURFACE(pText5);

  if 
    pBuf = pBuf->prev;
    while (TRUE) {
      /* Unit type icon */
      /* Unit type name */
      /* Number active */
      /* Shield upkeep */
      /* Food upkeep */
      /* Gold upkeep */
      /* Number under construction */
      /* Soonest completion */
      start_y += (hh >> 1);
      if (pBuf == pUnitsDlg->pBeginActiveWidgetList) {
        break;
      }
      pBuf = pBuf->prev;
    }

    if (pUnitsDlg->pScroll) {
      setup_vertical_scrollbar_area(pUnitsDlg->pScroll,
                                    area.x + area.w, area.y,
                                    area.h, TRUE);
    }

  flush_dirty();
}

buf;
    bool is_in_list = FALSE;
    char cbuf[32];
    bool upgrade;
    bool search_finished;

          || (units[utype_index(i)].building_count > 0)) {
        is_in_list = FALSE;

        pbuf = pWidget; /* unit type icon */
        while (pbuf) {
          if ((MAX_ID - pbuf->ID) == utype_number(i)) {
            is_in_list = TRUE;
            pWidget = pbuf;
            break;
          }
          if (pbuf->prev->prev->prev->prev->prev->prev->prev ==
              pUnitsDlg->pBeginActiveWidgetList) {
            break;
          }

          /* first widget of next list entry */
          pbuf = pbuf->prev->prev->prev->prev->prev->prev->prev->prev;
        }

        if (!is_in_list) {
        bbbuf = pbuf->prev; /* unit type name */
            if (upgrade) {
              pbuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_UNITUPGRADE_TEXT);
              pbuf->action = popup_upgrade_unit_callback;
              set_wstate(pbuf, FC_WS_NORMAL);
            }

            pbuf = pbuf->prev; /* active */
            fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].active_count);
            copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

            pbuf = pbuf->prev; /* shield upkeep */
            fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].upkeep[O_SHIELD]);
            copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

            pbuf = pbuf->prev; /* food upkeep */
            fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].upkeep[O_FOOD]);
            copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

            pbuf = pbuf->prev; /* gold upkeep */
            fc_snprintf(cbuf, sizeof(cbuf), "%d", units[utype_index(i)].upkeep[O_GOLD]);
            copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

            pbuf = pbuf->prev; /* building */
            if (units[utype_index(i)].building_count > 0) {
              fc_snprintf(cbuf, sizeof(cbbuf, sizeof(cbuf), "--");
            }
            copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

            pbuf = pbuf->prev; /* soonest completion */
            if (units[utype_index(i)].building_count > 0) {
              fc_snprintf(cbuf, sizeof(cbbuf, sizeof(cbuf), "--");
            }
            copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

            pWidget = pb
            /* search it */
            pbuf = pWidget pbuf->prev);
            } while (((MAX_ID - pbuf->prev->ID) != utype_number(i))
                     && (pbuf->prev != pUnitsDlg->pBeginActiveWidgetList));

            if (pbuf->prev == pUnitsDlg->pBeginActiveWidgetList) {
              /* list entry not found - can this really happen? */ pbuf->prev);
              pWidget = pbuf->prev; /* pUnitsDlg->pBeginActiveWidgetList */
              search_finished = TRUE;
            } else {
              /* found it */
              pbuf = pbuf->prev; /* first widget (icon) of list entry */
            }
          }
        }
      } else { /* player has no unit of this type */
        if (pbuf && pbbuf->ID)) {
            continue;
          } else {
            pbuf = pbbuf->prev);
            } while (((MAX_ID - pbuf->prev->ID) == utype_number(i))
                     && (pbuf->prev != pUnitsDlg->pBeginActiveWidgetList));
            if (pbbuf->prev);
            }
            pWidget = pbbuf = pUnitsDlg->pEndWidgetList->prev->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", units_total.active_count);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

    /* total shields cost */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", units_total.upkeep[O_SHIELD]);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

    /* total food cost widget */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", units_total.upkeep[O_FOOD]);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

    /* total gold cost widget */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", units_total.upkeep[O_GOLD]);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

    /* total building count */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", units_total.building_count);
    copy_chars_to_utf8_str(pbuf->string_utf8, cb
  if }
    popdown_window_group_dialog(pUnitsDlg->pBeginWidgetList,
                          
/*  (pEconomyDlg) {
      if (pEconomy_Sell_Dlg) {
                                            pEconomy_Sell_Dlg->pEndWidgetList);
        FC_FREE(pEconomy_Sell_Dlg);
  return -1;
}


    default:
      return -1;
    }
  }

  return -1;
}

Uint16 report_scroll_mouse_button_up(SDL_MouseButtonEvent *pButtonEvent,
                                            SDL_MouseMotionEvent *pMotionEvent,
                                                buf = NULL;
  char cbuf[8];
  int dir, inc, x, *buf_rate = NULL;

  pMotionEvent->x -= pMotion->pHoriz_Src->dst->dest_rect.x;

  if ((abs(pMotionEvent->x - pMotion->x) > 7)
      && (pMotionEvent->x >= pMotion->min)
      && (pMotionEvent->x <= pMotion->max)) {

    
      if  (pMotion->tax + (-1 * inc) <= pMotion->gov_max
              && pMotion->tax + (-1 * inc) >= 0) {
            /* tax in range */
            pbuf = pMotion->pHoriz_Dst;
            pMotion->pHoriz_Dst = NULL;
            buf_rate = pMotion->dst_rate;
            pMotion->dst_rate = &pMotion->tax;
            pMotion->pLabel_Dst = pTax_Label;
          } else {
            pMotion->x = pMotion->pHoriz_Src->size.x;
            return ID_ERROR;
          }
	}
      } else {
        if (pMotion->tax + (-1 * inc) > pMotion->gov_max
            || pMotion->tax + (-1 * inc) < 0) {
          pMotion->x = pMotion->pHoriz_Src->size.x;
          return ID_ERROR;
        
      if 
      pMotion->pHoriz_Src->size.x += dir;
      if 
      fc_snprintf(cbuf, sizeof(cbuf), "%d%%", *pMotion->src_rate);
      copy_chars_to_utf8_str(pMotion->pLabel_Src->string_utf8, cbuf);
      fc_snprintf(cbuf, sizeof(cbuf), "%d%%", *pMotion->dst_rate);
      copy_chars_to_utf8_str(pMotion->pLabel_Dst->string_utf8, cbuf);

      if buf != NULL) {
        pMotion->pHoriz_Dst = pbbuf = NULL;
      }

      pMotion->x = pMotion->pHoriz_Src->size.x;
    }
  } /* if */

    pMotion.pHoriz_Src = pHoriz_Src;
    pMotion.pLabel_Src = pHoriz_Src->prev;
 
      break;
 /* lux
      break;

      default:
        return -1;
    }

    if , NULL);
    gui_event_loop((void *)(&pMotion), NULL, NULL, NULL, NULL, NULL,
                   report_scroll_mouse_button_up,
, NULL);
    MOVE_STEP_Y = DEFAULT_MOVE_STEP;

END:
    unselect_widget_action();
    selected_widget = pHoriz_Src;
    set_wstate(pHoriz_Src, FC_WS_SE
  return -1;
}


    if (C_S_RUNNING != client_state()) {
      return -1;
    }

    /* Luxuries Scrollbar */
    pBuf = pBuf->next->next->next;
    luxury = *(int *)pBuf->data.ptr;
   || science != client.conn.playing->economic.science
   
    widget_redraw(pButton);
    widget_flush(pButton);
  }

  return -1;
}

static void en
  set_wstate(pBuf, FC_WS_NORMAL);

  /* lux
  /* sci lock */
  pBuf = pBuf->prev->prev;
  set_wstate(pBuf, FC_WS_NORMAL);

  /* update button */
  pBuf = pBuf->prev->prev;
  set_wstate(pBuf, FC_WS_NORMAL);

  /* cancel button */
  pBuf = pBuf->prev;
  set_wstate(pBuf, FC_WS_NORMAL);

  set_group_state(pEconomyDlg->pBeginActiveWidgetList,
                  pEconomyDlg->pEndActiveWidgetList, FC_WS_NORMAL);
  if 
  set_wstate(pBuf, FC_WS_DISABLED);

  /* lux scrollbar */
  pBuf = pBuf->prev;
  set_wstate(pBuf, FC_WS_DISABLED);

  /* sci scrollbar */
  pBuf = pBuf->prev;
  set_wstate(pBuf, FC_WS_DISABLED);

  /* update button */
  pBuf = pBuf->prev->prev;
  set_wstate(pBuf, FC_WS_DISABLED);

  set_group_state(pEconomyDlg->pBeginActiveWidgetList,
                  pEconomyDlg->pEndActiveWidgetList, FC_WS_DISABLED);
  if 
    imp = pImpr->data.cont->id0;
    total_count = pImpr->data.cont->id1;

    /* send sell */
    city_list_iterate(client.conn.playing->cities, pCity) {
      if count++;

        city_sell_improvement(pCity, imp);
      }
    } city_list_iterate_end;

    if (count == total_count) {
      del_widget_from_vertical_scroll_widget_list(pEconomyDlg, pImpr);
    }
  }

  return -1;
}


static int popup_sell_impvutf8_str *psif (pEconomy_Sell_Dlg) {
      return 1;
    }

    set_wstate(pWidget, FC_WS_NORMAL);
    selected_widget = NULL;
    widget_redraw(pWidget);
    widget_mark_dirty(pWidget);

    pEconomy_Sell_Dlg = fc_calloc(1, sizeof(struct SMALL_DLG));
  {
        count++;
        gold += value;
      }
    } city_list_iterate_end;

    if 
    }

    pstr = create_utf8_from_char(_("Sell It?"), adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, pstr, 0);

    pWindow->action = sell_impv_window_callback;
    set_wstate(pWindow, FC_WS_NORMAL);

    pEconomy_Sell_Dlg->pEndWidgetList = pWindow;

    add_to_gui_list(ID_WINDOW, pWindow)
    /* create text label */
    pstr = create_utf8_from_char(cBuf, adj_font(10));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
    pstr->fgcol = *get_theme_color(COLOR_THEME_SELLIMPR_TEXT);

    pText = create_text_surf_from_utf8(pstr);
    FREEUTF8STR(pstr);

    area.w = MAX(area.w, pText->w + adj_size(20));
    area.h += (pText->h + adj_size(10));
                pWindow->dst, _("No"),
                                              adj_font(12), 0);

    pBuf->action = cancel_sell_impv_callback;
    set_wstate(pBuf, FC_WS_NORMAL);

    area.h += (pBuf->size.h + adj_size(20));

    add_to_gui_list(ID_BUTTON, pBuf);

    pEconomy_Sell_Dlg->pBeginWidgetList = pBuf;

    resize_window(pWindow, NULL, get_theme_color, 255);
    FREESURFACE(pText);
adj_size(10) - pBuf->size.w;
    }

    widget_mark_dirty(pWindow);
    flush_dirty();
  }

  return -1;
}

buf = pEconomyDlg->pEndWidgetList;
    int tax, total, entries_used = 0;
    char cbuf[128];
    struct improvement_entry entries[B_LAST];

    get_economy_report_data(entries, &entries_used, &total, &tax);

    /* tresure */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", client.conn.playing->economic.gold);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);
    remake_label_size(pbuf);

    /* Icome */
    pbuf = pbuf->prev->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", tax);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);
    remake_label_size(pbuf);

    /* Cost */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", total);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);
    remake_label_size(pbuf);

    /* Netto */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", tax - total);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);
    remake_label_size(pbuf);
    if (tax - total < 0) {
      pbuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_ECONOMYDLG_NEG_TEXT);
    } else {
      pbuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_ECONOMYDLG_TEXT);
    }
                                           pEconomy_Sell_Dlg->pEndWidgetList);
       FC_FREE(pEconomy_Sell_Dlg);
    }
    popdown_window_group_dialog(pEconomyDlg->pBeginWidgetList,
                                 2
#define TARGETS_COL       struct widget *pBuf;
  struct widget *pWindow , *pLast;
  utf8_str *pstr, *psb  SDL_Surface *pTreasuryText;
  SDL_Surface *pTaxRateText;
  SDL_Surface *pTotalIncomeText;
  SDL_Surface *pTotalCostText;
  SDL_Surface *pNetIncomeText;
  SDL_Surface *pMaxRateText;

  if (pEconomyDlg) {
    return;
  }

  pEconomyDlg = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  get_economy_report_data(entries, &entries_used, &total, &tax);

  /* --------------- */
  pstr = create_utf8_from_char(_("Economy Report"), adj_font(12));
  psstr, 0);
  pEconomyeconomy_dialog_callback;

  add_to_gui_list(ID_ECONOMY_DIALOG_WINDOW, pWindow);

  area = pWindow->area;

  /* ------------------------- */

  /* "Treasury" text surface */
  fc_snprintf(cbuf, sizeof(cbuf), _("Treasury: "));
  pstr2 = create_utf8_from_char(cbuf, adj_font(12));
  pstr2->style |= TTF_STYLE_BOLD;
  pTreasuryText = create_text_surf_from_utf8(pstr2);
  w3 = MAX(w3, pTreasuryText->w);

  /* "Treasury" value label*/
  fc_snprintf(cbuf, sizeof(cbuf), "%d", client.conn.playing->economic.gold);
  pstr = create_utf8_from_char(cbuf, adj_font(12));
  psstr,
                          (WF_RESTORE_BACKGROUND|WF_ICON_CENTER_RIGHT));

  add_to_gui_list(ID_LABEL, pBuf);

  w = MAX(w, pBuf->size.w);
  h += pBuf->size.h;

  /* "Tax Rate" text surface */
  fc_snprintf(cbuf, sizeof(cbuf), _("Tax Rate: "));
  copy_chars_to_utf8_str(pstr2, cbuf);
  pTaxRateText = create_text_surf_from_utf8(pstr2);
  w3 = MAX(w3, pTaxRateText->w);
buf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.tax);
  pstr = create_utf8_from_char(cbuf, adj_font(12));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);

  add_to_gui_list(ID_LABEL, pBuf)buf, sizeof(cbuf), _("Total Income: "));
  copy_chars_to_utf8_str(pstr2, cbuf);
  pTotalIncomeText = create_text_surf_from_utf8(psbuf, sizeof(cbuf), "%d", tax);
  pstr = create_utf8_from_char(cbuf, adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);

  add_to_gui_list(ID_LABEL, pBuf)buf, sizeof(cbuf), _("Total Cost: "));
  copy_chars_to_utf8_str(pstr2, cbuf);
  pTotalCostText = create_text_surf_from_utf8(pstr2);

  /* "Total Cost" value label */
  fc_snprintf(cbuf, sizeof(cbuf), "%d", total);
  pstr = create_utf8_from_char(cbuf, adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);

  add_to_gui_list(ID_LABEL, pBuf);

  w = MAX(w, pBuf->size.w);
  h += pBuf->size.h;

  /* "Net Income" text surface */
  fc_snprintf(cbuf, sizeof(cbuf), _("Net Income: "));
  copy_chars_to_utf8_str(pstr2, cbuf);
  pNetIncomeText = create_text_surf_from_utf8(pstr2);
  w3 = MAX(w3, pNetIncomeText->w);

  /* "Net Icome" value label */
  fc_snprintf(cbuf, sizeof(cbuf), "%d", tax - total);
  pstr = create_utf8_from_char(cbuf, adj_font(12));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  if (tax - total < 0) {
    pstr->fgcol = *get_theme_color(COLOR_THEME_ECONOMYDLG_NEG_TEXT);
  }

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND);

  add_to_gui_list(ID_LABEL, pBuf);

  w = MAX(w, pBuf->size.w);
  h += pBuf->size.h;

  /* gov and taxrate */
  fc_snprintf(cbuf, sizeof(cbuf), _("%s max rate : %d%%"),
              government_name_translation(pGov),
          utf8_str(pstr2, cbuf);
  pMaxRateText = create_text_surf_from_utf8(pstr2);

  FREEUTF8STR(pstr2);

  /* ------------------------- */
  /* lux rate */

  /* lux rate lock */
  fc_snprintf(cbuf, sizeof(cbuf), _("Lock"));
  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pss                           
  w2 += adj_size(184);  

  /* lux rate iconlabel */
buf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.luxury);
  pstr = create_utf8_from_char(cbuf, adj_font(11));
  pstr->style |= TTF_STYLE_BOLD;

  pBuf = create_iconlabel(pIcons->pBIG_Luxury, pWindow->dst, pstr,
                          WF_RESTORE_BACKGROUND);
  add_to_gui_list(ID_CHANGE_TAXRATE_DLG_LUX_LABEL, pBuf);

  w2 += (adj_size(5) + pBuf->size.w + adj_size(10));

  /* ------------------------- */
  /* science rate */

  /* science rate lock */
  fc_snprintf(cbuf, sizeof(cbuf), _("Lock"));
  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pssSCI_BLOCK_CHECKBOX, pBuf);
                           science;
SCROLLBAR, pBuf);
buf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.science);
  pstr = create_utf8_from_char(cbuf, adj_font(11));
  pstr->style |= TTF_STYLE_BOLD;

  pBuf = create_iconlabel(pIcons->pBIG_Colb, pWindow->dst, pstr,
                          WF_RESTORE_BACKGROUND);

  add_to_gui_list(ID_CHANGE_TAXRATE_DLG_SCI_LABEL, pBuf);

  /* ---- */

  fc_snprintf(cbuf, sizeof(cbuf), _("Update"));
  pstr = create_utf8_from_char(cbuf, adj_font(12));
  pBuf = create_themeicon_button(pTheme->Small_OK_Icon, pWindow->dst, ps
  /* ---- */

  fc_snprintf(cbuf, sizeof(cbuf), _("Close Dialog (Esc)"));
  pstr = create_utf8_from_char(cbuf, adj_font(12));pstr;
  pBuf->action = exit_economy_dialo
  add_to_gui_list(ID_CHANGE_TAXRATE_DLG_CANCEL_BUTTON, pBuf);

  h += adj_size(5);

  /* ------------------------- */
  pLast = pBuf;
  if (entries_used > 0) {

    /* Create Imprv Background Icon */
    pBackground = create_surf(adj_size(116), adj_size(116), SDL_SWSURFACE);

    SDL_FillRect(pBackground, NULL, map_rgba(pBackground->format, bg_color));

    create_frame(pBackground,
                 0, 0, pBackground->w - 1, pBackground->h - 1,
                 get_theme_color(COLOR_THEME_ECONOMYDLG_FRAME));

    pstr = create_utf8_str(NULL, 0, adj_font(10));
    pstr->style |= (SF_CENTER|TTF_STYLE_BOLD);
    pstr->bgcol = (SDL_Color) {0, 0, 0, 0};

      fc_snprintf(cbuf, sizeof(cbuf), "%s", improvement_name_translation(pImprove));

      copy_chars_to_utf8_str(pstr, cbuf);
      psn_w(pstr, pSurf->w - adj_size(4));

      fc_snprintf(cbuf, sizeof(cbuf), "%s %d\n%s %d",
                  _("Built"), p->count, _("U Total"),p->total_cost);
      copy_chars_to_utf8_str(pstr, cbuf);
      pstr->style &= ~TTF_STYLE_BOLD;

      pText = create_text_surf_from_utf8(pstr);
 / 2;
      dst.y = (pSurf->h / 2 - pZoom->h) / 2;
      alphablit(pZoom, NULL, pSurf, &dst, 255);
      dst.y += pZoom->h;
      FREESURFACE(pZoom);

      dst.x = (pSurf->w - pText_Name->w)/2;
      dst.y += ((pSurf->h - dst.y) -
                (pText_Name->h + (pIcons->pBIG_Coin->h + 2) + pText->h)) / 2;
      alphablit(pText_Name, NULL, pSurf, &dst, 255);

      dst.y += pText_Name->h;
      if (p->cost) {
        dst.x = (pSurf->w - p->cost * (pIcons->pBIG_Coin->w + 1))/2;
        for (count = 0; count < p->cost; count++) {
          alphablit(pIcons->pBIG_Coin, NULL, pSurf, &dst, 255);
          dst.x += pIcons->pBIG_Coin->w + 1;
        }
      } else {

        if (!is_wonder(pImprove)) {
          copy_chars_to_utf8_str(pstr, _("Nation"));
	} else {
          copy_chars_to_utf8_str(pstr, _("Wonder"));
	}
        /*pstr->style &= ~TTF_STYLE_BOLD;*/

        pZoom = create_text_surf_from_utf8(pstr);

        dst.x = (pSurf->w - pZoom->w) / 2;
        alphablit(pZoom, NULL, pSurf, &dst, 255);
        FREESURFACE(pZoom);
      }

      dst.y += (pIcons->pBIG_Coin->h + adj_size(2));
      dst.x = (pSurf->w - pText->w) / 2;
      alphablit(pText, NULL, pSurf, &dst, 255);

      FREESURFACE(pText);
      FREESURFACE(pText_Name);

      pBuf = create_icon2(pSurf, pWindow->dst,
                          (WF_RESTORE_BACKGROUND|WF_FREE_THEME|WF_FREE_DATA));

      add_to_gui_list(MAX_ID - i, pBuf);

      if (i > (TARGETS_ROW * TARGETS_COL - 1)) {
        set_wflag(pBuf, WF_HIDDEN);
      }
    }

    FREEUTF8STR(pstr);
    FREESURFACE(pBackground);

    if                                          (entries_used > TARGETS_COL) {
         (resize_window(pWindow, pBackground, NULL,
  
  widget_set_position(pWindow,
                      (main_window_width() - pWindow->size.w) / 2,
                      (main_window_height()
  w = pTreasuryText->w + pBuf->size.w;
  h = pBuf->size.h;
 /* "Total Cost
  fill_rect_alpha(pWindow->theme, &dst, &bg_color2);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w - 1, dst.h - 1,
               get_theme_color(COLOR_THEME_ECONOMYDLG_FRAME));

  /* "Treasury */
  alphablit(pTreasuryText, NULL, pWindow->theme, &dst, 255);
  dst.y += pTreasuryText->h;
  FREESURFACE(pTreasuryText);

  /* Tax Rate */
  alphablit(pTaxRateText, NULL, pWindow->theme, &dst, 255, 255, 255);
  dst.y += pTotalCostText->h;
  FREESURFACE(pTotalCostText);

  /* Net Income */
  alphablit(pNetIncomeText, NULL, pWindow->theme, &dst, 255
  alphablit(pMaxRateText, NULL, pWindow->theme, &dst, 255);
  dst.y += (pMaxRateText->h + 1);
  FREESURFACE(pMaxRateText);

  fill_rect_alpha(pWindow->theme, &dst, &bg_color3);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w - 1, dst.h - 1,
               get_theme_color(COLOR_THEME_ECONOMYDLG_FRAME));

  /* lock icon */
  pBuf = pBuf->prev;
  pBuf->size.x = dst.x - pBuf->size.w;
  pBuf->size.y = dst.y - adj_size(2);

  /* luxScience Horizontal Scrollbar Background */
  dst.y += pTheme->Horiz->h + 1;
  fill_rect_alpha(pWindow->theme, &dst, &bg_color3);

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w - 1, dst.h - 1,
               get_theme_color(COLOR_THEME_ECONOMYDLG_FRAME));

  if (entries_used > 0) {
    setup_vertical_widgets_position(TARGETS_COL,
                                    area.x,
                                    area.y + h,
                                    0, 0, pEconomyDlg->pBeginActiveWidgetList,
                                                                      area.x + area.w - 1,
                                    area.y + h,
                                    area.h - h - 1, TRUE);
    }
  }
create_select_tech_icon(utf8_str *pstr, Tech_type_id tech_id,
                                    case SMALL_MODE:
    h = adj_size(40);
    w = adj_size(135);
    break;
  case MED_MODE:
    color = *get_theme_color(COLOR_THEME_SCIENCEDLG_MED_TECHICON_BG);
  default:
    h = adj_size(200);
    w = adj_size(100);
    break;
  }

  pText = create_text_surf_smaller_than_w(pstr, adj_size(100 - 4));

  /* create label surface */
  pSurf = create_surf(w, h, SDL_SWSURFACE);

  if (tech_id == research_get(client_player())->researching) {
    color.a = 180;
  } else {
    color.a = 128;
  }

  SDL_FillRect(pSurf, NULL, map_rgba(pSurf->format, color));

  create_frame(pSurf,
               0,0, pSurf->w - 1, pSurf->h - 1,
               get_theme_color(COLOR_THEME_SCIENCEDLG_FRAME));

  pTmp = get_tech_icon(tech_id);

  if (mode == SMALL_MODE) {
    /* draw name tech text */, 255);
    FREESURFACE(pText);
, 255);
    FREESURFACE(pText);

  } else {

    /* draw name tech text */, 255);
    dst.y += pText->h + adj_size(10);
    FREESURFACE(pText);

    /* draw tech icon */
    dst.x = (pSurf->w - pTmp->w) / 2;
    alphablit(pTmp, NULL, pSurf, &dst, 255, 255 , direction8_invalid()          float zoom = DEFAULT_ZOOM * (64.0 / Surf_Array[0]->w);
          SDL_Surface *zoomed = zoomSurface(Surf_Array[0], zoom, zoom, 1);

          dst.x = (pSurf->w - zoomed->w) / 2;
          alphablit(zoomed, NULL, pSurf, &dst, 255);
          FREESURFACE(z, 255);
        }
      } else {
        float zoom;

        if (w > 2) {
                          SDL_Surface *zoomed = zoomSurface((*pBuf_Array), zoom, zoom, 1);

          alphablit(zoomed, NULL, pSurf, &dst, 255);
          dst.x += zoomed->w + 2;
          w--;
          h++;
          if (!(h % 2)) {
            if (w >= 2) {
              dst.x = (pSurf->w - 2 * zoomed->w - 2 ) / 2;
            } else {
              dst.x = (pSurf->w - zoomed->w) / 2;
            }
            dst.y += zoomed->h + 2;
            h = 0;
          } /* h == 2 */
          pBuf_Array++;
          FREESURFACE(zoomed);
        } /* while */
      } /* w > 1 */
    } /* if (w) */
  }

  FREESURFACE(pTmp);

  return pSurf;
}

                  pScienceDlg->pEndWidgetList->prev, FC_WS_NORMAL);
}

****
  disdis             onst struct research *presearch = research_get(client_player());struct widget *pChangeResearchButton;
    struct widget *pChangeResearchGoalButton;
    SDL_Rect area;
    if (A_UNSET != presearch->researching) {
      cost = presearch->client.researching_cost;
    } else {
      cost = 0;
    }
researchresearch->tech_goal);

    /* redraw Window */
    widget_redraw(pWindow);
theme_color(COLOR_THEME_SCIENCEDLG_TEXT);

    pSurf = create_text_surf_from_str16(pStr);
, 255);

    dest.y += pSurf->h + adj_size(4);

    FREESURFACE(pSurf);

    dest.x = area.x + adj_size(16);

    /* separator */
#if 0theme_color(COLOR_THEME_SCIENCEDLG_FRAME));
#endif /* 0 */

    dest.y += adj_size(6);

    widget_set_position(pChangeResearchButton, dest.x, dest.y + adj_size(18));

    /* current research text */
    fc_snprintf(cBuf, sizeof(cBuf), "%s: %s",
                research_advance_name_translation(presearch,
                                                  presearch->researching),
                get_science_target_text(NULL));

    copy_chars_to_string16(pStr, cBuf);

    pSurf = create_text_surf_from_str16(pStr);
alphablit(pSurf, NULL, pWindow->dst->surface, &dest, 255);

    dest.y += pSurf->h + adj_size(4);
fill_rect_alpha(pWindow->dst->surface, &dest, &bg_color);

    create_frame(pWindow->dst->surface,
                 dest.x - 1, dest.y - 1, dest.w, dest.h,
                 get_theme_color(COLOR_THEME_SCIENCEDLG_FRAME));

    if (cost > adj_size(286)) {
      cost = adj_size(286) * ((float) presearch->bulbs_researched / cost);
    } else {
      cost = (float) cost * ((float) presearch->bulbs_researched / cost);
    }
, 255);
      dest.x += step;
    }

    /* improvement icons */
   && (advance_number(preq->source.value.advance)
                == presearch->researching), 255research->researching) {
        SDL_Surface *surf = get_unittype_surface(un, direction8_invalid());
        int w = surf->w;

	if (w > 64) {
          float zoom = DEFAULT_ZOOM * (64.0 / w);

          pSurf = zoomSurface(surf, zoom, zoom, 1);
          alphablit(pSurf, NULL, pWindow->dst->surface, &dest, 255);
          dest.x += pSurf->w + adj_size(2);          
          FREESURFACE(pSurf);
        } else {
          pSurf = adj_surf(surf);
          alphablit(pSurf, NULL, pWindow->dst->surface, &dest, 255);
          dest.x += pSurf->w + adj_size(2);
        }
      }
    } unit_type_iterate_end;
#if 0theme_color(COLOR_THEME_SCIENCEDLG_FRAME));
#endif /* 0 */


    /* -------------------------------- */

    /* Goals */
    if (A_UNSET != presearch->tech_goal) {
      /* current goal text */
      copy_chars_to_string16(pStr, research_advance_name_translation
                             (presearch, presearch->tech_goal));
      pSurf = create_text_surf_from_str16(pStr);
, 255);

      dest.y += pSurf->h;

      FREESURFACE(pSurf);

      copy_chars_to_string16(pStr, get_science_goal_text
                             (presearch->tech_goal));
      pSurf = create_text_surf_from_str16(pStr);
, 255);

      dest.y += pSurf->h + adj_size(6);

      FREESURFACE(pSurf);

      /* buildings */
      improvement_iterate(pImprove) {
        requirement_vector_iterate(&pImprove->reqs, preq) {
          if (VUT_ADVANCE == preq->source.kind
              && (advance_number(preq->source.value.advance)
                  == presearch->tech_goal), 255);
            dest.x += pSurf->w + 1;
  research->tech_goal) {
          SDL_Surface *surf = get_unittype_surface(un, direction8_invalid());
          int w = surf->w;

          if (w > 64) {
            float zoom = DEFAULT_ZOOM * (64.0 / w);

            pSurf = zoomSurface(surf, zoom, zoom, 1);
            alphablit(pSurf, NULL, pWindow->dst->surface, &dest, 255);
            dest.x += pSurf->w + adj_size(2);
            FREESURFACE(pSurf);
          } else {
            pSurf = adj_surf(surf);
            alphablit(pSurf, NULL, pWindow->dst->surface, &dest, 255);
            dest.x += pSurf->w + adj_size(2);
          }
        }
      } unit_type_iterate_end;
    }

    redraw_group(pScienceDlg->pBeginWidgetList, pWindow->prev, 1);
    flush_dirty();
 (pScienceDlg) {
    popdown_window_group_dialog(pScienceDlg->pBeginWidgetList,
                              
  return -1;
}


  return -1;
}

 (select_window_group_dialog(pChangeTechDlg->pBeginWidgetList, pWindow)) {
      widget_flush(pWindow);
    }
  }

  return -1;
}

void popup_change_research_dialog(void)
{
  const struct research *presearch = research_get(client_player());
  struct widget *pBuf = NULL;
  struct widget *pWindow;
  utf8_str *psresearch->researching)) {
    return;
  }

  advance_index_iterate(A_FIRST, i) {
    if (!research_invention_gettable(presearch, i, TRUE)) {
      continue;
    }
    count++;
  } advance_index_iterate_end;

  if (count < 2) {
    return;
  }

  pChangeTechDlg = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  pstr = create_utf8_from_char(_("What should we focus on now?"), adj_font(12));
  pss
  add_to_gui_list(ID_SCIENCE_DLG_CHANGE_REASARCH_WINDOW, pWindow);

  area = pWindow->area;
utf8_from_char(_("Close Dialog (Esc)"),

  add_to_gui_list(ID_TERRAIN_ADV_DLG_EXIT_BUTTON, pBuf);

  /* ------------------------- */
  /* max col - 104 is select tech widget width */
  max_col = (main_window_width()ect tech widget height */
  max_row = (main_window_height()
  pstr = create_utf8_str(NULL, 0, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);
!research_invention_gettable(presearch, i, TRUE)) {
      continue;
    }

    count++;

    copy_chars_to_utf8_str(pstr, advance_name_translation(advance_by_number(i)));
    pSurf = create_select_tech_icon(pstr, i, MED_MODE);
    pBuf = create_icon2(pSurf, pWindow->dst,
                        
    if (count > h) {
      set_wflag(pBuf, WF_HIDDEN);
    }
  } advance_index_iterate_end;

  FREEUTF8STR(pstr);

  /* -------------------------------------------------------------- */

    }
  } else {
    count = 1;
  }

  disable_science_dialog();

  widget_set_position(pWindow,
                      (main_window_width() - pWindow->size.w) / 2,
                      (main_window_height()
  setup_vertical_widgets_position(col, area.x + 1,
                                  area.y, 0, 0,
                                  pChangeTechDlg->pBeginActiveWidgetList,
                                  pChangeTechDlg->pEndActiveWidgetList);

  if                                   area.x + area.w, area.y,
                                  w, FALSE);

  widget_flush(pWindow);
}


    /* Following is to make the menu go back to the current goal;
  

  return -1;
}

void popup_change_research_goal_dialog(void)
{
  const struct research *presearch = research_get(client_player());
  struct widget *pBuf = NULL;
  struct widget *pWindow;
  utf8_str *psresearch_invention_reachable(presearch, i)
        && TECH_KNOWN != research_invention_state(presearch, i)
        && (11 > research_goal_unknown_techs(presearch, i)
            || i == presearch->tech_goal)) {
      count++;
    }
  } advance_index_iterate_end;

  if (count < 1) {
    return;
  }

  pChangeTechDlg = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  pstr = create_utf8_from_char(_("Select target :"), adj_font(12));
  pss
  add_to_gui_list(ID_SCIENCE_DLG_CHANGE_GOAL_WINDOW, pWindow);

  area = pWindow->area;
utf8_from_char(_("Close Dialog (Esc)"),
main_window_width() - (pWindow->size.w - pWindow->area.w) - adj_size(2)) / adj_size(104);

  /* max row - 204 is goal tech widget height */
  max_row = (main_window_height()
  pstr = create_utf8_str(NULL, 0, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD | SF_CENTER)research_invention_reachable(presearch, i)
        && TECH_KNOWN != research_invention_state(presearch, i)
        && (11 > (num = research_goal_unknown_techs(presearch, i))
            || i == presearchutf8_str(pstr, cBuf);
      pSurf = create_select_tech_icon(ps
  FREEUTF8STR(pstr);

  /* -------------------------------------------------------------- */

  i = 0;
  if (count > col) {
    count = (count + (col-1)) / col;
†  µpÈ;5¢X€Œ B ƒ H‚; +‚ <ƒ;€w A…v€| 4ˆ; ‚"‰n¡ ŒŒ J9€S $Ž*€ƒ ‚K’1€„J W6 šA ›Yˆ „w¨ E¢4 b£{€ P¥@¦ §4€t n©&€n Jªg O‰{­ JŠ €U @¬@ "¬{€q C‰} 5®^€" F‰z» AŠ €` P²?€ƒ    if (count > max_row) {
      pChangeTechDlg->pActiveWidgetList = pChangeTechDlg->pEndActiveWidgetList;
      count = max_row;
      i = create_vertical_scrollbar(pChangeTechDlg, col, count, TRUE, TRUE);
    }
  } else {
    count = 1;
  }

  disable_science_dialog();

  area.w = MAX(area.w, (col * pBuf->size.w + adj_size(2) + i));
  area.h = MAX(area.h, count * pBuf->size.h + adj_size(2));

  /* alloca window theme and win background buffer */
  pSurf = theme_get_background(theme, BACKGROUND_CHANGERESEARCHDLG);
  resize_window(pWindow, pSurf, NULL,
                (pWindow->size.w - pWindow->area.w) + area.w,
                (pWindow->size.h - pWindow->area.h) + area.h);
  FREESURFACE(pSurf);

  area = pWindow->area;

  widget_set_position(pWindow,
                      (main_window_width() - pWindow->size.w) / 2,
                      (main_window_height() - pWindow->size.h) / 2);

  /* exit button */
  pBuf = pWindow->prev;
  pBuf->size.x = area.x + area.w - pBuf->size.w - 1;
  pBuf->size.y = pWindow->size.y + adj_size(2);

  setup_vertical_widgets_position(col, area.x + 1,
                                  area.y, 0, 0,
                                  pChangeTechDlg->pBeginActiveWidgetList,
                                  pChangeTechDlg->pEndActiveWidgetList);

  if (pChangeTechDlg->pScroll) {
    setup_vertical_scrollbar_area(pChangeTechDlg->pScroll,
                                  area.x + area.w, area.y,
                                  area.h, TRUE);
  }

  redraw_group(pChangeTechDlg->pBeginWidgetList, pWindoect
selected_widget = NULL;
    widget_redraw(pWidget);
    widget_flush(pWidget);

    popup_change_research_dialog();
  }selected_widget = NULL;
    widget_redraw(pWidget);
    widget_flush(pWidget);

    popup_change_research_goal_dialog();
  }const struct research *presearch;utf8_str *ps
  if (pScienceDlg) {
    return;
  }

  presearch = research_get(client_player());
  pScienceDlg = fc_calloc(1, sizeof(struct SMALL_DLG));

  /* TRANS: Research report title */
  pstr = create_utf8_from_char(_("Research"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

#ifdef SMALL_SCREEN
  pWindow = create_window(NULL, pstr, 200, 132, 0);
#else  /* SMALL_SCREEN */
  pWindow = create_window(NULL, pstr, adj_size(400), adj_size(246), 0);
#endif /* SMALL_SCREEN */
  widget_set_position(pWindow,
                      (main_window_width() - pWindow->size.w) / 2,
                      (main_window_height() - pWindow->size.h) / 2);

  add_to_gui_list(ID_SCIENCE_DLG_WINDOW, pWindow);

  /* count number of researchable techs */
  count = 0;
  advance_index_iterate(A_FIRST, i) {
    if (research_invention_reachable(presearch, i)
        && TECH_KNOWN != research_invention_state(presearch, i)) {
      count++;
    }
  } advance_index_iterate_end;

  /* current research icon */
  pTechIcon = get_tech_icon(presearch->researching);
  pChangeResearchresearchutf8_from_char(_("Close Dialog (Esc)"),

                      area.x + area.w - pExitButton->size.w - adj_size(1),
                      pWindow->size.y + adj_size(2));
n all the science reports (report, cha (pChangeTechDlg) {
    popdown_window_group_dialog(pChangeTechDlg->pBeginWidgetList,
                               (pScienceDlg) {
    popdown_window_group_dialog(pScienceDlg->pBeginWidgetList,
                              **
  Resize and redraw the requirement tree.
**/
void science_report_dialog_redraw(void)
{
  /* No requirement tree yet. */
}

/* static char eg_buffer[150 * MAX_NUM_PLAYERS];
static int eg_player_count = 0;
static int eg_players_received = 0;endgame_report_dialog_start(const struct packet_endgame_report *packet)
{
  eg_buffer[0] = '\0';
  eg_player_count = packet->player_num;
  eg_players_received = 0
  Received endgame report information about single player
/
void endgame_report_dialog_player(const struct packet_endgame_player *packet)
{
  const struct player *pplayer = player_by_number(packet->player_id);

  eg_players_received++;

  cat_snprintf(eg_buffer, sizeof(eg_buffer),
"%2d: The %s ruler %s scored %d points\n",
                   packet->score),
               eg_players_received, nation_adjective_for_player(pplayer),
               player_name(pplayer), packet->score);

  if (eg_players_received == eg_player_count) {
    popup_notify_dialog(_("Final Report:"),
                        _("The Greatest Civilizations in the world."),
                        eg_buffer);
  }
}
ENDREP
DELTA 27428 4227 1591
SVN  „º]„ºw‚V ²` Ÿ …²u€ ‚±Y ‚+„"„ ‚#„‘R e„”6 ƒ¹S “ÃY… ‚„¢0 —$Øv… ‹.ð… „ûL€m hþ& ©v5Ÿ …«@€ „.±Y„ ‚<„‘R¡ j„”1 ”¹S… ‚„¢0 ƒ,Øv šmÓ5… Š î$… „pøF€m hþ& ˆ~5 UŠ0 ¶`‚ˆb… ‰+‚¿D… M‚Èq… ‰[‚Ù@€O Ø]‚äm€‚' „ƒ¿u€] yƒÒ* tƒÓ$ „_ƒÆL‹ OƒË6š jƒÒ9 „4ƒÍ	€h ˆƒÒ%‹ cƒÚ> ƒTƒÛ"Š ¨LƒßŸ „„‡f€ „/„„ ‚e„‘R´ H„”k‹ M„–> ƒE„—Œ XÎl †x„›6… ˜-„¢0utf8_str *title;
  SDL_String16title = create_utf8_from_char(_("Help : Improvements"), adj_font(12));
    title->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, tutf8_utf8_utf8_utf8utf8_str *pstr = create_utf8_from_char(buffer, adj_font(12));

    convert_utf8_str_to_const_surface_width(pssutf8_str *title;
  SDL_String16title = create_utf8_from_char(_("Help : Units"), adj_font(12));
    title->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, tutf8unit list on the left side ---*/
_utf8_utf8_utf8utf8_str *pstr = create_utf8_from_char(buffer, adj_font(12));

    convert_utf8_str_to_const_surface_width(pss_utf8_utf8_utf8utf8_str *pstr = create_utf8_from_char(buffer, adj_font(12));

    convert_utf8_str_to_const_surface_width(pstr, adj_size(640) - start_x - adj_size(20));
    pWidget = create_iconlabel(NULL, pWindow->dst, psutf8_str *pstr;
  SDL_Surface *pSurf;
  struct widget *pDock = pStore->pDock;

  pstr = create_utf8_str(NULL, 0, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);

  copy_chars_to_utf8_str(pstr, advance_name_translation(advance_by_number(tech)));
  pSurf = create_select_tech_icon(psutf8_str(pstr, advance_name_translation(vap));
      pSurf = create_select_tech_icon(pstr, arutf8_str(psstr, ar, SMALL_MODE);
    utf8_str(pstr, advance_name_translation(advance_by_number(i)));
      pSurf = create_select_tech_icon(psutf8_str(pssUTF8STR(psutf8_str *title;
  utf8_str *pstitle = create_utf8_from_char(_("Help : Advances Tree"), adj_font(12));
    title->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, tutf8str = create_utf8_str(NULL, 0, adj_font(10));
    psutf8_str(pssUTF8STR(pstr_utf8ENDREP
DELTA 12387 2271 743
SVN  ˆ‰>‚& † €‚& ‡utf8_str *title,
                             Uint16 w, Uint16 h, Uint32 flags);

struct widget *create_window_skeleton(struct gui_layer *pDest,
                                      utf8_str *title, Uint32 flags);

int resize_window(struct widget *pWindow, SDL_Surface *pBcgd,
                ENDREP
DELTA 27123 57095 1927
SVN  úA`‚«s ‰D €x †cŠ>€‚ ‚“!€ƒN #‹} X™w¤ UšuŒ zœO€† l£"ˆ ²0 O³9€ \¶2Œ ‚3¨) uª^ S‹} }¬8 N³9Ž z®Œ ;¯€I ‚r±€E h´1¤ \¶2Œ „,·€v q½ a¾ƒ ^¿t€C NÐ4 iÁgƒ …cÂT€‚p ƒXÊq… ^¿t€' TÐ4… ?Ò
Ÿ ƒlÓf€U aØ"… ƒkÙˆ  Œ  ‚DÞ 'àV€„N Jå€L |çpˆ ‚gèl€‹/ Vów€s aö #‹}  ù "ú    
  SDL_Rect src = {0,0, pLabel->size.w, pLabel->size.h};
  SDL_Rect dst = {pLabel->size.x, pLabel->size.y, 0, 0};
/*_utf8 != NULL) {
        backup_color = pLabel->string_utf8->fgcol;
        pLabel->string_utf8->fgcol = bar_color;
        if (pLabel->string_utf8->style & TTF_STYLE_BOLD) {
          pLabel->string_utf8->style |= TTF_STYLE_UNDERLINE;
        } else {
          pLabel->string_utf8_utf8 != NULL)) {
    if (get_wflags(pLabel) & WF_SELECT_WITHOUT_BAR) {
      if (pLabel->string_utf8->style & TTF_STYLE_UNDERLINE) {
        pLabel->string_utf8->style &= ~TTF_STYLE_UNDERLINE;
      } else {
        pLabel->string_utf8->style &= ~TTF_STYLE_BOLD;
      }
      pLabel->string_utf8->fgcol = backup_color;
    } else {
      if (pLabel->string_utf8->render == 3) {
        pLabel->string_utf8->bgcol = backup_color;
      }
    }
  }

  return retutf8_str *text = pLabel->string_utf8text != NULL
    if (without_box) {
      bold = ((text->style & TTF_STYLE_BOLD) == TTF_STYLE_BOLD);
      text->style |= TTF_STYLE_BOLD;
    }

    buf = utf8_str_size(text);

    if (without_box && !bold) {
      text->style &= ~TTF_STYLE_BOLD;
    }

    w = MAX(w, buf.w + space);
    h = MAX(h, buf.h);
  }

  if (pIcon) {
    if (text != NULL) {
      if ((flags & WF_ICON_UNDER_TEXT) || (flags & WF_ICON_ABOVE_TEXT)) {
        w = MAX(w, pIcon->w + space);
        h = MAX(h, buf.h + pIcon->h + adj_size(3));
      } else {
        if (flags & WF_ICON_CENTER) {
          w = MAX(w, pIcon->w + space);
          h = MAX(h, pIcon->h);
        } else {
          w = MAX(w, buf.w + pIcon->w + adj_size(5) + space);
          h = MAX(h, pIcon->h);
        }
      }
      /* text */
    }utf8_strutf8_str *pstr, Uint16 w, Uint16 h,
                                 Uint32 flags)
{
  struct widget *pLabel = NULL;

  if (pIcon == NULL && pstr == NULL_utf8 = pstr
  return pLabelcreate_iconlabelutf8_str *pstr_utf8 = pstr
  baseclass_redraw = pILabel->redraw;
  pILabel->redraw = redraw_label;
utf8_str *pstr, Uint16 w, Uint16 h,
                                 
  if (pIcon == NULL && pstr == NULL_utf8 = pstr  /* 0 */
    pTheme = pBuf;
#endif /* 0 */
  } else {
    pTheme = pBuf;
  }

  colorkey = SDL_MapRGBA(pTheme->format, pstr->bgcol.r,
                         pstr->bgcol.g, pstr->bgcol.b, pstr->bgcol.a);
  SDL_FillRect(pTheme, NULL, colorkey);
strstr->bgcol.r, &pstr->bgcol.g,
                &pstr->bgcol.b, &pstrstr  /* 0 */
    pTheme = pBuf;
#endif /* 0 */
    FREESURFACE(pBuf);
  } else {
    pTheme = pBuf;
  }

  colorkey = SDL_MapRGBA(pTheme->format,
                         pIconLabel->string_utf8->bgcol.r,
                         pIconLabel->string_utf8->bgcol.g,
                         pIconLabel->string_utf8->bgcol.b,
                         pIconLabel->string_utf8_utf8IconLabel->string_utf8->bgcol.r,
                &pIconLabel->string_utf8->bgcol.g,
      		&pIconLabel->string_utf8->bgcol.b,
                &pIconLabel->string_utf8_utf8UTF8STR(pIconLabel->string_utf8utf8(pLabel->string_utf8)) == NULL) {
    return (-4);
  }

  if (pLabel->string_utf8_utf8 /* 0 */utf8(pLabel->string_utf8);
  
  if (pLabel->theme) { /* Icon */
    if (pText) {
      if (flags & WF_ICON_CENTER_RIGHT) {
        xI = pLabel->size.w - pLabel->theme->w - space;
      } else {
        if (flags & WF_ICON_CENTER) {
          xI = (pLabel->size.w - pLabel->theme->w) / 2;
        } else {
          xI = space;
        }
      }

      if (flags & WF_ICON_ABOVE_TEXT) {
        yI = 0;
        y = pLabel->theme->h + adj_size(3)
          + (pLabel->size.h - (pLabel->theme->h + adj_size(3)) - pText->h) / 2;
      } else {
        if (flags & WF_ICON_UNDER_TEXT) {
                  yI = y + pText->h + adj_size(3);
        } else {
          yI = (pLabel->size.h - pLabel->theme->h) / 2;
          y = (pLabel->size.h - pText->h) / 2;
        }
      }
      /* pText */
    } /* 0 */        if (flags & WF_ICON_CENTER_RIGHT) {
          if (pLabel->string_utf8->style & SF_CENTER) {
            x = (pLabel->size.w - (pLabel->theme->w + 5 + space) -
                 pText->w) / 2;
          } else {
            if (pLabel->string_utf8->style & SF_CENTER_RIGHT) {
              x = pLabel->size.w - (pLabel->theme->w + 5 + space) - pText->w;
            } else {
              x = space;
            }
          }
          /* WF_ICON_CENTER_RIGHT */
        } else {
          if (flags & WF_ICON_CENTER) {
            /* text is blit on icon */
            goto Alone;
          } else { /* WF_ICON_CENTER_LEFT */
            if (pLabel->string_utf8->style & SF_CENTER) {
              x = space + pLabel->theme->w + adj_size(5) + ((pLabel->size.w -
                                                             (space +
                                                              pLabel->theme->w + adj_size(5)) -
                                                             pText->w) / 2);
            } else {
              if (pLabel->string_utf8->style & SF_CENTER_RIGHT) {
                x = pLabel->size.w - pText->w - space;
              } else {
                x = space + pLabel->theme->w + adj_size(5);
              }
            }
          } /* WF_ICON_CENTER_LEFT */
        }
        /* !WF_ICON_ABOVE_TEXT && !WF_ICON_UNDER_TEXT */
      } else {
        goto Alone;
      }
      /* pLabel->theme == Icon */
    }_utf8->style & SF_CENTER) {
        x = (pLabel->size.w - pText->w) / 2;
      } else {
        if (pLabel->string_utf8->style & SF_CENTER_RIGHT) {
          x = pLabel->size.w - pText->w - space;
        } else {
          x = space;
        
  return retENDREP
DELTA 27428 20306 624
SVN  ‚—O‚—N ö  „ ¡Jöutf8ENDREP
DELTA 5500 233794 597
SVN  †"‰ƒ$ …q €ƒ$<SDL.h>

#include "gui_string.h"

#include "repodlgs_g.h"

enum tech_info_mode {
  FULL_MODE,
  MED_MODE,
  SMALL_MODE
};

SDL_Surface *create_select_tech_icon(utf8_str *pstr, Tech_type_id tech_id,
                                     enum tech_info_mode mode);
void science_report_dialogs_popdown_all(void);
void economy_report_dialog_popdown(void);
void units_report_dialog_popdown(void);

#endif /* FC__REPODLGS_H */
ENDREP
DELTA 27161 16765 871
SVN  ½!¿ƒ<Ä Œ €‚ ‚Ž ƒB.‹ ‚3” ¼ M› €P ‚9˜ Aš? M› €P ‚5œ¾ M› €P ‚8 %€A M› €P ‚7¤6€@ M› €P z¨J¸ ‚5©k€S N¡4ˆ I™{€h „,°. &´[€{ /·ˆ \¸4‘ ‚X¹ ‚»q¨ Ä~ ‡O¿M€ fÈ/€j ‚eÉw€„< ‚%Ñ/„ O‘r xÔ)€K `Õm€s (×€o *Øw€u ,Úf€q +ÜS€t ‚ÞB€8 kâ# uä€‚ .è€Q ë# nì- (í­ fîv€‰K -ù.€A _û ƒü{  ƒX€ ~ƒY€ƒD G — {º'ž NËy v‹­ CŒ@€ƒ TÒ „ O‘r 5’B¸ P”3€ ‚+–)Š &˜b” Qš
€Žf ‚:ª)¤ }­€ 8¯%™ ƒ!°z€E ´h Iµ|€‚c ¸. ‚k¹=  v¼+
  return -1;
}

static int player_callback(struct widget *pWidget)
{
  struct player *pPlayer = pWidget->data.player;

  switch(Main.event.button.button) {
#if 0
      case SDL_BUTTON_LEFT:

        break;
      case SDL_BUTTON_MIDDLE:

        break;
#endif /* 0 */
    }
  }

    SDL_Client_Flags ^= CF_DRAW_PLAYERS_WAR_STATUS;
    do  (pPlayer != pPlayers_Dlg->pBeginWidgetList);

    players_dialog_update();
  }
  (pPlayer != pPlayers_Dlg->pBeginWidgetList);

    players_dialog_update();
  }

    SDL_Client_Flags ^= CF_DRAW_PLAYERS_PEACE_STATUS;
    do  (pPlayer != pPlayers_Dlg->pBeginWidgetList);

    players_dialog_update();
  }

    SDL_Client_Flags ^= CF_DRAW_PLAYERS_ALLIANCE_STATUS;
    do  (pPlayer != pPlayers_Dlg->pBeginWidgetList);

    players_dialog_update();
  }

    SDL_Client_Flags ^= CF_DRAW_PLAYERS_NEUTRAL_STATUS;
    do  (pPlayer != pPlayers_Dlg->pBeginWidgetList);

    players_dialog_update();
  }
          || (pPlayer != client.conn.playing
            (pPlayers_Dlg) {
    struct widget *pPlayer0, *pPlayer1;
    struct player *pPlayer;
    int i;
    struct astring astr = ASTRING_INIT;

    /* redraw window */
    widget_redraw(pPlayers_Dlg->pEndWidgetList);
pPlayer0do {
      pPlayer0 = pPlayer0->prev;
      pPlayer1 = pPlayer0;
      pPlayer = pPlayer0->data.player;
utf8_str(pPlayer0->info_label, astr_str(&astr));

      astr_free(&astr);

      /* now add some eye candy ... */
      if  /* 0 */
              ||  (SDL_Client_Flags & CF_DRAW_PLAYERS_WAR /* 0 */
	  }
        } while (pPlayer1 != pPlayers_Dlg->pBeginWidgetList);
      }
    } while (pPlayer0 != pPlayers_Dlg->pBeginWidgetList);
             pPlayers_Dlg->pEndWidgetList->prev, 0);
    widget_mark_dirty(pPlayers_Dlg->pEndWidgetList);
utf8_str *pstr;
  SDL_Rect dst;
  int i, n, h;
  double a, b, r;
  SDL_Rect area;

  if (pPlayers_Dlg) {
    return;
  }

  n = 0;
  players_iterate(pPlayer) {
    if (is_barbarian(pPlayer)) {
      continue;
    }
    n++;
  } players_iterate_end;

  if (n < 2) {
    return;
  }

  pPlayers_Dlg = fc_calloc(1, sizeof(struct SMALL_DLG));

  pstr = create_utf8_from_char(_("Players"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, pstr, 0);

  pWindow->action = players_window_dlg_callback;
  set_wstate(pWindow, FC_WS_NORMAL);
utf8
  add_to_gui_list(ID_BUTTON, pBuf);
  /* ---------- */

  for (i = 0; i <                                (SDL_Client_Flags & CF_DRAW_PLAYERS_NEUTRAL_STATUS),
                                                              (SDL_Client_Flags & CF_DRAW_PLAYERS_WAR_STATUS),
                                                              (SDL_Client_Flags & CF_DRAW_PLAYERS_CEASEFIRE_STATUS),
                                                              (SDL_Client_Flags & CF_DRAW_PLAYERS_PEACE_STATUS),
                                                              (SDL_Client_Flags & CF_DRAW_PLAYERS_ALLIANCE_STATUS),
                               
  players_iterate(pPlayer) {
    if (is_barbarian(pPlayer)) {
      continue;
    }

    pstr = create_utf8_str(NULL, 0, adj_font(10));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
str;

    if (!pPlayer->is_alive) {
      pstr = create_utf8_from_char(_("R.I.P.") , adj_font(10));
      pstr->style |= TTF_STYLE_BOLD;
      pstr->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_TEXT);
      pLogo = create_text_surf_from_utf8(pstr);
      FREEUTF8STR(ps
    if (pPlayer->is_alive) {
      set_wstate(pBuf, FC_WS_NORMAL);
    }

    pBuf->data.player = pPlayer;

    pBuf->action = player_callback;

    add_to_gui_list(ID_LABEL, pBuf);

  } players_iterate_end;

  /* exit button */
  pBuf = pWindow->prev;

  n = area.y;
  pstr = create_utf8_str(NULL, 0, adj_font(10));
  pstr->style |= TTF_STYLE_BOLD;
  pstr->bgcol = (SDL_Color) {0, 0, 0, 0};

  for (i = 0; i < DS_LAST; i++) {
    switch (i) {
    case DS_ARMISTICE:
      pstr->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_ARMISTICE);
      break;
    case DS_WAR:
      pstr->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_WAR);
      break;
    case DS_CEASEFIRE:
      pstr->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_CEASEFIRE);
      break;
    case DS_PEACE:
      pstr->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_PEACE);
      break;
    case DS_ALLIANCE:
      pstr->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_ALLIANCE);
      break;
    default:
      /* no contact */
      continue;
      break;
    }

    copy_chars_to_utf8_str(pstr, diplstate_type_translated_name(i));
    pLogo = create_text_surf_from_utf8(pstr);

    pBuf = pBuf->prev;
    h = MAX(pBuf->size.h, pLogo->h);
    pBuf->size.x = area.x + adj_size(5);
    pBuf->size.y = n + (h - pBuf->size.h) / 2;

    dst.x = adj_size(5) + pBuf->size.w + adj_size(6);
    dst.y = n + (h - pLogo->h) / 2;
    alphablit(pLogo, NULL, pWindow->theme, &dst, 255);
    n += h;
    FREESURFACE(pLogo);
  }
  FREEUTF8STR(ps
  n = 1;
  if (pBuf != pPlayers_Dlg->pBeginWidgetList) {
    do                                  
  popdown_players_nations_dialog();
  switch(Main.event.button.button) {
#if 0
  case SDL_BUTTON_LEFT:

    break;
  case SDL_BUTTON_MIDDLE:

    break;
#endif /* 0 */
  case SDL_BUTTON_RIGHT:
    if (can_intel_with_player(pPlayer)) {
      popup_intel_dialog(pPlayer);
    } else {
      flush_dirty();
    }
    break;
  default:
    if (pPlayer != client.conn.playing) {
      popup_diplomacy_dialog(pPlayer);
    }
    break;
  }

  return -1;
}

****
  Popup (or raise)up_players_nations_dialog(void;
  utf8_str *ps
  if (pShort_Players_Dlg) {
    return;
  }

  /* TRANS: Nations report title */
  pstr = create_utf8_from_char(_("Nations") , adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, pstr, 0);

  pWindow->action = players_nations_window_dlg_callback;
  set_wstate(pWindow, FC_WS_NORMAL);

  add_to_gui_list(ID_WINDOW, pWindow);
  pShort_Players_Dlg->pEndWidgetList = pWindow;

  area = pWindow->area;
utf8
  add_to_gui_list(ID_BUTTON, pBuf);
  /* ---------- */
 (!pPlayer->is_alive || is_barbarian(pPlayer)) {
        continue;
      }

      pDS = player_diplstate_get(client.conn.playing, pPlayer);

      if 
      if                     
      pstr = create_utf8_from_char(cBuf, adj_font(10));
      pstr->style |= TTF_STYLE_BOLD;

      pLogo = get_nation_flag_surface(nation_of_player(pPlayer));

      pBuf = create_iconlabel(pLogo, pWindow->dst, pstr,
                              (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE));

      /* now add some eye candy ... */
      switch (pDS->type) {
      case DS_ARMISTICE:
        pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_ARMISTICE);
        set_wstate(pBuf, FC_WS_NORMAL);
        break;
      case DS_WAR:
        if (can_meet_with_player(pPlayer) || can_intel_with_player(pPlayer)) {
          set_wstate(pBuf, FC_WS_NORMAL);
          pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_WAR);
        } else {
          pBuf->string_utf8->fgcol = *(get_theme_color(COLOR_THEME_PLRDLG_WAR_RESTRICTED));
        }
        break;
      case DS_CEASEFIRE:
        pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_CEASEFIRE);
        set_wstate(pBuf, FC_WS_NORMAL);
        break;
      case DS_PEACE:
        pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_PEACE);
        set_wstate(pBuf, FC_WS_NORMAL);
        break;
      case DS_ALLIANCE:
        pBuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_ALLIANCE);
        set_wstate(pBuf, FC_WS_NORMAL);
        break;
      case DS_NO_CONTACT:
        pBuf->string_utf8->fgcol = *(get_theme_color(COLOR_THEME_WIDGET_DISABLED_TEXT));
	break;
      default:
        set_wstate(pBuf, FC_WS_NORMAL);
        break;
      }

      pBuf->string_utf8->bgcol = (SDL_Color) {0, 0, 0, 0};

      pBuf->data.player = pPlayer;

      pBuf->action = player_nation_callback;

      add_to_gui_list(ID_LABEL, pBuf);

      area.w = MAX(w, pBuf->size.w);
      area.h += pBuf->size.h;

      if (n > 19) {
        set_wflag(pBuf, WF_HIDDEN);
      }

      n++;

  /* ---------- */
  if (n > 20) {
    n = units_h;
    area.w += n;

    units_h = 20 * pBuf->size.h;

  } else {
    units_h = area.h;
  }

  /* ---------- */

  area = pWindow->area;

  w = area.w;

  if (pShort_Players_Dlg->pScroll) {
    w -= n;
  }
 area.x, area.y, w, 0,
                                  pShort_Players_Dlg->pBeginActiveWidgetList,
                                  pBuf);

  if (pShort_Players_Dlg->pScroll) {
    setup_vertical_scrollbar_area(pShort_Players_Dlg->pScroll,
                                  area.x + area.w, area.y,
                                  area.h, TRUE);
  }
                                ENDREP
DELTA 25150 40432 2008
SVN  èkë#„
·w ‰ š ƒf‰„ „-Œc G  „‘z _¥~ ‚Q–s ‡™F _¥~ ‚[¡3 k¤ ƒ9¥~–  ©T¾ „L«€o L±Y |³'¨ @µM ƒ0·€j C¼2€j ‚&¾l ‚UÁ ‚NÃj€M …RÇ=¼ †8ÍX“ @…@  Ôc€q _¥~ 9Øm€ Û9€V \Ý&• G  ƒLÞ`€^ ŠMãc _¥~² @…@€„y ]ôx€ wö8€& rø€a Zùf€„ ýkƒ G » @…@ €@€5 _¥~© @…@ …k _¥~ ‚‡` „y‰z€0 _¥~ ‚2|€{ c”7’ •„ ƒ
–>€z qš ˆ › œ3€‚> U €ƒ V¤>Š ¥€> C§n Y©5ž … ª.Ž ˆ¯A€ u¹€…l tÀR§ ‚nÁw€x tÆ7 ZÇ0€ ‚Ètª ƒËwª ‚,Ï aÔtŒ ƒYÑ|˜ KÙ* ×,† aÔt€M ‚&Ù-€‚C OÝw€w ƒ ßC€+ $ãj wå® ‚/æ</* SDL */
#include <SDL.h>utf8char *msg, size_t n_alloc);


  utf8_str *title, *f
  if (pLoadDialog) {
    return;
  }

  /* disable buttons */
  /* create dialog */
  pLoadDialog = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  title = create_utf8_from_char(_("Choose Saved Game to Load"), adj_font(12));
  title->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, tutf8_from_char(_("Close Dialog (Esc)"),
filename = create_utf8_from_char(pfile->name, adj_font(13));
    filename->style |= SF_CENTER;
    pFilenameLabel = create_iconlabel(NULL, pWindow->dst, filename,
      (WF_FREE_DATA | WF_SELECT_WITHOUT_BAR | WF_RESTORE_BACKGROUND));

    pFilenameLabel->action = load_selected_game_callback;

    set_wstate(pFilenameLabel, FC_WS_NORMAL);

  area = pWindow->area;

  setup_vertical_scrollbar_area(pLoadDialog->pScroll,
                                area.x + area.w - 1,
                                area.y + 1,
                            
    if (pFilenameLabel == pLastLabel) {
      break;
    }
nput dlg to server

    if (pWidget->string_utf8->text == NULL) {
      return -1;
    }

    if (pWidget->string_utf8->text[0] != '\0') {
      send_chat(pWidget->string_utf8->text);

      output_window_append(ftc_any, pWidget->string_utf8->text);
    }
  }

  pInput_Edit = create_edit_from_chars(NULL, Main.gui, NULL, adj_font(12),
                                       adj_size(400), 0);

  if (edit(pInput_Edit) != ED_ESC) {
    inputline_return_callback(pInput_Edit);
  }

  flush_dirty();
}

size_t n = strlen(astring);
    char *buffer = fc_strdup(astring);

    add_to_chat_list(buffeHandle chat messages when connection dialog open.
**********/
static void add_to_chat_list(char *msg, size_t n_alloc)
{
  utf8_str *pstr;
  struct widget *pBuf, *pWindow = pConnDlg->pEndWidgetList;

  fc_assert_ret(msg != NULL);
  fc_assert_ret(n_alloc != 0);

  pstr = create_utf8_str(msg, n_alloc, adj_font(12));

  if (convert_utf8_str_to_const_surface_width(pstr, pConnDlg->text_width - adj_size(5))) {
    utf8_str *pstr2;
    int count = 0;
    char **utf8_texts = create_new_line_utf8strs(pstr->text);

    while (utf8_texts[count] != NULL) {
      pstr2 = create_utf8_str(utf8_texts[count],
                              strlen(utf8_texts[count]) + 1, adj_font(12));
      ps                              pstr2, pConnDlg->text_width, 0,
                                (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE));
                        pConnDlg->pChat_Dlg->pBeginActiveWidgetList, FALSE,
                        pWindow->size.x + adj_size(10 + 60 + 10),
                                     pConnDlg->pChat_Dlg->pEndWidgetList, TRUE);
    FREEUTF8STR(pstr);
  } else {
    ps                            pstr, pConnDlg->text_width, 0,
                              (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE));

    pBuf->size.w = pConnDlg->text_width;

    if (add_widget_to_vertical_scroll_widget_list(pConnDlg->pChat_Dlg, pBuf,
                        pConnDlg->pChat_Dlg->pBeginActiveWidgetList, FALSE,
                        pWindow->size.x + adj_size(10 + 60 + 10),
                        pWindow->size.y + adj_size(14))) {
      redraw_group(pConnDlg->pChat_Dlg->pBeginWidgetList,
                   }

****
  User interacted with connection dialog input field.
_utf8->text != NULL) {
      if (pWidget->string_utf8->text[0] != '\0') {
        send_chat(pWidget->string_utf8->text);
      }

      pWidget->string_utf8->n_alloc = 0;
    }
  }
 User interacted with Start Game button.

    /* set_wstate(pConnDlg->pLoadGameButton, FC_WS_NORMAL);
     * widget_redraw(pConnDlg->pLoadGameButton);        
     * flush_dirty(); */
    popup_load_game_dialog();
  }
utf8_str *pstr = create_utf8_str(NULL, 0, adj_font(12));
      bool create;

      pstr->bgcol = (SDL_Color) {0, 0, 0, 0};
                                                        pConnDlg->active, TRUE, TRUE);
        pConnDlg->pUsers_Dlg->pEndWidgetList =
                    copy_chars_to_utf8_str(pstr, pconn->username);

        pBuf = create_themelabel2(NULL, pWindow->dst, pstr, adj_size(100), 0,
                (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE));
        clear_wflag(pBuf, WF_FREE_STRING);

        pBuf->ID = ID_LABEL;

        /* add to widget list */
        if             pWindow->size.y + adj_size(14));
          create = FALSE;
        } else {
	  add_widget_to_vertical_scroll_widget_list(pConnDlg->pUsers_Dlg,
                pBuf, pConnDlg->pUsers_Dlg->pBeginActiveWidgetList, FALSE,
                pWindow->area.x + pWindow->area.w - adj_size(130),
                pWindow->size.y + adj_size(14));
        }
      } conn_list_iterate_end;
UTF8STR(ps || ALLOW_HACK == client.conn.access_level) {
        set_wstate(pConnDlg->pConfigure, FC_WS_NORMAL);
      } else {
        set_wstate(pConnDlg->pConfigure, FC_WS_DISABLED);
      }
#endif
get_client_page() == PAGE_LOAD  utf8_str *ps
  create_frame(pWindow->theme,
               area.x - 1, area.y - 1, area.w + 1, area.h + 1,
               get_theme_color(COLOR_THEME_CONNLISTDLG_FRAME));  create_frame(pWindow->theme,
               area.x - 1, area.y - 1, area.w + 1, area.h + 1,
               get_theme_color(COLOR_THEME_CONNLISTDLG_FRAME));

  draw_frame(pWindow->theme, 0, 0, pWindow->theme->w, pWindow->theme->h);

  /* -------------------------------- */

  /* chat area */

  pConnDlg->pChat_Dlg = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  n = conn_list_size(game.est_connections);

  {
    char cbuf[256];

    fc_snprintf(cbuf, sizeof(cbuf), _("Total users logged in : %d"), n);
    pstr = create_utf8_from_char(cbuf, adj_font(12));
  }

  pstr->bgcol = (SDL_Color) {0, 0, 0, 0};

  pLabel = create_themelabel2(NULL, pWindow->dst,
                              pstr, pConnDlg->text_width, 0,
                             

  add_to_gui_list(ID_LABEL, pLabel);

  create_vertical_scrollbar(pConnDlg->pChat_Dlg, 1,
                            pConnDlg->active, TRUE, TRUE);

  setup_vertical_scrollbar_area(pConnDlg->pChat_Dlg->pScroll,
                adj_size(10) + pConnDlg->text_width + 1,
                
chars(NULL, pWindow->dst, NULL,
                                adj_font(12), pWindow->size.w - adj_size(10) - adj_size(10),
                                                                                                                                            _("Load Game
#if 0            _("Server Settings"),
                                           
  add_to_gui_list(ID_BUTTON, pBuf);
  pServerSettingsButton = pBuf;
#endif

  /* not implemented yet */
#if 0
  pBuf = create_themeicon_button_from_chars(NULL, pWindow->dst->surface,
                                            "?", adj_font(12), 0);
  pBuf->size.y = pWindow->size.y + pWindow->size.h - (pBuf->size.h + 7);
  pBuf->action = client_config_callback;
  set_wstate(pBuf, FC_WS_NORMAL);
  add_to_gui_list(ID_BUTTON, pBuf);
#endif
if (get_wstate(pConnDlg->pEdit) == FC_WS_PRESSED) {
      force_exit_from_event_loop();
    }

    popdown_window_group_dialog(pConnDlg->pBeginWidgetList,
                
    FC_FREE(pConnDlg);

    return TRUE;
  }
ENDREP
DELTA 27385 4139 444
SVN  
k‚z † €‚S yˆiŽ 7ŠuŽ Œ?‹ ‚)aicon, pdest, chars, ptsize, flags) \
	create_iconlabel(picon, pdest, create_utf8_from_char(chars, ptsize), flags)

#define create_active_iconlabel(pBuf, pDest, pstr, pString, pCallback)   \
do { 									 \
  pstr = create_utf8_from_char(pString, 10);				 \
  pstr->style |= TTF_STYLE_BOLD;					 \
  pBuf = create_iconlabel(NULL, pDest, psutf8_str *pstrutf8_str *pstrutf8_str *tENDREP
DELTA 25829 0 5289
SVN  ìï:] ˆ  @…@ ‚7ˆB ‘xŠz ~œt¡ ‚3Ÿ 
¡M v¢Y€ X¤f½ †V¦ ƒ­Y ƒd°y „´Z‡ &¸g‡ „6º z¾G ¿C ÀF uÁM€u ^Ã7€f aÄ{€^ XÆ: |Ç‡ pÉ‡ „Ë‡ FÏ€N Ñ €‚? pÔ   fÔt zÕ\ ‚gÖX  eÙC™ {Û+€+ 5Ý‡ QÞO‡ ƒà"‡ ƒã1€‚m eè ‚êutf8_str *string_utf8;
  utf8_str
				   size.x and size.y are the draw pozitions. */

  SDL_Rect area;                /* position and size of the area the widget resides in */


  void (*set_area) (struct widget *pwidget, SDL_Rect area); (FALSE (FALSE

{
  pwidget->set_position(pwidget, x, y);
}

static inline void widget_resize(struct widget *pwidget, int w, int h)

{
  return pWidget->redraw(pWidget);
}

static inline void widget_draw_frame(struct widget *pwidget)

{
  pwidget->mark_dirty(pwidget);
}

static inline void widget_flush(struct widget *pwidget)

 (FALSE (FALSE (FALSE                    const struct widget *pEndGroupWidgetList,
                
void set_new_group_start_pos(const struct widget *pBeginGroupWidgetList,
                             const struct widget *pEndGroupWidgetList,
                             Sint16 Xrel, Sint16 Yrel);
void del_group_of_widgets_from_gui_list(struct widget *pBeginGroupWidgetList,
                                                                                                                                                                 
int setup_vertical_widgets_position(int step,
                                    Sint16 start_x, Sint16 start_y, Uint16 w, Uint16 h,
                                     (FALSE (FALSE (FALSE                                               struct widget *pNew_Widget,
                                               struct widget *pAdd_Dock, bool dir,
                                               Sint16 start_x, Sint16 start_y);

bool del_widget_from_vertical_scroll_widget_list(struct ADVANCED_DLG *pDlg, 
                                                                 ENDREP
DELTA 27123 36691 7641
SVN  °¸B‚$º~ ‡; €‚  /‰2€L ‚Œ!ƒ Š>Ž8ˆ X˜v€j …š; ‚pŸ>€„; ƒG§… tªe€ Y¬\– ^š;€U 7¯y€H X±t’ T¸@š ƒ
´J§ ¸€! [º7€ƒN 5½€b T¸@€ƒt …?Â9€J ÈLŒ fÉv€W 1Ì.ƒ ƒTÙa žkÝ6€z G ¹ T¸@€‹) N… €  `†{€‚R HŠ?€ Œ|€‚ ~‘ž e’/ “€w •w…  –}€„B œ q-€ N… €‚ „-¢€
 ƒ¦y€„o }®ˆ¯|#include "utf8string.h"

#include "widget.h"
#include "widget_p.h"

struct Utf8Char {
  struct Utf8Char *next;
  struct Utf8Char *prev;
  int bytes;
  char chr[7];
  SDL_Surface *pTsurf;
};

struct EDIT {
  struct Utf8Char *pBeginTextChain;
  struct Utf8Char *pEndTextChain;
  struct Utf8tf8Char *pChain);
static void del_chain(struct Utf8Char *pChain);
static struct Utf8Char *text2chain(const char *text_in);
static char *chain2text(const struct Utf8Char *pInChain, size_t len, size_t *sizetf8 /* 0 */
    pInputChain_TMP = pInputChain_TMP->next;
  } /* while - draw loop */

  widget_flush(pEdt->pWidget);

    if (pEdit_Widget->string_utf8->text != NULL
        && get_wflags(pEdit_Widget) & WF_PASSWD_EDIT) {
      char *backup = pEdit_Widget->string_utf8->text;
      size_t len = strlen(backup) + 1;
      char *cbuf = fc_calloc(1, len);

      memset(cbuf, '*', len - 1);
      cbuf[len - 1] = '\0';
      pEdit_Widget->string_utf8->text = cbuf;
      pText = create_text_surf_from_utf8(pEdit_Widget->string_utf8);
      FC_FREE(cbuf);
      pEdit_Widget->string_utf8->text = backup;
    } else {
      pText = create_text_surf_from_utf8(pEdit_Widget->string_utf8);
    }
_utf8_utf8->style & SF_CENTER_RIGHT) {
          rDest.x += pEdit->w - pText->w - adj_size(5);
        } else {
          rDest.x += adj_size(5); /* ce
    return iRet;
  }
Return length of Utf8Char chain.
  WARRNING: if struct Utf8Char has 1 member and Utf8tf8Char *pChain)
{
  size_t length = 0;

  if (pChain) {
    while (TRUEtf8Char structure.void del_chain(struct Utf8utf8 string to Utf8Char structure.
  Metf8Char *text2chain(const char *text_in)
{
  int i, len;
  struct Utf8Char *pOutChain = NULL;
  struct Utf8Char *chr_tmp = NULL;
  int j;

  len = strlen(text_intf8Char));
  pOutChain->chr[0] = text_in[0];
  for (j = 1; (text_in[j] & (128 + 64)) == 128; j++) {
    pOutChain->chr[j] = text_in[j];
  }
  pOutChain->bytes = j;
  chr_tmp = pOutChain;

  for (i = 1; i < len; i += j) {
    chr_tmp->next = fc_calloc(1, sizeof(struct Utf8Char));
    chr_tmp->next->chr[0] = text_in[i];
    for (j = 1; (text_in[i + j] & (128 + 64)) == 128; j++) {
      chr_tmp->next->chr[j] = text_in[i + j];
    }
    chr_tmp->next->bytes  = jtf8Char structure to chars
  WARNING: Do not free Utf8Char structure but allocates new char array.char *chain2text(const struct Utf8Char *pInChain, size_t len,
                        size_t *size)
{
  int i;
  char *pOutText = NULL;
  int oi = 0;
  int total_size = 0;

  if (!(len && pInChain)) {
    return pOutText;
  }

  pOutText = fc_calloc(8, len + 1);
  for (i = 0; i < len; i++) {
    int j;

    for (j = 0; j < pInChain->bytes && i < len; j++) {
      pOutText[oi++] = pInChain->chr[j];
    }

    total_size += pInChain->bytes;
    pInChain = pInChain->next;
  }

  *size = total_size;utf8_str *pstr, int length, Uint32 flags)
{
  SDL_Rect buf = {0, 0, 0, 0};_utf8 = pstrstr != NULL) {
    pEdit->string_utf8->style |= SF_CENTER;
    buf = utf8_str_size(pstrtf8default:
    break;
  } /* key pressed switch */

  if (Redraw) {
    redraw_edit_chain(pEdt);
  }

  return ID_ERROR;
}

****
  Handle textinput strings coming to the edit widgetUint16 edit_textinput(char *text, void *pData)
{
  struct EDIT *pEdt = (struct EDIT *)pData;
  struct Utf8Char *pInputChain_TMP;
  int i;

  for (i = 0; text[i] != '\0';) {
    int charlen = 1;
    unsigned char leading = text[i++];
    int sum = 128 + 64;
    int addition = 32;

    /* add new element of chain (and move cursor right) */
    if (pEdt->pInputChain != pEdt->pBeginTextChain) {
      pInputChain_TMP = pEdt->pInputChain->prev;
      pEdt->pInputChain->prev = fc_calloc(1, sizeof(struct Utf8Char));
      pEdt->pInputChain->prev->next = pEdt->pInputChain;
      pEdt->pInputChain->prev->prev = pInputChain_TMP;
      pInputChain_TMP->next = pEdt->pInputChain->prev;
    } else {
      pEdt->pInputChain->prev = fc_calloc(1, sizeof(struct Utf8Char));
      pEdt->pInputChain->prev->next = pEdt->pInputChain;
      pEdt->pBeginTextChain = pEdt->pInputChain->prev;
    }

    pEdt->pInputChain->prev->chr[0] = leading;
    /* UTF-8 multibyte handling */
    while (leading >= sum) {
      pEdt->pInputChain->prev->chr[charlen++] = text[i++];
      sum += addition;
      addition /= 2;
    }
    pEdt->pInputChain->prev->chr[charlen] = '\0';
    pEdt->pInputChain->prev->bytes = charlen;

    if (pEdt->pInputChain->prev->chr) {
      if (get_wflags(pEdt->pWidget) & WF_PASSWD_EDIT) {
        char passwd_chr[2] = {'*', '\0'};

        pEdt->pInputChain->prev->pTsurf =
          TTF_RenderUTF8_Blended(pEdt->pWidget->string_utf8->font,
pEdt->pWidget->string_utf8->fgcol);
      } else {
        pEdt->pInputChain->prev->pTsurf =
          TTF_RenderUTF8_Blended(pEdt->pWidget->string_utf8->font,
pEdt->pWidget->string_utf8->fgcol);
      }
      pEdt->Truelength += pEdt->pInputChain->prev->pTsurf->w;
    }

    if (pEdt->InputChain_X >= pEdt->pWidget->size.x + pEdt->pBg->w - adj_size(10)) {
      if (pEdt->pInputChain == pEdt->pEndTextChain) {
        pEdt->Start_X = pEdt->pBg->w - adj_size(5) - pEdt->Truelength;
      } else {
(pEdt->pWidget->size.x + pEdt->pBg->w - adj_size(5) - pEdt->InputChain_X);
      }
    }

    pEdt->ChainLen++;
  }

  redraw_edit_chain(pEdt);

          && pButtonEvent->x < pEdt->pWidget->size.x + pEdt->pBg->w
          && pButtonEvent->y >= pEdt->pWidget->size.y
          && pButtonEvent->y < pEdt->pWidget->size.y + pEdt->pBg->h)) {
      /* exit from loop */
      return (Uint16)ED_MOUSE;
    }
  }
tf8Char ___last;
  struct Utf8
  pEdit_Widget->data.ptr = (void *)&pEdt;

#if 0
  SDL_EnableUNICODE(1);
  SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
#endif /* 0 */

  pEdt.pBg = create_bcgnd_surf(pEdit_Widget->theme, 2,
                        _utf8 /* spacebar */
  pEdt.pEndTextChain->chr[1] = 0;  /* spacebar */
  pEdt.pEndTextChain->next = NULL;
  pEdt.pEndTextChain->prev = NULL;

  /* set font style (if any ) */
  if (!((pEdit_Widget->string_utf8->style & 0x0F) & TTF_STYLE_NORMAL)) {
    TTF_SetFontStyle(pEdit_Widget->string_utf8->font,
                     (pEdit_Widget->string_utf8->style & 0x0F));
  }

  pEdt.pEndTextChain->pTsurf =
      TTF_RenderUTF8_Blended(pEdit_Widget->string_utf8->font,
                             pEdt.pEndTextChain->chr,
                             pEdit_Widget->string_utf8->fgcol);
char passwd_chr[2] = {'*', '\0'};

        pInputChain_TMP->pTsurf =
          TTF_RenderUTF8_Blended(pEdit_Widget->string_utf8->font,
pEdit_Widget->string_utf8->fgcol);
      } else {
        pInputChain_TMP->pTsurf =
          TTF_RenderUTF8_Blended(pEdit_Widget->string_utf8->font,
                                 pInputChain_TMP->chr,
                                 pEdit_Widget->string_utf8                               edit_key_down, NULL, edit_textinput,
                                 edit_mouse_button_down, NULL, NULL);
_utf8->style & 0x0F) & TTF_STYLE_NORMAL)) {
        TTF_SetFontStyle(pEdit_Widget->string_utf8->font, TTF_STYLE_NORMAL);
      }

      if (ret != ED_ESC) {
        size_t len = 0;

        FC_FREE(pEdit_Widget->string_utf8->text);
        pEdit_Widget->string_utf8->text =
          chain2text(pEdt.pBeginTextChain, pEdt.ChainLen, &len);
        pEdit_Widget->string_utf8->n_alloc = len + 1;
      }

      pEdit_Widget->data.ptr = backup;
      set_wstate(pEdit_Widget, FC_WS_NORMAL);
    }
  }

  FREESURFACE(pEdt.pEndTextChain->pTsurf);

  del_chain(pEdt.pBeginTextChain);

  FREESURFACE(pEdt.pBg);

  /* disable repeat /* 0 */ENDREP
DELTA 27708 10713 13200
SVN  ƒÄƒÊƒCQ F €A @‚Ì  ÄRŽ
€ NÆ@€ Lßx¤ UŸ=™ ”8¤ `ƒ—= ‚ÖIŒ ‡#Øv ƒAà"€M Hƒ§8 ƒeäz„ O‚ü ‚é4€  …ë`² ‚~ñ.‹ \ô7 „Iõ€H ‚´,€„R Ä:þyŒ ‚.ÃC •sÅrŒ „yÛu‘ Sá €M Hƒ§8 âj ‚yó ˆö€ SÔ ž1þUŒ „D‚€U Hƒ§8 ƒ^‚¢y„ O‚ü ‚‚§, …‚©I ‡*‚®W ©v‚¶Œ Oƒ ~ …)‚àW€G Hƒ§8 „3‚ç„ Q‚ü Rƒµ3 ‚K‚ìm D‚ï9 „‚ð~ Cƒ¬u ‚D‚öS ƒb‚ù„ Q‚ü Rƒµ3 \‚ìm ‚‚ÿ Cƒ¬u 9ƒ»0… ƒƒ¼m ˜Jƒˆ$Œ …rƒ ~€G Hƒ§8¢ R‚ç3 „ ƒ¨t Cƒ¬u ‚Aƒ®9 ƒaƒ°{„ Q‚ü „8ƒµ3 Cƒ¬u ˆgƒ»0static action_probability follow_up_act_probs[ACTION_COUNT];

/* if (steal_advance == A_UNSET) {
        /* This is the untargeted version. */
        request_do_action(ACTION_SPY_STEAL_TECH,
    pDiplomat_Dlg->target_ids[ATK_CITY],
                          steal_advance);
      } else {
        /* This is the targeted version. */
        pDiplomat_Dlg->actor_unit_id,
    steal_advance);
      }**********
  Popup spy tech stealingutf8_str *psstr = create_utf8_from_char(_("Select Advance to Steal"), adj_font(12));
  pssutf8if (action_prob_possible(follow_up_act_probs[ACTION_SPY_STEAL_TECH])) {
     /* count + at Spy's Discretion */
    count++;
  }
str = create_utf8_str(NULL, 0, adj_font(10));
  psutf8_str(pss
  if (action_prob_possible(follow_up_act_probs[ACTION_SPY_STEAL_TECH]))
             unit_name_translation(game_unit_by_number(id)));
    copy_chars_to_utf8_str(pstr, astr_str(&str));
    astr_free(&str);

    pSurf = create_select_tech_icon(pstr, i, FULL_MODE);

    pBuf = create_icon2(pSurf, pWindow->dst,
                        (WF_FREE_THEME | WF_RESTORE_BACKGROUND
                         | WF_FREE_DATA));
    set_wstate(pBuf, FC_WS_NORMAL);
    pBuf->action = spy_steal_callback;
    pBuf->data.cont = pCont;

    add_to_gui_list(MAX_ID - A_UNSET, pBuf);
    count++;
  }

  /* --------------------------------------------------------- */
  FREEUTF8STR(psutf8_str *pssutf8_str *psstr = create_utf8str = create_utf8_from_char(_("Subvert Enemy Unit"), adj_font(12));
  }

  pssss
  /* Give follow up questions access to action probabilities. */
  action_iterate(act) {
    follow_up_act_probs[act] = act_probs[act];
  } action_iterate_endutf8_str *psstr = create_utf8_from_char(_("Select Improvement to Sabotage") , adj_font(12));
  pssutf8sssutf8_str *psstr = create_utf8_from_char(_("Incite a Revolt!"), adj_font(12));

  pssutf8sssssutf8ssIncitutf8_str *psstr = create_utf8_from_char(_("Bribe Enemy Unit"), adj_font(12));

  psstr, 0);

  pWindow->action = bribsssutf8ssENDREP
DELTA 12387 10596 1001
SVN  ‹I‚ ‡ €4 xŠ1€R 4‹W\
	create_edit(pBackground, pDest,                                                 \
		    create_utf8_from_char(pCharString, iPtsize),                        \
		    length, flags                           utf8_str *pstr, int length,
                           ENDREP
DELTA 27275 408 3683
SVN  ç%ç)‚p ?  :”? x :”?„ w|Ž ‚l”?¬ :”?‡ ]“@€D :”?„ ]“@š ‚œm ‡?ŸPª Y³? ‚{¨ª Y³? ‚g¬
… ƒf®s… Q¶<„ pº G¬> S´g… ƒg¶<… V¶< ƒº{… @¶<‡ CÃ@‡ %´p¨ Q¶<• cÆ@ ‚Ã9… Š>ÅNˆ —ÐjoinNETWORK);
  }

    popup_connection_dialog(lan_scan);
  }
optionsqueue_flush();
    popdown_start_menu();
    popup_optiondlg();
  }
quitpopdown_start_menu();
  }
_utf8->style |= SF_CENTER | TTF_STYLE_BOLD_utf8->style |= SF_CENTER | TTF_STYLE_BOLD_utf8_utf8LOAD_utf8_utf8_utf8OptionsOptionsoptions_callback;
  pWidget->string_utf8CLIENT_OPTIONS_BUTTON_utf8 /* 0 */ENDREP
DELTA 27123 23961 179
SVN  ÐIÑ%V—k ‹O „ 2‹; +Œw ‚Ž!™ ;L RÎ> ‚0’g” E–  E– „ OÎ@„ @…@ /—[Œ #™ 9š?§ ‚›} Tž~€…9 W±+ c¥s© §¹ |¨N€z Zª>€ L¬6© ,­?€ a¯f€W X±*€i B²x v´:… lµ2… Hª>€‚. D­?€} ƒ0»&€‚b ÁD€l `Ã8½ }ÄX¨ ‚]Åz€ ƒNÉI€? ‚Î>utf8
    pWidget->string_utf8
  return -1;
  return -1;
}

/* =
				Public
   = */...
utf8_str *ps                                       
  if (msg_count > 0) {
    for (; current_count < msg_count; current_count++) {
      pMsg = meswin_get_message(current_count);
      pstr = create_utf8_from_char(pMsg->descr, PTSIZE_LOG_FONT);

      if (convert_utf8_str_to_const_surface_width(pstr, label_width - adj_size(10))) {
        /* string must be divided to fit into the given area */
        utf8_str *pstr2;
        char **utf8_texts = create_new_line_utf8strs(pstr->text);
        int count = 0;

        while (utf8_texts[count]) {
          pstr2 = create_utf8_str(utf8_texts[count],
                                  strlen(utf8_texts[count]) + 1, PTSIZE_LOG_FONT);

          pBuf = create_iconlabel(NULL, pWindow->dst, pstr2,
 _utf8->bgcol = (SDL_Color) {0, 0, 0, 0};

            pBuf->action = msg_callback;
            if _utf8->fgcol = *get_theme_color(COLOR_THEME_MESWIN_ACTIVE_TEXT2);
              } else {
                pBuf->string_utf8
            pBuf->ID = ID_LABEL;

            widget_set_area(pBuf, area);

            /* add to widget list */
            if  pBuf, pWindow, FALSE,
                   pBuf,
                                                        pMsg_Dlg->pBeginActiveWidgetList,
                                                        FALSE,UTF8STR(pstr);
      } else {
        pBuf = create_iconlabel(NULL, pWindow->dst, pstr,
        /* duplicated block */
        {
          pBuf->string_utf8->bgcol = (SDL_Color) {0, 0, 0, 0};
 _utf8_utf8}
          }

          pBuf->ID = ID_LABEL;

          widget_set_area(pBuf, area);

          /* add to widget list */
          if (create) {
            add_widget_to_vertical_scroll_widget_list(pMsg_Dlg, pBuf,
                                                      pWindow, FALSE,
                create = FALSE;
          } else {
            add_widget_to_vertical_scroll_widget_list(pMsg_Dlg, pBuf,
                                                      pMsg_Dlg->pBeginActiveWidgetList,
                                                      FALSE,utf8_str *pstr;
  struct widget *pWindow = NULL;
  SDL_Surface *pBackground;
  SDL_Rect area;

  if (pMsg_Dlg) {
    return;
  }

  pMsg_Dlg = fc_calloc(1, sizeof(struct ADVANCED_DLG));

  /* create window */
  pstr = create_utf8_from_char(_("Messages"), adj_font(12));
  pstr->style = TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, pstr, 0);

  pMsg_Dlg->pEndWidgetList = pWindow;
  pMsg_Dlg->pBeginWidgetList = pWindow;

/*  area = pWindow->area;*/
str = create_utf8_from_char("sample text", PTSIZE_LOG_FONT);
utf8_str_height(pstr);

  FREEUTF8STR(ps
  setup_vertical_scrollbar_area(pMsg_Dlg->pScroll,
                                area.x + area.w, area.y,
                                area.h, TRUE);
 (pMsg_Dlg) {
    popdown_window_group_dialog(pMsg_Dlg->pBeginWidgetList,
                                pMsg_Dlg->pEndWidgetList);
    FC_FREE(pMsg_Dlg->pScroll);
    FC_FREE(pMsg_Dlg);
  }ENDREP
DELTA 23210 377 17227
SVN  ‚óu‚üu…\Å ‰ š [‰« ‚+‹ Y4 ‚HŽ Yˆ *‘xš G  '“|€‚4 ]—€‚H Œn¨	¶ G  W“| Š¶L€V kÁ)“ „Â" qÆ+ +Ç€I 1Ê° ‚UËy túr ‚FÏD€B ƒCÒb„ xÖ* ‚y×'„ tÚ% ‚wÛ„ „Þ„ ƒkâ$„ æ ‚lç'„ ƒ}ê„ „î„ ò7 ‚ióJ„ ƒbö8„ Vö8¢ ‚iû„ ƒUþ„ ƒa„ …1…e„ …>‹„ „^„ „_”u« cše½ ‚|œ	„ „Ÿ
„ ƒ|£"„ ƒZ§#„ ƒh«„ ƒb®o„ ƒw²V„ ƒv¶R„ ƒgºM„ ƒn¾9„ W¾9€ ‚Ã~„ ƒ`Æ„ RÉ† ‚ËQ„ ZÉ ƒÎH„ „Ñ_„ cÕf ƒBÖK€ ‚nÛ)„ ÞŒ †#ß:« xæn“ ‚vç„ |êz dëx ~íb« aðq» ‚Vò „|ôi „ùf ýo †þ~¯ T‚…4 ‚†	¦ 5‚‡G§ ‚	‚‰, K‚‹6 .‚Œ¦ ‚f ‚=‚Žn [‚‘1 ‡‚’ 6‚™ ˆ ˆ‚š^ˆ ‚¢g€ ‚¤b€ „Q‚¦)ˆ ‚n‚«€Š M‚Àw T‚¶q€‹ ?‚Àb€ƒ ‚Äa€T k‚Æ;€B ‚ÇZ€S i‚É&€ƒ f‚Ìj€„V ‚T‚Ñe J‚Ô?€…z Z‚Ú5€F w‚Ü9€… N¨; ‚m‚ä4 …‚ã€q f‚é.€‚# ~‚ìW€B ‚2‚î	ˆ ƒ9‚ð</* SDL */
#include <SDL.h>limisc.h"
#include "control.h"

/* gui-sdl2                    WF_HIDDEN )


type == SDL_KEYDOWN
      || (Main.event.type == SDL_MOUSEBUTTONDOWN
          && Main.event.button.button == SDL_BUTTON_LEFT)) {
    struct unit *pUnit = head_of_units_in_focus();

    set_wstate(pOrder_Widget, FC_WS_SELECTED);
    selected_widget = pOrder_Widget;

    if (!pUnit) {
      return -1;
    }
{
        struct extra_type_list *extras = extra_type_list_by_cause(EC_IRRIGATION);

        if (extra_type_list_size(extras) > 0) {
          struct extra_type *pextra;

          pextra = extra_type_list_get(extra_type_list_by_cause(EC_IRRIGATION), 0);

          key_unit_connect(ACTIVITY_IRRIGATE, pextra);
        }
      }
    default:
      break;
    }
  }

  return -1;
}

 (pMiniMap->size.h == pInfoWind->size.h) {
      xx = 0;
      w = main_window_width()main_window_width()  }

  pTmpWidget = pBeginOrderWidgetList;

  if (count - count_on_line > 0) {
    lines = (count + (count_on_line - 1)) / count_on_line;

    count = count_on_line - ((count_on_line * lines) - count);    if (!(get_wflags(pTmpWidget) & WF_HIDDEN)) {size_t len;
  struct road_type *proad;
  struct road_type *prail;
utf8
utf8utf8utf8utf8utf8utf8utf8utf8utf8AIRLIFT, pBuf);
  /* --------- */
utf8utf8utf8utf8utf8utf8++;
  pBuf->info_label = create_utf8_str(cB
  pOrder_Automate_Unit_Button = pBuf;
  /* --------- */    
utf8utf8utf8utf8utf8utf8utf8utf8utf8utf8OLLUTION, pBuf);
  /* --------- */

  /* Build Airbase */
  fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Build Airbase"), "Shift+utf8utf8Shift+utf8utf8utf8utf8_from_char(cBuf, adj_font(10));
  add_to_gui_list(ID_UNIT_ORDER_IRRIGATE, pBuf);

  pOrder_Irrigation_Button = pBuf;
  /* --------- */    

  /* Establishutf8

  len = 0;++;
  pBuf->info_label = create_utf8_str(cB
  /* --------- */
utf8++;
  pBuf->info_label = create_utf8_str(cB
  pOrder_Build_AddTo_City_Button = pBuf;
  /* --------- */
  if ((C_S_RUNNING != client_state())
      ||
      hide_unitinfo_window_buttons();/* running state, but AI is playing */
/* running state with human player */
 utf8_strutf8_str
      /* unit_can_est_trade_route_here(pUnit) */
      if (pCity && utype_can_do_action(unit_type(pUnit),
                                       ACTION        int revenue = get_caravan_enter_city_trade_bonus(pHomecity, pCity,
                                                         TRUE);
utf8_str
            || !strcmp(terrain_rule_name(pTerrain), "Jungle")) {
          /* set Crop Forest Icon */
          fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
                      _("Cut Down to"),
                      terrain_name_translation(pTerrain->irrigation_result),
                      "I", time , PL_("turn", "turns", time));
          pOrder_Irrigation_Button->theme = pTheme->OCutDownForest_Icon;
        } else if (!strcmp(terrain_rule_name(pTerrain), "Swamp")) {
          fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
                      _("Irrigate to"),
                      terrain_name_translation(pTerrain->irrigation_result),
                      "I", time , PL_("turn", "turns", time));
          pOrder_Irrigation_Button->theme = pTheme->OIrrigation_Icon;
        } else {
          /* set Irrigation Icon */
          fc_snprintf(cBuf, sizeof(cBuf),"%s (%s) %d %s",
                      _("Build Irrigation"), "I", time , 
                      PL_("turn", "turns", time));
          pOrder_Irrigation_Button->theme = pTheme->OIrrigation_Icon;
        }

        copy_chars_to_utf8_str(pOrder_Irrigation_Button->info_label, cBuf);
        clear_wflag(pOrder_Irrigation_Button, WF_HIDDEN);
      } else {
        set_wflag(pOrder_Irrigation        /* FIXME: THIS CODE IS WRONG */
        if (!strcmp(terrain_rule_name(pTerrain), "Forest")) {
	  /* set Irrigate Icon -> make swamp */
          fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
                      _("Irrigate to"),
                      terrain_name_translation(pTerrain->mining_result),
                      "M", time , PL_("turn", "turns", time));
          pOrder_Mine_Button->theme = pTheme->OIrrigation_Icon;
        } else if (!strcmp(terrain_rule_name(pTerrain), "Jungle")
                   || !strcmp(terrain_rule_name(pTerrain), "Plains")
                   || !strcmp(terrain_rule_name(pTerrain), "Grassland")
                   || !strcmp(terrain_rule_name(pTerrain), "Swamp")) {
          /* set Forest Icon -> plant Forrest*/
          fc_snprintf(cBuf, sizeof(cBuf),"%s (%s) %d %s",
                      _("Plant Forest"), "M", time,
                      PL_("turn", "turns", time));
          pOrder_Mine_Button->theme = pTheme->OPlantForest_Icon;

        } else {
          /* set Mining Icon */
          fc_snprintf(cBuf, sizeof(cBuf),"%s (%s) %d %s",
                      _("Build Mine"), "M", time,
                      PL_("turn", "turns", time));
          pOrder_Mine_Button->theme = pTheme->OMine_Icon;
        }

        copy_chars_to_utf8_str(pOrder_Mine_Button->info_label, cBuf);
        clear_wflag(pOrder_Mine_Button, WF_HIDDEN);
      } else {
                fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
                    _("Transform to"),
                    terrain_name_translation(pTerrain->transform_result),
                    "O", time, PL_("turn", "turns", time));
        copy_chars_to_utf8_str(pOrder_Transform_Button->info_label, cBuf);
        clear_wflag(pOrder_Transform_Button, WF_HIDDEN);
      } else {
        pbase != NULL) {
        local_show(ID_UNIT_ORDER_FORTRESS);
      } else {
                local_show(ID_UNIT_ORDER_FORTIFY);
      } else {
        pbase != NULL) {
        local_show(ID_UNIT_ORDER_AIRBASE);
      } else {
                local_show(ID_UNIT_ORDER_POLLUTION);
      } else {
        local_hide(ID_UNIT_ORDER_POLLUTION);
      }

      if (can_unit_paradrop(pUnit)) {
        local_show(ID_UNIT_ORDER_PARADROP);
      } else {
        local_hide(ID_UNIT_ORDER_PARADROP);
      }

      if (can_unit_do_activity(pUnit, ACTIVITY_FALLOUT)) {
        local_show(ID_UNIT_ORDER_FALLOUT);
      } else {
                local_show(ID_UNIT_ORDER_SENTRY);
      } else {
        local_hide(ID_UNIT_ORDER_SENTRY);
      }

      if (can_unit_do_activity(pUnit, ACTIVITY_PILLAGE)) {
        local_show(ID_UNIT_ORDER_PILLAGE);
      } else {
        local_hide(ID_UNIT_ORDER_PILLAGE);
      }

      if (pCity && can_unit_change_homecity(pUnit)
          && pCity->id != pUnit->homecity) {
        local_show(ID_UNIT_ORDER_HOMECITY);
      } else {
        local_hide(ID_UNIT_ORDER_HOMECITY);
      }

      if (pUnit->client.occupied) {
        local_show(ID_UNIT_ORDER_UNLOAD_TRANSPORTER);
      } else {
                local_show(ID_UNIT_ORDER_WAKEUP_OTHERS);
      } else {
        local_hide(ID_UNIT_ORDER_WAKEUP_OTHERS);
      }

      if (can_unit_do_autosettlers(pUnit)) {
        if (unit_has_type_flag(pUnit, UTYF_SETTLERS)) {
          if(pOrder_Automate_Unit_Button->theme != pTheme->OAutoSett_Icon) {
            fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Auto Settler"), "A");
            pOrder_Automate_Unit_Button->theme = pTheme->OAutoSett_Icon;
            copy_chars_to_utf8_str(pOrder_Automate_Unit_Button->info_label,
                                   cBuf);
          }
        } else {
          if (pOrder_Automate_Unit_Button->theme != pTheme->OAutoAtt_Icon) {
            fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Auto Attack"), "A");
        utf8_str(pOrder_Automate_Unit_Button->info_label,
                                   cBuf);
          }
        }
        clear_wflag(pOrder_Automate_Unit_Button, WF_HIDDEN);
      } else {
                local_show(ID_UNIT_ORDER_AUTO_EXPLORE);
      } else {
        local_hide(ID_UNIT_ORDER_AUTO_EXPLORE);
      }

      {
        bool conn_possible = FALSE;
        struct extra_type_list *extras;

        extras = extra_type_list_by_cause(EC_IRRIGATION);

        if (extra_type_list_size(extras) > 0) {
          struct extra_type *tgt;

          tgt = extra_type_list_get(extras, 0);
          conn_possible = can_units_do_connect(punits, ACTIVITY_IRRIGATE, tgt);
        }

        if (conn_possible) {
          local_show(ID_UNIT_ORDER_CONNECT_IRRIGATE);
        } else {
          local_hide(ID_UNIT_ORDER_CONNECT_IRRIGATE);
        }
      }
if (can_unit_act_against_own_tile(pUnit)) {
       local_show(ID_UNIT_ORDER_DIPLOMAT_DLG);
      } else {
               local_show(ID_UNIT_ORDER_NUKE);
      } else {
        local_hide(ID_UNIT_ORDER_NUKE);
      }

      if (pCity && pCity->airlift) {
        local_show(ID_UNIT_ORDER_AIRLIFT);
        hide(ID_UNIT_ORDER_GOTO_CITY);
      } else {
        local_show(ID_UNIT_ORDER_GOTO_CITY);
                local_show(ID_UNIT_ORDER_UPGRADE);
      } else {
                ENDREP
DELTA 27305 13399 962
SVN  ¼{¼v5„\ –f  e–g m—M€q …"š(› gŸi€h „'¢9¨ „v§
€> lª ŽP®+bbbuf, FC_WS_NORMAL);
  }

  /* update text info */
  pbuf = pbuf->prev;
  copy_chars_to_utf8_str(pbuf->string_utf8utf8_str *pstr;
    char cbbuf, sizeof(cbuf), _("The %s Spaceship"),
                nation_adjective_for_player(pPlayer));
    pstr = create_utf8_from_char(cbuf, adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, psutf8_from_char(_("Close Dialog (Esc)"),
str = create_utf8_from_char(get_spaceship_descr(NULL), adj_font(12));
    pstr->bgcol = (SDL_Color) {0, 0, 0, 0};
    pBuf = create_iconlabel(NULL, pWindow->dst, pstr, WF_RESTORE_BACKGROUND)ENDREP
DELTA 27376 14043 32182
SVN  ƒÉƒÈoƒC¡ ©_ €v ‚g«vŒ †®m€v  µ{€ žF¸º ¢>×” (ù]™ „tû€v …4€~Ÿ †y†Q€v ‘Ž8„ ƒŸV„ ƒ¢\… —¥o» ‚½>„ µ{˜ ½> EÁ=… ¡-Â¯ †$ã]² ƒ'ê0° ˆîŒ ?ö3 ˆc÷s€ ‚c‚_€‚% ‚†hŽ Uìt€ „ ‚‰nŽ ‚-‚|€c ‚‘€B >‚“S€` \‚•r +‚–O‘ ~‚¦€K …‚§U€ y‚®€ O‚°*… W‚À{… ‰‚ÁT€_ …7‚Ë@€t ^‚Ñk€e ‡]‚Ó.Ž ‚T‚ÛŽ ‚:‚Ý{© ‚Û1 ;‚á}Ž ƒ7‚ãFŽ ‚ ‚çŽ m‚é9Ž o‚ë4€ L‚î:‡ ‚ï€i L‚þy† 9‚ÿKŽ ‚UƒŽ ƒƒƒu­ ƒ; wƒˆ;€h “[ƒŠ€‚  ƒ 2€ ‚&ƒ¢q€‚e ›Vƒ¨Š …ƒÃu_utf8->text != NULL) {
      fc_snprintf(pEditor->worklist_name, MAX_LEN_NAME, "%s",
                  pWidget->string_utf8->text);
    } else {
      /* empty input -> restore previous content */
      copy_chars_to_utf8_str(pWidget->string_utf8utf8_str *psstr = create_utf8_from_char(utype_name_translation(prod.value.utype), adj_font(10));
  } else {
    pstr = create_utf8prod.value.building),
                                 adj_font(10));
  }

  pstr->style |= SF_CENTER;
  pBuf = create_iconlabel(NULL, pTarget->dst, psutf8_str(pEditor->pWork->pEndActiveWidgetList->string_utf8char *text;
  Uint16text = pItem->string_utf8_utf8->text = pItem->prev->string_utf8->text;
    pItem->ID = pItem->prev->ID;

    pItem->prev->string_utf8->text = tchar *text = pItem->string_utf8_utf8->text = pItem->next->string_utf8->text;
    pItem->ID = pItem->next->ID;

    pItem->next->string_utf8->text = tutf8utf8_utf8utf8_from_char(utype_name_translation(target.value.utype),
utf8target.value.building),
_utf8utf8_str(pEditor->pProduction_Name->string_utf8utf8_str(pEditor->pProduction_Progres->string_utf8utf8_str(pEditor->pWorkList_Counter->string_utf8utf8_str *psb
  create_frame(pMain,
               0, 0, pMain->w - 1, pMain->h - 1,
               get_theme_color(COLOR_THEME_WLDLG_FRAME));buf, sizeof(cbuf), _("Worklist of\n%s"), city_name(pCity));
  } else {
    fc_snprintf(cbuf, sizeof(cbuf), "%s", global_worklist_name(pGWL));
  }

  pstr = create_utf8_from_char(cbuf, adj_font(12));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);

  pBuf = create_iconlabel(NULL, pWindow->dst, psbuf, sizeof(cbpstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->bgcol = (SDL_Color) {0, 0, 0, 0};
  pBuf = create_iconlabel(NULL, pWindow->dst, psbuf, sizeof(cbbuf, sizeof(cbuf), _("%s\nblocked!"), name);
        } else {
          fc_snprintf(cbuf, sizeof(cbbuf, sizeof(cbuf), _("%s\nfinished!"), name);
      }
    }
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pBuf = create_iconlabel(NULL, pWindow->dst, psbuf, sizeof(cbuf), "%d%%" , turns);
    pstr = create_utf8_from_char(cbuf, adj_font(12));
    pssstr = create_utf8str->style |= SF_CENTER;
    pBuf = create_iconlabel(NULL, pWindow->dst, psstr = create_utf8_from_char(utype_name_translation(prod.value.utype),
                                   adj_font(10));
    } else {
      pstr = create_utf8prod.value.building),
                                   adj_font(10));
    }
    pstr->style |= SF_CENTER;
    pBuf = create_iconlabel(NULL, pWindow->dst, ps_utf8_utf8str = create_utf8_str(NULL, 0, adj_font(10));
  pstr->style |= (SF_CENTER|TTF_STYLE_BOLD);
  psbuf, sizeof(cbuf), "%s", improvement_name_translation(pImprove));
      copy_chars_to_utf8_str(pstr, cbuf);
      psstr->style |= TTF_STYLE_STRIKETHROUGH;
      }

      pText_Name = create_text_surf_smaller_than_w(psbuf, sizeof(cbbuf, sizeof(cbbuf, sizeof(cbuf), _("(%s)\n%d/%d %s\n%d buf, sizeof(cbbuf, sizeof(cbbuf, sizeof(cbbuf, sizeof(cbbuf, sizeof(cbuf), _("shields into gold"));
        }
      }

      copy_chars_to_utf8_str(pstr, cbuf);
      pstr->style &= ~TTF_STYLE_BOLD;
      psutf8(psbuf, sizeof(cbuf), "%s", utype_name_translation(un));

      copy_chars_to_utf8_str(pstr, cbuf);
      psn_w(psbuf, sizeof(cbbuf, sizeof(cbbuf, sizeof(cbuf),
		    _("(%d/%d/%s)\n%d %sutf8_str(pstr, cbuf);
      pstr->style &= ~TTF_STYLE_BOLD;

      pText = create_text_surf_from_utf8(ps
  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w - 1, dst.h - 1,
               get_theme_color(COLOR_THEME_WLDLG_FRAME));
  create_frame(pWindow->theme,
               dst.x + 2, dst.y + 2, dst.w - 5, dst.h - 5,
               get_theme_color(COLOR_THEME_WLDLG_FRAME));
  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w - 1, dst.h - 1,
               get_theme_color(COLOR_THEME_WLDLG_FRAME));
    create_frame(pWindow->theme,
                 dst.x, dst.y, dst.w - 1, dst.h - 1,
                 get_theme_color(COLOR_THEME_WLDLG_FRAME));
    create_frame(pWindow->theme,
                 dst.x + adj_size(2), dst.y + adj_size(2),
                 dst.w - adj_size(5), dst.h - adj_size(5),
                 get_theme_color(COLOR_THEME_WLDLG_FRAME));UTF8STR(psENDREP
DELTA 27584 20286 872
SVN  ‚Æ‚ÅGa–` —Q  †G—R€ ¢HŸ€x ‰_Ã Œ 1Ìo€ ‚JÏ3€{ aÓ{„  ÕaŒ „jõr€ ƒ ûc„ Oâu ÿX€ V‚t… ¦rƒL€‰  ¦/³5Œ „fÙt€~ ƒßY„ Oâu KãE€ƒ è"„ „Oé?„ é? ‚uï)€ Hí=‹ ‡<óy„ Pû: ‚ü£ c‚$ Yÿ$¥ ‚6‚$„ ‚7‚ƒ_„ ‚/‚†„ ½6‚ˆObbuf, sizeof(cbuf), "%d", *(int *)pMotion->pScrollBar->data.ptr);
    copy_chars_to_utf8_str(pMotion->pScrollBar->next->string_utf8, cb
      if (pEdit->string_utf8->text != NULL) {
        cmafec_preset_add(pEdit->string_utf8->text, &pCma->edited_cm_parmutf8_str *psstr = create_utf8_from_char(_("Name new preset"), adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;

    pWindow = create_window_skeleton(NULL, psstr = create_utf8_from_char(_("What should we name the preset?"), adj_font(10));
    pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
    pstr->fgcol = *get_theme_color(COLOR_THEME_CMA_TEXT);

    pText = create_text_surf_from_utf8(pstr);
    FREEUTF8STR(psutf8utf8_str *psstr = create_utf8_from_char(_("Presets"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, psutf8str = create_utf8_from_char(cmafec_preset_get_descr(i), adj_font(10));
    pstr->style |= TTF_STYLE_BOLD;
    pBuf = create_iconlabel(NULL, pWindow->dst, ps_utf8buf;
  char cbuf[4];

  if (!pCma) {
    return;
  }

  /* exit button */
  pbuf = pCma->pDlg->pEndWidgetList->prev;
  output_type_iterate(i) {
    /* min label */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", *(int *)pbuf->prev->data.ptr);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

    /* min scrollbar */
    pbuf = pbuf->prev;
    pbuf->size.x = pbuf->next->size.x
    	+ pbuf->next->size.w + adj_size(5) + adj_size(20) + *(int *)pbuf->data.ptr;

    /* factor label */
    pbuf = pbuf->prev;
    fc_snprintf(cbuf, sizeof(cbuf), "%d", *(int *)pbuf->prev->data.ptr);
    copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

    /* factor scrollbar*/
    pbuf = pbuf->prev;
    pbuf->size.x = pbuf->next->size.x
      + pbuf->next->size.w + adj_size(5) + *(int *)pbuf->data.ptr - 1;
  } output_type_iterate_end;

  /* happy factor label */
  pbuf = pbuf->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", *(int *)pbuf->prev->data.ptr);
  copy_chars_to_utf8_str(pbuf->string_utf8, cbuf);

  /* happy factor scrollbar */
  pbuf = pbuf->prev;
  pbuf->size.x = pbuf->next->size.x
    + pbuf->next->size.w + adj_size(5) + *(int *)pbutf8_str *psstr = create_utf8_from_char(cBuf, adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, psutf8str = create_utf8_str(NULL, 0, adj_font(12));
  text_w = 0;

  copy_chars_to_utf8_str(pstr, _("Minimal Surplus"));
  pMinimal = create_text_surf_from_utf8(pstr);

  copy_chars_to_utf8_str(pstr, _("Factor"));
  pFactor = create_text_surf_from_utf8(pstr);

  /* ---------- */
  output_type_iterate(i) {
    copy_chars_to_utf8_str(pstr, get_output_name(i));
    pText[i] = create_text_surf_from_utf8(psutf8utf8utf8_str(pstr, _("Celebrate"));
  pText[O_LAST] = create_text_surf_from_utf8(pstr);
  FREEUTF8STR(pstr);

  /* happy factor label */
create_utf8utf8utf8_from_char(_("Load settings"),
utf8_from_char(_("Delete settings"),
utf8utf8utf8ENDREP
DELTA 17392 98344 10706
SVN  Œuî„WðJ ˆt € 	‰VŽ ƒZŠU€@ Pô@¤ D…@  M‘; Sô=¢ D…@ U”1 )• –5 d}¢ y˜O ™N€M D›% œk }} mž~ Pô@¢ D…@€Š Pô@ ‚ M€E H¢~ }¤H€  $¦E Pô@ g \€x q£U€ {¦E³ Pô@€z D…@€i ©^¦ « p¬€[ Pô@€v D…@€\ h«€A Pô@– D…@€` ¯V… ‚°r– D…@€ƒ% Pô@ &²z ‚J´!€d ·… r¸-€ -ºt O¼" p½w¢ D…@€ˆC Pô@ª D…@€B „`Àr¥ ,Å|„ VÇ3¡ „È… Ì! tÍ2ª D…@€‹; QÌ3€O Pô@€] D…@• Ï PÐ‘ Pô@€] D…@€‚v gÑm¶ D…@€E WÔc vÖ>€„| Sô=° D…@€‚4 ZÔ} rà  #á€‹ Pô@° D…@€} ZÔ}€ Pô@€[ D…@€& î)€B i¾~€[ D…@€‚o Pô@š D…@ ñ# Qò8 D…@¢ D…@€‚J ô ž D…@™ õr€‚5 ‚[ù1 ‚ü± ‚jþJž D…@¶ ‡
‚3 G — D…@‡ F‰<© oŠ.  ]‹5€hfc_config.h>
#endif

/* SDL */
#include <SDL.h>

/* utility */
#include "fcintl.h"
#include "log.h"
#include "mem.h"

/* client/gui-sdl2#include "utf8pString);
static SDL_Surface *create_str16_multi_surf(SDL_String16 *pString);

static SDL_Surface *create_utf8_surf(utf8_str *pstr);
static SDL_Surface *create_utf8_multi_surf(utf8_str *pstr);Adjust font sizes for small screen.

  }
}
#endif /* SMALL_SCREENCalculate display size of string.
(pString16->style & 0x0F));
    }
            FC_FREE(UniTexts[count]);
            count++;
          } while 
  return Ret;
}Calculate display size of string.
******/
SDL_Rect utf8_str_size(utf8_str *pstr)
{
  SDL_Rect ret = {0, 0, 0, 0};

  if (pstr != NULL && pstr->text != NULL && pstr->text != '\0') {
    char *current = pstr->text;
    char c = *current;
    bool new_line = FALSE;
    int w, h;

    /* find '\n' */
    while (c != '\0') {
      if (c == '\n') {
	new_line = TRUE;
	break;
      }
      current++;
      c = *current;
    }

    if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
      TTF_SetFontStyle(pstr->font, (pstr->style & 0x0F));
    }

    if (new_line) {
      int ww, hh, count = 0;
      char **utf8_texts = create_new_line_utf8strs(pstr->text);

      w = 0;
      h = 0;
      while (utf8_texts[count]) {
        if (TTF_SizeUTF8(pstr->font, utf8_texts[count], &ww, &hh) < 0) {
          do {
            FC_FREE(utf8_texts[count]);
            count++;
          } while (utf8_texts[count]);
          log_error("TTF_SizeUTF8() return ERROR !");
        }
        w = MAX(w, ww);
        h += hh;
        FC_FREE(utf8_texts[count]);
        count++;
      }
    } else {
      if (TTF_SizeUTF8(pstr->font, pstr->text, &w, &h) < 0) {
        log_error("TTF_SizeUTF8() return ERROR !");
      }
    }

    if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
      TTF_SetFontStyle(pstr->font, TTF_STYLE_NORMAL);
    }

    ret.w = w;
    ret.h = h;
  } else {
    ret.h = (pstr ? TTF_FontHeight(pstr->font) : 0);
  }

  return ret;
}create_string16(Uint16 *pInTextString,
                              
    return NULL;
  }

  str->style = TTF_STYLE_NORMAL;
  str->bgcol = (SDL_Color) {0, 0, 0, 0};
  str->fgcol = *get_theme_color
  return str;
}Create utf8_strutf8_str *create_utf8_str(char *in_text, size_t n_alloc, Uint16 ptsize)
{
  utf8_str *str = fc_calloc(1, sizeof(utf8_str
  if ((str->font = load_font(str->ptsize)) == NULL) {
    log_error("create_utf8_str(): load_font failed");
    FC_FREE(str);

    return NULL;
  }

  str->style = TTF_STYLE_NORMAL;
  str->bgcol = (SDL_Color) {0, 0, 0, 0};
  str->fgcol = *get_theme_colorin_text;
  str->n_alloc = n_alloc;

  return str;
}Convert char array to SDL_String16. Pointer to target string is needed
  as parameter, but also returned for convenience.
******/
SDL_String16 *copy_chars_to_string16(SDL_String16 *pString,
                                     
  n = (strlen(pCharString) + 1) * 2;

  convertcopy_to_utf16(pString->text, pString->n_alloc, pCharString);

  return pString;
}Convert char array to utf8_str. Pointer to target string is needed
  as parameter, but also returned for convenience.
******/
utf8_str *copy_chars_to_utf8_str(utf8_str *pstr, const char *pchars)
{
  size_t n;

  fc_assert_ret_val(pstr != NULL, NULL);
  fc_assert_ret_val(pchars != NULL, NULL);

  n = (strlen(pchars) + 1);

  if (n > pstrstr->n_alloc) / 2;

    pstr->n_alloc = (n > n1) ? n : n1;
    pstr->text = fc_realloc(pstr->text, pstr->n_alloc);
  }

  fc_snprintf(pstr->text, pstr->n_alloc, "%s", pchars);

  return pstr;
}Blit text to surface.
******/
int write_text16(SDL_Surface *pDest, Sint16 x, Sint16 y,
                 SDL_String16 *, 255Blit text to surface.
******/
int write_utf8(SDL_Surface *dest, Sint16 x, Sint16 y,
               utf8_str *pstr)
{
  SDL_Rect dst_rect = { x, y, 0, 0 };
  SDL_Surface *text = create_text_surf_from_utf8(pstr);

  if (alphablit(text, NULL, dest, &dst_rect, 255) < 0) {
    log_error("write_utf8(): couldn't blit text to display: %s",
              SDL_GetError());
    FREESURFACE(text);
    return -1;
  }

  FREESURFACE(text);

  return 0;
}                                     pString->text, pString->fgcol,
                                #if 0#endif
    pText = pTmp;

  }
  break;
  case 2:
    pText = TTF_RenderUNICODE_Blended(pString->font,
                                Create Text Surface from utf8_str
******/
static SDL_Surface *create_utf8_surf(utf8_str *pstr)
{
  SDL_Surface *text = NULL;

  if (pstr == NULL) {
    return NULL;
  }

  if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
    TTF_SetFontStyle(pstr->font, (pstr->style & 0x0F));
  }

  switch (pstr->render) {
  case 0:
    text = TTF_RenderUTF8_Shaded(pstr->font,
                                 pstr->text, pstr->fgcol,
                                 pstr->bgcol);
    break;
  case 1:
    text = TTF_RenderUTF8_Solid(pstr->font, pstr->text, pstr->fgcol);
    break;
  case 2:
    text = TTF_RenderUTF8_Blended(pstr->font, pstr->text, pstr->fgcol);
    break;
  }

  if (text != NULL) {
    log_debug("create_utf8_surf: Font is generally %d big, and "
              "string is %d big", TTF_FontHeight(pstr->font), text->h);
    log_debug("create_utf8_surf: String is %d length", text->w);
  } else {
    log_debug("create_utf8_surf: text NULL");
    text = create_surf(0, 0, SDL_SWSURFACE);
  }

  if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
    TTF_SetFontStyle(pstr->font, TTF_STYLE_NORMAL);
  }

  return text;
}Create surface with multiline text drawn.
******/
static SDL_Surface *create_str16_multi_surf(SDL_String16 *
  SDL_GetColorKey(pTmp[0], &color);
TRUE                                 , 255Create surface with multiline text drawn.
******/
static SDL_Surface *create_utf8_multi_surf(utf8_str *pstr)
{
  SDL_Rect des = {0, 0, 0, 0};
  SDL_Surface *text = NULL, **tmp = NULL;
  Uint16 i, w = 0, count = 0;
  Uint32 color;
  char *buf = pstr->text;
  char **utf8_texts = create_new_line_utf8strs(pstr->text);

  while (utf8_texts[count]) {
    count++;
  }

  tmp = fc_calloc(count, sizeof(SDL_Surface *));

  for (i = 0; i < count; i++) {
    pstr->text = utf8_texts[i];
    tmp[i] = create_utf8_surf(pstr);

    /* find max len */
    if (tmp[i]->w > w) {
      w = tmp[i]->w;
    }
  }

  pstr->text = buf;

  /* create and fill surface */

  SDL_GetColorKey(tmp[0], &color);

  switch (pstr->render) {
  case 1:
    text = create_surf(w, count * tmp[0]->h, SDL_SWSURFACE);
    SDL_FillRect(text, NULL, color);
    SDL_SetColorKey(text, SDL_TRUE, color);
    break;
  case 2:
      text = create_surf_with_format(tmp[0]->format,
                                     w, count * tmp[0]->h, tmp[0]->flags);
      SDL_FillRect(text, NULL, color);
    break;
  default:
    text = create_surf(w, count * tmp[0]->h, SDL_SWSURFACE);
    SDL_FillRect(text, NULL, color);
    break;
  }

  /* blit (default: center left) */
  for (i = 0; i < count; i++) {
    if (pstr->style & SF_CENTER) {
      des.x = (w - tmp[i]->w) / 2;
    } else {
      if (pstr->style & SF_CENTER_RIGHT) {
	des.x = w - tmp[i]->w;
      } else {
	des.x = 0;
      }
    }

    alphablit(tmp[i], NULL, text, &des, 255);
    des.y += tutf8_texts[i]);
    FREESURFACE(tmp[i]);
  }

  FC_FREE(tmp);

  return text;
}Generic function to create surface with any kind of text, single line or
  multiline, drawn.
******/
SDL_Surface *
  return NULL;
}Generic function to create surface with any kind of text, single line or
  multiline, drawn.
******/
SDL_Surface *create_text_surf_from_utf8(utf8_str *pstr)
{
  if (pstr != NULL && pstr->text != NULL) {
    char *current = pstr->text;
    char c = *(pstr->text);

    /* find '\n' */
    while (c != '\0') {
      if (c == '\n') {
        return create_utf8_multi_surf(pstr);
      }
      current++;
      c = *current;
    }

    return create_utf8_surf(pstr);
  }
Create text surface that is narrower than given width
******/
SDL_Surface *create_text_surf_smaller_that_w(SDL_String16 *pString, int w)
{
  SDL_Surface *pText = create_text_surf_from_str16(pString);

  fc_assert_ret_val(pString != NULL, NULL);

  if 
    do {
      if (*ptr) {
        if (*ptr == *pSpace) {
          *ptr = *pNew_Line; /* "\n" */
          FREESURFACE(pText);
          pText = create_text_surf_from_str16(pString);
        }
        ptr++;
      } else {
        FREESURFACE(pText);
        if (pString->ptsize > 8) {
          change_ptsize16(pString, pString->ptsize - 1);
          pText = create_text_surf_from_str16(pString);
        } else {
          fc_assert_ret_val(pText != NULL, NULL);
        }
      }
    } while (pText->w > w - 4);

    if (pString->ptsize != ptsize) {
      change_ptsize16(pString, ptsize);
    }
  }

  return pText;
}
#endif /* 0Wrap text to make it fit to given screen width.
******/
bool convert_string_to_const_surface_width(SDL_String16 *pString,
                                           int width)
{  
  int w;
  bool converted = FALSE;

  fc_assert_ret_val(pString != NULL, FALSE);
  fc_assert_ret_val(pString->text != NULL, FALSE);

  w = str16size(pString).w;
  if (w > width
    {
      Uint16 pBuf[2];

    converted = TRUE;

    do {
      if (!resize) {

        if (*ptr == '\0') {
          resize = TRUE;
          continue;
        }

        if (*ptr == New_Line) {
          len = 0;
          ptr++;
          continue;
        }

        if (!((pString->style & 0x0F) & TTF_STYLE_NORMAL)) {
          TTF_SetFontStyle(pString->font, (pString->style & 0x0F));
        }
        TTF_GlyphMetrics(pString->font, *ptr, NULL, NULL, NULL, NULL, &adv);
        if (!((pString->style & 0x0F) & TTF_STYLE_NORMAL)) {
          TTF_SetFontStyle(pString->font, TTF_STYLE_NORMAL);
        }

        len += adv;

        if (len > width) {
          ptr_rev = ptr;
          while (ptr_rev != pString->text) {
            if (*ptr_rev == Space) {
              *ptr_rev = New_Line; /* "\n" */
              w = str16size(pString).w;
              len = 0;
              break;
            }
            if (*ptr_rev == New_Line) {
              resize = TRUE;
              break;
            }
            ptr_rev--;
          }
          if (ptr_rev == pString->text) {
            resize = TRUE;
          }
        }

        ptr++;
      } else {
        if (pString->ptsize > 8) {
          change_ptsize16(pString, pString->ptsize - 1);
          w = str16size(pString).w;
        } else {
          log_error("Can't convert string to const width");
          break;
        }
     }

    } while (w > width);
  }

  return converted;
}Wrap text to make it fit to given screen width.
******/
bool convert_utf8_str_to_const_surface_width(utf8_str *pstr, int width)
{
  int w;
  bool converted = FALSE;

  fc_assert_ret_val(pstr != NULL, FALSE);
  fc_assert_ret_val(pstr->text != NULL, FALSE);

  w = utf8_str_size(pstr).w;
  if (w > widthbool resize = FALSE;
    int len = 0;
    char *ptr_rev, *ptr = pstr->text;

    converted = TRUE;

    do {
      if (!resize) {
        char utf8char[9];
        int i;
        int fw, fh;

        if (*ptr == '\0') {
          resize = TRUE;
          continue;
        }

        if (*ptr == '\n') {
          len = 0;
          ptr++;
          continue;
        }

        utf8char[0] = ptr[0];
        for (i = 1; i < 8 && (ptr[i] & (128 + 64)) == 128; i++) {
          utf8char[i] = ptr[i];
        }
        utf8char[i] = '\0';
        if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
          TTF_SetFontStyle(pstr->font, (pstr->style & 0x0F));
        }
        TTF_SizeUTF8(pstr->font, utf8char, &fw, &fh);
        if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
          TTF_SetFontStyle(pstr->font, TTF_STYLE_NORMAL);
        }

        len += fw;

        if (len > width) {
          ptr_rev = ptr;
          while (ptr_rev != pstr->text) {
            if (*ptr_rev == ' ') {
              *ptr_rev = '\n';
              w = utf8_str_size(pstr).w;
              len = 0;
              break;
            }
            if (*ptr_rev == '\n') {
              resize = TRUE;
              break;
            }
            ptr_rev--;
          }
          if (ptr_rev == pstr->text) {
            resize = TRUE;
          }
        }

        ptr += i;
      } else {
        if (pstr->ptsize > 8) {
          change_ptsize_utf8(pstr, pstr->ptsize - 1);
          w = utf8_str_size(pstr).w;
        } else {
          log_error("Can't convert string to const width");
          break;
        }
      }

    } while (w > width);
  }

  return converted;
}Create surface with text drawn to it. Wrap text as needed to make it
  fit in given width.
******/
SDL_Surface *create_text_surf_smaller_that_w(SDL_String16 *pString, int w)
{
  int ptsize;
  SDL_Surface *pText;

  fc_assert_ret_val(pString != NULL, NULL);
 (pString->ptsize != ptsize) {
    change_ptsize16(pString, ptsizeCreate surface with text drawn to it. Wrap text as needed to make it
  fit in given width.
******/
SDL_Surface *create_text_surf_smaller_than_w(utf8_str *pstr, int w)
{
  int ptsize;
  SDL_Surface *text;

  fc_assert_ret_val(pstr != NULL, NULL);

  ptsize = pstr->ptsize;
  convert_utf8_str_to_const_surface_width(pstr, w);
  text = create_text_surf_from_utf8(pstr);
  if (pstr->ptsize != ptsize) {
    change_ptsize_utf8(pstr, ptsize);
  }

  return text;
}Change font size of text.
*****
  Change font size of text.
******/
void change_ptsize_utf8(utf8_str *pstr, Uint16 new_ptsize)
{
  TTF_Font *buf;

  if (pstr->ptsize == new_ptsize) {
    return;
  }

  if ((buf = load_font(new_ptsize)) == NULL) {
    log_error("change_ptsize: load_font() failed");
    return;
  }

  unload_font(pstr->ptsize);
  pstr->ptsize = new_ptsize;
  pstr->font = bLoad font of given pointsize.
******/
static TTF_Font *it */
  if (Sizeof_Font_TAB) {
    while (Font_TAB_TMP) {
      if (Font_TAB_TMP->ptsize == ptsize) {
        Font_TAB_TMP->count++;
        return Font_TAB_TMP->font;
      }
      Font_TAB_TMP = Font_TAB_TMP->next;
    }
  }

  if (!pFont_with_FullPath) {
    const char *path = theme_font_filename(theme);
 {
      Font_TAB_TMP = Font_TAB_TMP->next;
    }Free font of given pointsize.
******/
void unload_font(Uint16 ptsize)
{
  int index;****
  Free all fonts.
******/
  FC_FREE(pFont_with_FullPath);
  while  (Font_TAB_TMP->font) {
         (Font_TAB->font) {
        TTF_CloseFont(Font_TAB->font);
      }
      FC_FREE(Font_TAB);
    }
  }
}
ENDREP
DELTA 27322 30559 3366
SVN  ààe„& 7 ˆ ‚C€W „\„ ŽZ”z… £V… ƒJ¤f… H¨2… ƒ=©|… q­;… Ž:®.ƒ ‚s¼pŒ t¿s ÀhŠ ‚Áu€‚z Š/ÆkŽ SÑ1ƒ Óutf8_str_utf8 != NULL) {
    /* make copy of string16 */
    TMPString = *pIButton->string_utf8utf8_utf8_utf8_utf8_utf8_utf8_utf8strutf8_str *pss_utf8 = psstr) {
    pButton->string_utf8->style |= SF_CENTER;
    /* if BOLD == true then longest wight */
    if (!(pstr->style & TTF_STYLE_BOLD)) {
      pstr->style |= TTF_STYLE_BOLD;
      buf = utf8_str_size(pstr);
      pstr->style &= ~TTF_STYLE_BOLD;
    } else {
      buf = utf8_str_size(pstr);
    }

    w = MAX(w, buf.w);
    h = MAX(h, buf.h);
  }

  if (pIcon) {
    if (psutf8_str *pstrstrENDREP
DELTA 23579 3607 5532
SVN  ‚À`‚Ã0…'­{ …l š …| †@‡€R ƒ>Ž yštŒ `¤; “? yšt t›x  –: tštˆ u›wˆ tœz¯ ƒ1št ušt‚ u›wƒ nœz€~ '¢ ƒ £/Š y¦;° G ˆ N¨*€O 6ªN€@ oŒT t­€…A ³[€ µ€& e¾v€X Mºt£ e¾v ¼J€ ¾S€] Á8² N¼~€) e¾v ÅO€„! iÊ\€‡ OÒ6€‹) _Ýs€‰< [çr€‹P Zól€ƒD \÷w€‡R aÿn€„ T„9€„. ‰& ‚wŠ3 ‚/)ˆ c€…I –*€ˆ gŸ7€ ¡' a¢, ‚£¿ ƒ¥\ (¨p€f k« €„7 k°&€> ³f€F jµ9± ¶Q· P¸ €‚j ¼rˆ 3¾ˆ :¿@… UÀz ƒmÁQ€b Ç9£ W¾<® Ég¢ W¾<€B W¾<€H ƒ[ÍNŽ GÑ;€ Ó#ˆ Ô6£ FÊ  cÖ6ˆ s×° IÙ?Ž GÑ;€‚1 _Þ&€›& ƒ0úS€* Jÿ … zÿL€} I‚=€ %‚ƒ$€‚k 
‚‡6€f i‚˜; `‚™# Z‚™w€_ ‚œ#† ‚A€‚| r‚¡Q€t …‚¤2 ‚r‚©6 ‚‚¬/´ ‚®^€D ‚|‚°8 L‚³6› G  ‚‚µh€ ‡g‚¸y/* SDL */
#include <SDL.h>2pCityRep->pEndWidgetList);
    FC_FREE(pCityRep->pScroll);
    FC_FREE(pCityRep);
report closeworklistworklistworklist_editor(pWidget->data.city, NULL);
  }
macmastruct city *pCity = game_city_by_number(MAX_ID - pWidget->ID);

    /* state is changed before enter this function */
    if 
selected_w
  return -1;
}
#endif /* 0 */

#define COL	17

****
  R
  struct widget *pbuf = NULL;
  struct widget *pWindow, *pLast;
  utf8_str *psbuf[128];
  const char *pName;
  SDL_Rect dst;
  SDL_Rect area;
buf, sizeof(cbuf), _("size"));
  pstr = create_utf8_from_char(cbuf, adj_font(10));
  pstr->style |= SF_CENTER;
  pText1 = create_text_surf_from_utf8(pstr);

  fc_snprintf(cbuf, sizeof(cbuf), _("time\nto grow"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pText2 = create_text_surf_from_utf8(pstr);

  fc_snprintf(cbuf, sizeof(cbuf), _("City Name"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pText3 = create_text_surf_from_utf8(pstr);
  name_w = pText3->w + adj_size(6);

  fc_snprintf(cbuf, sizeof(cbuf), _("Production"));
  copy_chars_to_utf8_str(pstr, cbuf);
  pstr->fgcol = *get_theme_color(COLOR_THEME_CITYREP_TEXT);
  pText4 = create_text_surf_from_utf8(pstr);
  prod_w = pText4->w;
  FREEUTF8STR(pstr);
str = create_utf8_from_char(_("Cities Report"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window_skeleton(NULL, ps
  add_to_gui_list(ID_WINDOW, pWindow);

  area = pWindow->area;

  /* ------------------------- */
  /* exit button */
  pbuf = create_themeicon(pTheme->Small_CANCELbuf->info_label = create_utf8_from_char(_("Close Dialog"), adj_font(12));
  pbuf->action = exit_city_report_callback;
  set_wstate(pbuf, FC_WS_NORMAL);
  pbuf->key = SDLK_ESCAPE;

  add_to_gui_list(ID_BUTTON, pbuf);
buf = create_themeicon(pTheme->INFObbuf->action = info_city_report_callback;
  set_wstate(pbuf, FC_WS_NORMAL);
*/
  add_to_gui_list(ID_BUTTON, pbuf);
  /* -------- */
  pbbuf->info_label = create_str16_from_char(_("Happiness Report"), adj_font(12));
/*
  pbuf->action = happy_city_report_callback;
  set_wstate(pbuf, FC_WS_NORMAL);
*/
  add_to_gui_list(ID_BUTTON, pbuf);
  /* -------- */
  pbbuf->info_label = create_str16_from_char(_("Garrisbuf->action = army_city_dlg_callback;
  set_wstate(pbuf, FC_WS_NORMAL);
*/
  add_to_gui_list(ID_BUTTON, pbuf);
  /* -------- */
  pbuf = create_themeicon(pTheme->Supportbbuf->action = supported_unit_city_dlg_callback;
  set_wstate(pbuf, FC_WS_NORMAL);
*/
  add_to_gui_list(ID_BUTTON, pbuf);
  /* ------------------------ */
#endif /* 0 */

  pLast = pbuf;
  count = 0;
  city_list_iterate(client.conn.playing->cities, pCity) {
    pstr = create_utf8_from_char(city_name(pCity), adj_font(12));
    pstr->style |= TTF_STYLE_BOLD;
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            (WF_RESTORE_BACKGROUND | WF_SELECT_WITHOUT_BAR));

    if (city_unhappy(pCity)) {
      pbuf->string_utf8        pbuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_CELEB);
      } else {
        if (city_happy(pCity)) {
          pbuf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_HAPPY);
        }
      }
    }

    pbuf->action = popup_citydlg_from_city_report_callback;
    set_wstate(pbuf, FC_WS_NORMAL);
    pbuf->data.city = pCity;
    if (count > 13 * COL) {
      set_wflag(pbuf , WF_HIDDEN);
    }
    hh = pbuf->size.h;
    name_w = MAX(pbuf->size.w, name_w);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", city_size_get(pCity));
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    pbuf = create_checkbox(pWindow->dst,
                           cma_is_city_under_agent(pCity, NULL), WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    fc_assert(MAX_ID > pCity->id);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);
    set_wstate(pbuf, FC_WS_NORMAL);
    pbuf->action = popup_cma_from_city_report_callback;

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_FOOD] - pCity->surplus[O_FOOD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_game_color(COLOR_OVERVIEW_LAND);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbuf->size.w = pIcons->pBIG_Food->w + adj_size(6);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_FOOD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_FOOD_SURPLUS);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    togrow = city_turns_to_grow(pCity);
    switch (togrow) {
    case 0:
      fc_snprintf(cbuf, sizeof(cbuf), "#");
      break;
    case FC_INFINITY:
      fc_snprintf(cbuf, sizeof(cbuf), "--");
      break;
    default:
      fc_snprintf(cbuf, sizeof(cbuf), "%d", togrow);
      break;
    }

    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    if (togrow < 0) {
      pstr->fgcol.r = 255;
    }
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbuf->size.w = pText2->w + adj_size(6);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_TRADE]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_TRADE);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->waste[O_TRADE]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbuf->size.w = pIcons->pBIG_Trade_Corr->w + adj_size(6);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_GOLD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_GOLD);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbuf->size.w = pIcons->pBIG_Coin->w + adj_size(6);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_SCIENCE]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_SCIENCE);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_LUXURY]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_LUX);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d",
                pCity->prod[O_SHIELD] + pCity->waste[O_SHIELD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_PROD);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbuf->size.w = pIcons->pBIG_Shield->w + adj_size(6);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->waste[O_SHIELD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d",
                pCity->prod[O_SHIELD] + pCity->waste[O_SHIELD] - pCity->surplus[O_SHIELD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_SUPPORT);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbbuf);

    /* ----------- */
    fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_SHIELD]);
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_TRADE);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            WF_RESTORE_BACKGROUND);
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    pbuf->size.w = pIcons->pBIG_Shield_Surplus->w + adj_size(6);
    add_to_gui_list(MAX_ID - pCity->id, pb
    if , 255);
      fc_snprintf(cbuf, sizeof(cbuf), "%s\n(%d/%d)\n%s",
                  pName, pCity->shield_stock, togrow, _("worklist"));
    } else {
      fc_snprintf(cbuf, sizeof(cbuf), "%s\n(%d/%d)%s",
                  pName, pCity->shield_stock, togrow,
                  pCity->shield_stock > togrow ? _("\nfinished"): "" );
    }

    /* info string */
    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;

    togrow = city_production_turns_to_build(pCity, TRUE);
    if (togrow == 999) {
      fc_snprintf(cbuf, sizeof(cbuf), "%s", _("never"));
    } else {
      fc_snprintf(cbuf, sizeof(cbuf), "%d %s",
                  togrow, PL_("turn", "turns", togrow));
    }

    pbbuf->info_label = pstr;
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);
    set_wstate(pbuf, FC_WS_NORMAL);
    pbuf->action = popup_worklist_from_city_report_callback;
    pbuf->data.city = pCity;

    pstr = create_utf8_from_char(cbuf, adj_font(10));
    pstr->style |= SF_CENTER;
    pstr->fgcol = *get_theme_color(COLOR_THEME_CITYREP_TEXT);
    pbuf = create_iconlabel(NULL, pWindow->dst, pstr,
                            (WF_SELECT_WITHOUT_BAR | WF_RESTORE_BACKGROUND));
    if (count > 13 * COL) {
      set_wflag(pbuf, WF_HIDDEN);
    }
    hh = MAX(hh, pbuf->size.h);
    prod_w = MAX(prod_w, pbuf->size.w);
    add_to_gui_list(MAX_ID - pCity->id, pbuf);
    pbuf->data.city = pCity;
    pbuf->action = popup_buy_production_from_city_report_callback;
    if (city_can_buy(pCity)) {
      set_wstate(pbuf, FC_WS_NORMAL);    
    }

    count += COL;
  } city_list_iterate_end;

  H = hh;
  pCityRep->pBeginWidgetList = pb
    + (pIcons->pBIG_Food->w + adj_size(6)) * 10 + pText2->w + adj_size(6)
    + pUnits_Icon->w + adj_size(6) + prod_w + adj_size(170);

  if   
  area.h += pText2->h + adj_size(6);
  area.w += adj_size(2);

  /* exit button */
  pbuf = pWindow->prev;
  pbuf->size.x = area.x + area.w - pbuf->size.w - 1;
  pbbuf = pbuf->prev;
  pbuf->size.x = area.x + area.w - pbuf->size.w - adj_size(5);
  pbuf->size.y = area.y + area.h - pbuf->size.h - adj_size(5);

  /* happy button */
  pbuf = pbuf->prev;
  pbuf->size.x = pbuf->next->size.x - adj_size(5) - pbuf->size.w;
  pbuf->size.y = pbuf->next->size.y;

  /* army button */
  pbuf = pbuf->prev;
  pbuf->size.x = pbuf->next->size.x - adj_size(5) - pbuf->size.w;
  pbuf->size.y = pbuf->next->size.y;

  /* supported button */
  pbuf = pbuf->prev;
  pbuf->size.x = pbuf->next->size.x - adj_size(5) - pbuf->size.w;
  pbuf->size.y = pbfill_rect_alpha(pWindow->theme, &dst, &bg_color);

  create_frame(pWindow->theme,
               dst.x , dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_CITYREP_FRAME));
, 255);
  FREESURFACE(pText3);

  /* city size background and label */, 255);
  ww = pText1->w;
  FREESURFACE(pText1);
, 255);
  ww = pCMA_Icon->w;
  FREESURFACE(pCMA_Icon);

    + (pIcons->pBIG_Food_Surplus->w + adj_size(6)) + adj_size(10)
    + pText2->w + adj_size(6 + 2);
  dst.h = area.h - adj_size(2);
  fill_rect_alpha(pWindow->theme, &dst, get_theme_color(COLOR_THEME_CITYREP_FOODSTOCK));

  create_frame(pWindow->theme,
               dst.x, dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_CITYREP_FRAME));
, 255);
, 255);
, 255
  fill_rect_alpha(pWindow->theme, &dst, get_theme_color(COLOR_THEME_CITYREP_TRADE));

  create_frame(pWindow->theme,
               dst.x , dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_CITYREP_FRAME));
, 255);

  w += (pIcons->pBIG_TradeTrade_Corr, NULL, pWindow->theme, &dst, 255);
, 255);

  w += (pIcons->pBIG_CoinColb, NULL, pWindow->theme, &dst, 255);

  w += (pIcons->pBIG_ColbLuxury, NULL, pWindow->theme, &dst, 255);
  /* --------------------- */

  fill_rect_a
  create_frame(pWindow->theme,
               dst.x , dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_CITYREP_FRAME));
, 255);
, 255);

  w += (pIcons->pBIG_Shiel, 255);
, 255);
  /* ------------------------------- */

  fill_rect_a
  create_frame(pWindow->theme,
               dst.x , dst.y, dst.w, dst.h - 1,
               get_theme_color(COLOR_THEME_CITYREP_FRAME));

  dst.y = area.y + 1 + (hh - pText4->h) / 2;
  dst.x += (dst.w - pText4->w) / 2;
  alphablit(pText4, NULL, pWindow->theme, &dst, 255);
  FREESURFACE(pText4);

  if 
    H += adj_size(2);
    pbuf = pbuf->prev;
    while (TRUE) {

      /* city name */
      pbuf->size.x = start_x;
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;
      pbuf->size.w = name_w;

      /* city size */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(5);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* cma */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(6);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* food cons. */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(6);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* food surplus */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* time to grow */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* trade */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(5);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* trade corruptions */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* net gold income */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* science income */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* luxuries income */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* total production */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(6);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* waste */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* units support */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* producrion surplus */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* currently build */
      /* icon */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(10);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;

      /* label */
      pbuf = pbuf->prev;
      pbuf->size.x = pbuf->next->size.x + pbuf->next->size.w + adj_size(5);
      pbuf->size.y = start_y + (H - pbuf->size.h) / 2;
      pbuf->size.w = prod_w;

      start_y += H;
      if (pbuf == pCityRep->pBeginActiveWidgetList) {
        break;
      }
      pbuf = pbuf->prev;
    }

    if (pCityRep->pScroll) {
      setup_vertical_scrollbar_area(pCityRep->pScroll,
                                    area.x + area.w, area.y,
                                    area.h, TRUE);
    }
                                                          struct city *pCity)
{
  char cbuf[64];
  const char *pName;
  int togrow;
  SDL_Surface *pLogo;
  SDL_Rect dst;
_utf8_utf8->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_CELEB);
    } else {
      if (city_happy(pCity)) {
	pWidget->string_utf8
  /* city size */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", city_size_get(pCity));
  copy_chars_to_utf8_str(pWidget->string_utf8, cb
  /* food consumptions */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_FOOD] - pCity->surplus[O_FOOD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* food surplus */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_FOOD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);
buf, sizeof(cbuf), "#");
    break;
    case FC_INFINITY:
      fc_snprintf(cbuf, sizeof(cbuf), "--");
    break;
    default:
      fc_snprintf(cbuf, sizeof(cbuf), "%d", togrow);
    break;
  }
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  if (togrow < 0) {
    pWidget->string_utf8->fgcol.r = 255;
  } else {
    pWidget->string_utf8->fgcol.r = 0;
  }

  /* trade production */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_TRADE]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* corruptions */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->waste[O_TRADE]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* gold surplus */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_GOLD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* science income */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_SCIENCE]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* lugury income */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_LUXURY]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* total production */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d",
              pCity->prod[O_SHIELD] + pCity->waste[O_SHIELD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* waste */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->waste[O_SHIELD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* units support */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->prod[O_SHIELD] +
              pCity->waste[O_SHIELD] - pCity->surplus[O_SHIELD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* production income */
  pWidget = pWidget->prev;
  fc_snprintf(cbuf, sizeof(cbuf), "%d", pCity->surplus[O_SHIELD]);
  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);

  /* change production */
  if 
    pLogo = ResizeSurface(get_building_surface(pCity->production.value.building),
            
  if , 255);
    fc_snprintf(cbuf, sizeof(cbuf), "%s\n(%d/%d)\n%s",
                pName, pCity->shield_stock, togrow, _("worklist"));
  } else {
    fc_snprintf(cbuf, sizeof(cbuf), "%s\n(%d/%d)",
      		pName, pCity->shield_stock, togrow);
  }

  pWidget = pWidget->prev;
  copy_chars_to_utf8_str(pWidget->info_label, cbuf);
  FREESURFACE(pWidget->theme);
  pWidget->theme = pLogo;
 (togrow == 999) {
    fc_snprintf(cbuf, sizeof(cbuf), "%s", _("never"));
  } else {
    fc_snprintf(cbuf, sizeof(cbuf), "%d %s",
                togrow, PL_("turn", "turns", togrow));
  }

  copy_chars_to_utf8_str(pWidget->string_utf8, cbuf);
 

        while (count) {
          count--;
        
    /* check it there are some city widgets left on list */
    if 
    flush_dirty();
  }
}


    while (pCity->id != MAX_ID - pBuf->ID
           && pBuf != pCityRep->pBeginActiveWidgetList) {
      pBuf = pBuf->prev;
    }

    if ENDREP
DELTA 27471 824 11322
SVN  ‚š‚˜\y. ¶ Œ ‚q¶€6 ˜2º:¶ ž Ó€` Xò6 ƒ:ó(€b Xò6ª Vó3 iú3€j Jò6€z Vó3 „8€6€C ƒ…H€G m‰8‚ „Š,€K l‰8ƒ Š, ‚r‘€D i‰< œ•<€t ÿ5¦ U­ d£v ‡~µ=‘ ƒè7€D lë}‡ wìpˆ !îo —`Å)€t ƒ<Þ€n ‚ âC€P ƒå‘ ƒè7€D lë}‡ wìpˆ ‚rîoˆ !îo §ó
utf8_str *psstr = create_utf8_from_char(cBuf, adj_font(16));
  pstr->style = TTF_STYLE_BOLD;
  pstr->bgcol = (SDL_Color) {0, 0, 0, 0};
  pNewWidget = create_iconlabel(NULL, pLabelWindow->dst, ps_utf8->style |= SF_CENTER;
    pNewWidget->string_utf8if (pWidget->string_utf8->text != NULL) {
      sz_strlcpy(user_name, pWidget->string_utf8->textutf8_str(pWidget->string_utf8if (pWidget->string_utf8->text != NULL) {
      sz_strlcpy(server_host, pWidget->string_utf8->textutf8_str(pWidget->string_utf8, server_host
    if (pWidget->string_utf8->text != NULL) {
      sscanf(pWidget->string_utf8->text, "%d", &server_portfc_snprintf(pCharPort, sizeof(pCharPort), "%d", server_port);
      copy_chars_to_utf8_str(pWidget->string_utf8, pCharPortutf8_str *plrname = NULL;
  utf8_str *srvname = NULL;
  utf8_str *plrname = create_utf8_from_char(_("Player Name :"), adj_font(10));
  plrlrsrvname = create_utf8_from_char(_("Freeciv Server :"), adj_font(10));
  srvsrvort_nr = create_utf8_from_char(_("Port :"), adj_font(10));
  port_nrif (pWidget->string_utf8->text != NULL) {
      fc_snprintf(password, MAX_LEN_NAME, "%s", pWidget->string_utf8->text"Next" -button after entering passwordint send_passwdutf8_str *label_slabel_str = create_utf8_from_char(pMessage, adj_font(12));
  label_slabel_sutf8_strif (pWidget->string_utf8->text != NULL) {
      fc_snprintf(password, MAX_LEN_NAME, "%s", pWidget->string_utf8->textif (pWidget->string_utf8->text != NULL
        && !strncmp(password, pWidget->string_utf8->text, MAX_LEN_NAME)_utf8->text);/* first edit */
      FC_FREE(pWidget->string_utf8->text); /* secoutf8_str *label_slabel_str = create_utf8_from_char(pMessage, adj_font(12));
  label_slabel_sutf8_strutf8_strENDREP
DELTA 27417 136965 17696
SVN  †  †  „qœ= Í9 ³ …Íq„ ŒSÓ¥ ¦=ßzŒ ,†G¸ H…‚> ƒ%ˆu„ Oƒ§6 uŒo€ƒ ™$‘iŒ NÙ{ ‚«k€L H…‚> ‚6¯ €b ]²9œ ‚Tâz‡ 
åU ¢R·Œ ƒ^Ù{€C H…‚> ‚6Þf€b ]áœ ªlâzŒ ƒ0‚v¶ H…‚> ƒ9‚’&„ Oƒ§6 Ž.‚–4 ¥‚¤cŒ ‚w‚Ê¿ ‚‚ÍA€ †/‚Ða„ Oƒ§6 ÅY‚×eŒ …ƒN€D H…‚> ƒAƒ£p„ Oƒ§6 N„·@ -ƒ¨T€r …ƒ«q¢ ?ƒ³z· ‚Mƒ³% ‚Hƒµs „eƒ¸< ‚Pƒ½" ƒBƒ¿s …qƒÃ6 Ž?ƒÉ( ƒús ˆƒØ| )ƒá ƒâ8± ‡uƒä ƒ$ƒë} ‹Pƒï" ‹ƒús „j„† ¥L„ŠqŒ B„°M€F H…‚> ƒL„³„ Oƒ§6 „„·@ ¬w„»EŒ }„èL€P g„ë ƒ„ì‘ „ï Ž6„ð6Œ ‚y„ÿ€A H…‚> x…ƒ€  o…†  £!…†p€v ƒI…«€n k…Ü=ž Y…Ý@§ Dƒ€@ D…Ó€6 ˆ…´ ¨ R…¼Q¨ …¼Q ©Y…ËaŒ ‚&…õJ€G †g…ù9¾ d†€_€B ‹†‚€v ††<œ †d†•r¨ ‚†œ{€‚utf8_str *str;

  /* Window. */
  str = create_utf8utf8utf8_str(pdialog->window->string_utf8utf8_str *psstr = create_utf8_from_char(caption, adj_font(12));
  pssutf8str = create_utf8_from_char(headline, adj_font(16));
  pstr->style |= TTF_STYLE_BOLD;

  pHeadline = create_text_surf_from_utf8(pstr);

  if (lines && *lines != '\0') {
    change_ptsize_utf8(pstr, adj_font(12));
    pstr->style &= ~TTF_STYLE_BOLD;
    copy_chars_to_utf8_str(pstr, lines);
    pLines = create_text_surf_from_utf8(pstr);
  } else {
    pLines = NULL;
  }

  FREEUTF8STR(psutf8_str *psstr = create_utf8_from_char(_("Upgrade Obsolete Units"), adj_font(12));
  pssstr = create_utf8_from_char(cBuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
  psutf8(pstr);
  FREEUTF8STR(psupgradeutf8_str *psstr = create_utf8_from_char(_("Disband Units"), adj_font(12));
  pssstr = create_utf8_from_char(cBuf, adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
  psutf8(pstr);
  FREEUTF8STR(psutf8_str *psstr = create_utf8_from_char(cBuf , adj_font(12));
  pssutf8sutf8_str *psutf8_from_char(cBuf , adj_font(12)), 0);
  pWindow->string_utf8str = create_utf8_from_char(popup_info_text(ptile), adj_font(12));
  pstr->style |= SF_CENTER;
  pBuf = create_iconlabel(pSurf, pWindow->dst, psutf8utf8_str *psstr = create_utf8_from_char(_("Advanced Menu") , adj_font(12));
  pssutf8str = create_utf8_from_char(_("Terrain Info") , adj_font(10));
  pstr->style |= TTF_STYLE_BOLD;

  pBuf = create_iconlabel(NULL, pWindow->dst, pstr,
    (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE|WF_FREE_DATA));

  pBuf->string_utf8str, cBuf, zoom_to_city_callback); */

    create_active_iconlabel(pBuf, pWindow->dst, pssssssssssstr, cBuf, NULL);

	  if (reset) {
            pssssssutf8_str *psstr = create_utf8_from_char(_("What To Pillage") , adj_font(12));
  pssutf8sutf8_str *psstr = create_utf8_from_char(_("Choose Your New Government"), adj_font(12));
  pssstr = create_utf8sutf8_str *psstr = create_utf8_from_char(_("REVOLUTION!"), adj_font(12));
  pssstr = create_utf8_from_char(_("You say you wanna revolution?"), adj_font(10));
  pstr->style |= (TTF_STYLE_BOLD|SF_CENTER);
  pssstr = pSetup->pName_Edit->string_utf8->text;

    /* perform a minimum of sanity test on the name */
    if (strlen(psstr,
                                   pSetup->nation_style);

    popdown_races_dialog();  
    flush_dirty(requested leader gender changechange_sex_callback(struct widget *pSex
    if (pSetup->leader_sex) {
      copy_chars_to_utf8_str(pSetup->pChange_Sex->string_utf8, _("Female"));
    } else {
      copy_chars_to_utf8_str(pSetup->pChange_Sex->string_utf8utf8_str(pSetup->pName_Edit->string_utf8utf8_str(pSetup->pName_Edit->string_utf8utf8_str *psstr = create_utf8_from_char(nation_plural_translation(pNation),
                                   adj_font(12));
      pstr->style |= TTF_STYLE_BOLD;

      pWindow = create_window_skeleton(NULL, psstr = create_utf8_from_char(info, adj_font(12));
    }

    psn_w(pstr, main_window_width() - adj_size(20));

    FREEUTF8STR(psif (pEdit->string_utf8->text != NULL) {
      /* empty input -> restore previous content */
      copy_chars_to_utf8_str(pEdit->string_utf8, pLeaderName);
      widget_redraw(pEdit);
      widget_mark_dirty(pEdit);
      flush_dirty();
    }
  }
utf8_str(pLabel->string_utf8utf8_str(pSetup->pName_Edit->string_utf8utf8_str(pSetup->pChange_Sex->string_utf8, _("Male"));
  } else {
    copy_chars_to_utf8_str(pSetup->pChange_Sex->string_utf8, _("Female"));
  }

  /* disable navigation buttons */
  set_wstate(pSetup->pName_Prev, FC_WS_DISABLED);
  set_wstate(pSetup->pName_Next, FC_WS_DI†  ŸpžEVŠ
 ŠŒ „‹1€ „/X€q ‚[–y€ ošd€ IœU€ ‚W«/€ ‰s¯
€s 8¹m ‚»&€A ¡s½~€ ¾Qáutf8_str *psstr = create_utf8_from_char(_("What nation will you be?"), adj_font(12));
  pstr->style |= TTF_STYLE_BOLD;

  pWindow = create_window(NULL, ps  create_frame(pMain_Bg,
               0, 0, pMain_Bg->w - 1, pMain_Bg->h - 1,
               get_theme_color(COLOR_THEME_NATIONDLG_FRAME));

  pstr = create_utf8_str(NULL, 0, adj_font(12));
  pstr->style |= (SF_CENTER|TTF_STYLE_BOLD);
  psutf8_str(pstr, nation_plural_translation(pNation));
    change_ptsize_utf8(pstr, adj_font(12));
    pText_Name = create_text_surf_smaller_than_w(psutf8_str(pstr, pNation->legend);
      change_ptsize_utf8(pstr, adj_font(10));
      pText_Class = create_text_surf_smaller_than_w(psutf8_str *natset_str;
    struct option *poption;

    natset_str = create_utf8_from_char(_("Nationset"), adj_font(12));
    change_ptsize_utf8utf8_from_char(nation_set_name_translation(pSetup->set),
                                       adj_font(12));
    change_ptsize_utf8utf8_str(pstr, nation_plural_translation(pnat));
  change_ptsize_utf8(pstr, adj_font(24));
  pstr->render = 2;
  psschars(NULL, pWindow->dst,
                                   NULL
    create_frame(pWindow->theme,
                 area2.x, area2.y - 1, area2.w, area2.h + 1,
                 get_theme_color(COLOR_THEME_NATIONDLG_FRAME));ENDREP
DELTA 15619 312 3514
SVN  ±b³ty ˆ  ˆ @…@¬ a‰r€a pŒ% ‡h€i •R€ _—t -˜U  ª5¤ c› €ƒ U¯0€h g =€c r£€N Q¥0Ÿ C§2 ¨u¦ ª5€ƒ@ U¯0€b.±4
*******/

#ifdef HAVE_CONFIG_H
#include <fc_/* SDL */
#include <SDL_types.h>

#ifdef HAVE_LIBCHARSET
#include <libcharset.h>
#else
#ifdef HAVE_LANGINFO_CODESET
#include <langinfo.h>
#endif /* LANGINFO */
#endif /* LIBCHARSET */

#ifndef ICONV_CONST
#define ICONV_CONST 2pToUniString, size_t ulength,
                             const char *pFromString)
{
  /* Start Paramete  
  size_t length = strlen(pFromString) + 1;
  Uint16 *pResult = pToUniString;
  iconv_t cd = iconv_open(pTocode, pFromcode);
 length;
    char *pOutptr = (char *)        iconv(cd, (ICONV_CONST char **) &pInptr, &Insize, &pOutptr, &Outsize);

      if (Res == (size_t) (-1)) {
        if (errno == EINVAL) {
          break;
        } else {
          int saved_errno = errno;

          iconv_close(cd);
          errno = saved_errno;
          if (!pToUniString) {
            FC_FREE(pResult);
          }
          return pToUniString;
        
      if (Res == (size_t) (-1)) {
        int saved_errno = errno;

        iconv_close(cd);
        errno = saved_errno;
        if (!pToUniString) {
          FC_FREE(pResult);
        }
        return pToUniString;
      }
    }lt put in 'pToString'.
  if 'pToString' == NULL then resulting string will be allocated automatical                           const Uint16 *pFromUniString)
{
  /* Start Paramete  char *pResult;
  iconv_t cd;
 
  iconv(cd, NULL, NULL, NULL, NULL);         iconv(cd, (ICONV_CONST char **) &pInptr, &Insize, &pOutptr, &Outsize);

      if (Res == (size_t) (-1)) {
        log_error("iconv() error: %s", fc_strerror(fc_get_errno()));
        if (errno == EINVAL) {
          break;
        } else {
          int saved_errno = errno;

          iconv_close(cd);
          errno = saved_errno;
          if (!pToString) {
            FC_FREE(pResult);
          }
          return pToString;
        
      if (Res == (size_t) (-1)) {
        int saved_errno = errno;

        iconv_close(cd);
        errno = saved_errno;
        if (!pToString) {
          FC_FREE(pResult);
        }
        return pToString;
      }
    }ENDREP
DELTA 27385 3712 346
SVN  ‘y" ˆ; ½ +ˆp„ YŠ#µ Œ1Ž 5IŽ p \
			   create_utf8_from_char(pCharString, iPtsize),        utf8utf8_from_char(pCharString,  \
						      iPtsize), utf8_str *pstrutf8_str *pstrENDREP
id: 3gd.5l8.r27997/203147
type: file
pred: 3gd.5l8.r27385/13833
count: 4
text: 27997 95289 317 1214 b843dda3824cbafd9e91f4457693e042
props: 12670 108298 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_window.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 18i.5l8.r27997/203424
type: file
pred: 18i.5l8.r27584/22636
count: 160
text: 27997 43196 49983 111675 8be83c378569452675c68da876431567
props: 10779 68322 111 0 622f1432038f91cce287c1d90e4f7964
cpath: /trunk/client/gui-sdl2/repodlgs.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fm.5l8.r27997/203702
type: file
pred: 3fm.5l8.r27322/40934
count: 22
text: 27997 95634 5903 16608 b3fc6a0bae387803f5a24198953c07b8
props: 12670 108872 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_label.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fu.5l8.r27997/203981
type: file
pred: 3fu.5l8.r27428/22873
count: 37
text: 27997 101567 28 35790 bb00a9ebb659b2c6f34cf2d2c7d723c2
props: 12670 109164 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 18j.5l8.r27997/204253
type: file
pred: 18j.5l8.r27385/16276
count: 16
text: 27997 101624 439 1173 38dda2b8b10fb22a99a4a4bcdb59dde1
props: 10360 93595 110 0 fdfdab56f53d2388a66f6a5ce0985f95
cpath: /trunk/client/gui-sdl2/repodlgs.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 3gb.5l8.r27997/204527
type: file
pred: 3gb.5l8.r27385/16546
count: 3
text: 27997 119041 420 2027 f65b73e268f8232e54021f2460147ab4
props: 12670 110032 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_label.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fv.5l8.r27997/204804
type: file
pred: 3fv.5l8.r27385/11945
count: 18
text: 27997 119489 1913 14266 a5199b10be61805333ab67a6c146031c
props: 12670 110325 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 2qg.5l8.r27997/205078
type: file
pred: 2qg.5l8.r27278/9706
count: 54
text: 27997 132135 550 13190 fcddfb73ddd4089c450d9ce4c6def3e0
props: 8639 15961 110 0 2a94ed7a58fe1feebaea27ee0c48460d
cpath: /trunk/client/gui-sdl2/pages.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 18b.5l8.r27997/205348
type: file
pred: 18b.5l8.r27240/32284
count: 54
text: 27997 132713 3278 10405 6f0925c1d11cf2c05d179d17ac8fc510
props: 10304 68336 111 0 8e6f231ffe21dad0a34f68090b1c0b69
cpath: /trunk/client/gui-sdl2/messagewin.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 188.5l8.r27997/205626
type: file
pred: 188.5l8.r27645/5629
count: 112
text: 27997 136020 9581 48757 aa5531f12b256be5bccc849ab6a89f53
props: 10805 77668 111 0 18cdb9becb11c47631b7a093e907200c
cpath: /trunk/client/gui-sdl2/menu.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 174.5l8.r27997/205898
type: file
pred: 174.5l8.r27584/23729
count: 75
text: 27997 151060 3152 41671 8c54e442ce00efcadce2500b9ebc7a1b
props: 9108 25970 111 0 433ca8234d38d2ba821c9aa09a03d731
cpath: /trunk/client/gui-sdl2/cma_fe.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fh.5l8.r27997/206171
type: file
pred: 3fh.5l8.r27322/40079
count: 21
text: 27997 169296 663 12319 199d08527197480c99a1edb357012c7b
props: 12670 112927 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_button.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 172.5l8.r27997/206451
type: file
pred: 172.5l8.r27428/21502
count: 88
text: 27997 169989 22962 41392 86a8356d5d9e72c1209c0452acd043b3
props: 10779 68689 111 0 df9f31216c5039327c376b7fe82756f5
cpath: /trunk/client/gui-sdl2/cityrep.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 17a.5l8.r27997/206727
type: file
pred: 17a.5l8.r27428/21773
count: 234
text: 27997 194983 5673 122693 1ab5f3a6852691f88944f1dbdbdab8b1
props: 10805 78030 111 0 ae073b1a8624f4e72ab3bef202bf2f05
cpath: /trunk/client/gui-sdl2/dialogs.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3g7.5l8.r27997/207004
type: file
pred: 3g7.5l8.r27385/16002
count: 3
text: 27997 202927 192 2169 e28547335c555bf2e4a95cfbfb02c4a2
props: 12670 113509 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_button.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fj.5l8.r27997/207282
type: file
pred: 3fj.5l8.r27376/49163
count: 18
text: 27997 2503 211 8252 cdc70337793d1eb3da2de1552722a8b3
props: 12670 114675 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_core.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 17c.5l8.r27997/207557
type: file
pred: 17c.5l8.r27917/2245
count: 86
text: 27997 2804 3557 59847 54cf7a3584005f176589d2cf55ba8672
props: 10411 163500 111 0 433ca8234d38d2ba821c9aa09a03d731
cpath: /trunk/client/gui-sdl2/diplodlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 4k3.5l8.r27997/207831
type: file
pred: 4k3.5l8.r27322/42037
count: 9
text: 27997 36296 264 7653 bf5d919ed8024eb4f22a216c58e5861b
props: 26905 127876 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_combo.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 183.5l8.r27997/208107
type: file
pred: 183.5l8.r27240/32011
count: 76
text: 27997 36587 3901 15786 ff0e184ff874cd5c71d1f7bcbd184e56
props: 10411 163869 111 0 d4514082fc7e52be026d3360dec4dcb0
cpath: /trunk/client/gui-sdl2/inteldlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 184.5l8.r27997/208383
type: file
pred: 184.5l8.r27240/31469
count: 133
text: 27997 40517 830 80169 0d66c1fd75e3c2c0cbb054f0dc897156
props: 9803 6307 111 0 4135f0dfb17a4d11b2424d95e27830f5
cpath: /trunk/client/gui-sdl2/mapctrl.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 17e.5l8.r27997/208655
type: file
pred: 17e.5l8.r27201/84601
count: 51
text: 27997 41473 375 8859 caef4f8c1b7c2ec5fde3c7b078ffd08b
props: 10411 164236 111 0 8e6f231ffe21dad0a34f68090b1c0b69
cpath: /trunk/client/gui-sdl2/finddlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 4k4.5l8.r27997/208928
type: file
pred: 4k4.5l8.r26905/128245
count: 3
text: 27997 41376 69 1346 8fb9c7cc43eeb78ab63ffc1a8a9ee52d
props: 26905 128198 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_combo.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 17z.5l8.r27997/209204
type: file
pred: 17z.5l8.r27428/22600
count: 91
text: 27997 93211 2049 73079 8376901abbe459b57e3b6005a3dd8b9a
props: 10411 164601 111 0 3d57169d64a739976bce7d2e578e29eb
cpath: /trunk/client/gui-sdl2/helpdlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 18f.5l8.r27997/209479
type: file
pred: 18f.5l8.r27278/9167
count: 74
text: 27997 102092 9194 24456 5344fd925aaec9b61f07a99b01845bbf
props: 10411 164967 111 0 28e613ef70fc8e4efe7ed7b15f74e6e7
cpath: /trunk/client/gui-sdl2/plrdlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 16y.5l8.r27997/209753
type: file
pred: 16y.5l8.r27428/20959
count: 76
text: 27997 111315 7696 30115 505d9faddbe70f2921e2fbb395d08364
props: 9030 114052 111 0 2a5912525b098cb46a1301ee940f7617
cpath: /trunk/client/gui-sdl2/chatline.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fk.5l8.r27997/210029
type: file
pred: 3fk.5l8.r27608/2200
count: 20
text: 27997 121428 7857 23618 0952d9117448c8563884b8f9d0142168
props: 12670 114962 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_edit.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3bn.5ox.r27997/210307
type: file
pred: 3bn.5ox.r27865/13799
count: 114
text: 27997 129315 2467 58637 4cbb9a5809af723f5c46a297f8d9c76b
props: 12670 114091 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/action_dialog.c
copyroot: 26370 /trunk/client/gui-sdl2/action_dialog.c

id: 3g9.5l8.r27997/210605
type: file
pred: 3g9.5l8.r27385/14914
count: 4
text: 27997 131813 292 1481 e56c78c83cd086db7b372df11c88a054
props: 12670 115548 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_edit.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 18m.5l8.r27997/210881
type: file
pred: 18m.5l8.r27305/14741
count: 43
text: 27997 145630 669 7798 788515e4466290f6aa07757ba4098f78
props: 9803 7024 111 0 3d57169d64a739976bce7d2e578e29eb
cpath: /trunk/client/gui-sdl2/spaceshipdlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 18q.5l8.r27997/211157
type: file
pred: 18q.5l8.r27428/23143
count: 98
text: 27997 146328 4701 58479 d43810383d20c4beae85ff6dfc8a7cf9
props: 10779 69053 111 0 433ca8234d38d2ba821c9aa09a03d731
cpath: /trunk/client/gui-sdl2/wldlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 17r.5l8.r27997/211430
type: file
pred: 17r.5l8.r27889/496
count: 48
text: 27997 154241 15024 30467 1ebe65b00f98a4a2d666623bcc88fe32
props: 9030 115855 111 0 d4514082fc7e52be026d3360dec4dcb0
cpath: /trunk/client/gui-sdl2/gui_string.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 178.5l8.r27997/211707
type: file
pred: 178.5l8.r27471/12176
count: 81
text: 27997 192980 1974 35932 f720a1116735cf71b17615adc47fd90f
props: 10804 14832 111 0 45c0e160a790dc8f7645f8a7eabea654
cpath: /trunk/client/gui-sdl2/connectdlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 17l.5l8.r27997/211985
type: file
pred: 17l.5l8.r27201/82960
count: 24
text: 27997 200688 2211 6644 6cecd0e5f976fe41cad6e59c5008b95e
props: 9030 117307 111 0 3d57169d64a739976bce7d2e578e29eb
cpath: /trunk/client/gui-sdl2/gui_iconv.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fi.5l8.r27997/212261
type: file
pred: 3fi.5l8.r27322/41758
count: 16
text: 27997 0 2473 5865 9baf0d370c624712a40b243c1f08cb5e
props: 12670 116471 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_checkbox.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3g8.5l8.r27997/212538
type: file
pred: 3g8.5l8.r27385/17365
count: 3
text: 27997 2744 33 1301 6bd2d43d7f2db9787d1f2205090e0ff0
props: 12670 106573 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_checkbox.h
copyroot: 23136 /trunk/client/gui-sdl2

id: 18d.5l8.r27997/212815
type: file
pred: 18d.5l8.r27428/23953
count: 118
text: 27997 6388 1398 48927 67bbb327b4fc4f44ba30906916e72f5d
props: 9803 3079 111 0 9b377c828b4ca1827963af8e19878787
cpath: /trunk/client/gui-sdl2/optiondlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 170.5l8.r27997/213089
type: file
pred: 170.5l8.r27471/12451
count: 176
text: 27997 7816 27138 127056 7ca16846db7255416a56c47fc1a6dbdd
props: 10779 67589 111 0 515f6afa6448327e59cdac91d637f582
cpath: /trunk/client/gui-sdl2/citydlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 17f.5l8.r27997/213365
type: file
pred: 17f.5l8.r27201/83505
count: 62
text: 27997 34985 1282 12664 50eb39734ddbb9fab2bd344c3e4701dc
props: 10534 12701 111 0 3d57169d64a739976bce7d2e578e29eb
cpath: /trunk/client/gui-sdl2/gotodlg.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 186.5l8.r27997/213639
type: file
pred: 186.5l8.r27669/257
count: 227
text: 27997 41877 1060 42295 76b22fff49044331564d105fc6523432
props: 10779 67955 111 0 1566ee949d8102994e5ce1bbf3530de9
cpath: /trunk/client/gui-sdl2/mapview.c
copyroot: 23136 /trunk/client/gui-sdl2

id: 3fp.5l8.r27997/213912
type: file
pred: 3fp.5l8.r27584/22062
count: 26
text: 27997 42962 204 10352 bde8fc4b9dcba9dddf0dd6c14cc5473f
props: 12670 107437 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /trunk/client/gui-sdl2/widget_window.c
copyroot: 23136 /trunk/client/gui-sdl2

PLAIN
K 11
Makefile.am
V 25
file 16u.5l8.r27706/16154
K 15
action_dialog.c
V 26
file 3bn.5ox.r27997/210307
K 8
canvas.c
V 25
file 39i.5l8.r27161/27757
K 8
canvas.h
V 25
file 39j.5l8.r27123/79933
K 10
chatline.c
V 26
file 16y.5l8.r27997/209753
K 10
chatline.h
V 26
file 16z.5ck.r16199/137581
K 9
citydlg.c
V 26
file 170.5l8.r27997/213089
K 9
citydlg.h
V 25
file 171.5l8.r27385/17640
K 9
cityrep.c
V 26
file 172.5l8.r27997/206451
K 9
cityrep.h
V 26
file 173.5ck.r18101/104032
K 8
cma_fe.c
V 26
file 174.5l8.r27997/205898
K 8
cma_fe.h
V 25
file 175.5l8.r27385/13568
K 8
colors.c
V 25
file 176.5l8.r27201/84054
K 8
colors.h
V 25
file 177.5l8.r27123/87013
K 12
connectdlg.c
V 26
file 178.5l8.r27997/211707
K 12
connectdlg.h
V 25
file 179.5l8.r27385/19249
K 9
dialogs.c
V 26
file 17a.5l8.r27997/206727
K 9
dialogs.h
V 25
file 17b.5l8.r27385/11675
K 10
diplodlg.c
V 26
file 17c.5l8.r27997/207557
K 10
diplodlg.h
V 25
file 17d.5l8.r27385/19789
K 9
finddlg.c
V 26
file 17e.5l8.r27997/208655
K 9
finddlg.h
V 20
file 2d8.0.r5991/702
K 9
gotodlg.c
V 26
file 17f.5l8.r27997/213365
K 9
gotodlg.h
V 25
file 17g.5l8.r27385/17910
K 10
graphics.c
V 25
file 17h.5l8.r27656/57337
K 10
graphics.h
V 24
file 17i.5l8.r27401/4809
K 11
gui_iconv.c
V 26
file 17l.5l8.r27997/211985
K 11
gui_iconv.h
V 25
file 17m.5l8.r27123/90036
K 8
gui_id.h
V 25
file 17n.5l8.r27385/12759
K 10
gui_main.c
V 25
file 17o.5l8.r27584/23187
K 10
gui_main.h
V 25
file 17p.5l8.r27584/23459
K 11
gui_mouse.c
V 25
file 3ca.5l8.r27376/49710
K 11
gui_mouse.h
V 24
file 3cb.0.r12670/112397
K 12
gui_string.c
V 26
file 17r.5l8.r27997/211430
K 12
gui_string.h
V 24
file 17s.5l8.r27775/2065
K 14
gui_tilespec.c
V 23
file 191.5l8.r27453/576
K 14
gui_tilespec.h
V 25
file 192.5l8.r27385/15457
K 9
helpdlg.c
V 26
file 17z.5l8.r27997/209204
K 9
helpdlg.h
V 25
file 180.5l8.r27385/14106
K 10
inteldlg.c
V 26
file 183.5l8.r27997/208107
K 10
inteldlg.h
V 25
file 2d9.5l8.r27385/10613
K 12
luaconsole.c
V 26
file 768.5l8.r26905/126647
K 12
luaconsole.h
V 26
file 769.5l8.r26905/126964
K 9
mapctrl.c
V 26
file 184.5l8.r27997/208383
K 9
mapctrl.h
V 25
file 185.5l8.r27385/13028
K 9
mapview.c
V 26
file 186.5l8.r27997/213639
K 9
mapview.h
V 25
file 187.5l8.r27385/18439
K 6
menu.c
V 26
file 188.5l8.r27997/205626
K 6
menu.h
V 25
file 189.5l8.r27385/18174
K 12
messagedlg.c
V 26
file 18a.5ck.r19259/474489
K 12
messagedlg.h
V 25
file 2da.5l8.r27385/18982
K 12
messagewin.c
V 26
file 18b.5l8.r27997/205348
K 12
messagewin.h
V 25
file 18c.5ck.r18082/39362
K 5
mmx.h
V 23
file 2e1.0.r6286/134429
K 11
optiondlg.c
V 26
file 18d.5l8.r27997/212815
K 11
optiondlg.h
V 25
file 18e.5l8.r27385/12489
K 7
pages.c
V 26
file 2qg.5l8.r27997/205078
K 7
pages.h
V 22
file 2qh.0.r8639/16416
K 8
plrdlg.c
V 26
file 18f.5l8.r27997/209479
K 8
plrdlg.h
V 22
file 18g.0.r6387/81301
K 10
ratesdlg.h
V 25
file 2db.5l8.r27385/10877
K 10
repodlgs.c
V 26
file 18i.5l8.r27997/203424
K 10
repodlgs.h
V 26
file 18j.5l8.r27997/204253
K 14
spaceshipdlg.c
V 26
file 18m.5l8.r27997/210881
K 14
spaceshipdlg.h
V 25
file 18n.5l8.r27385/13298
K 8
sprite.c
V 24
file 39k.5l8.r27401/5079
K 8
sprite.h
V 25
file 39l.5l8.r27385/11141
K 18
themebackgrounds.c
V 25
file 3ff.5l8.r27305/15833
K 18
themebackgrounds.h
V 25
file 3fg.5l8.r27385/16819
K 13
themecolors.c
V 25
file 392.5l8.r27305/15015
K 13
themecolors.h
V 25
file 393.5l8.r27385/12215
K 8
themes.c
V 25
file 38p.5l8.r27305/16112
K 11
themespec.c
V 25
file 390.5l8.r27396/12813
K 11
themespec.h
V 25
file 391.5l8.r27385/15732
K 11
unistring.c
V 25
file 18o.5l8.r27322/39261
K 11
unistring.h
V 25
file 18p.5l8.r27385/14369
K 12
utf8string.c
V 24
file 1l7w.5l8.r27930/199
K 12
utf8string.h
V 26
file 1l7y.5l8.r27706/17312
K 14
voteinfo_bar.c
V 26
file 4ha.5l8.r26905/127282
K 14
voteinfo_bar.h
V 26
file 4hb.5l8.r26905/127601
K 8
widget.c
V 26
file 3fu.5l8.r27997/203981
K 8
widget.h
V 26
file 3fv.5l8.r27997/204804
K 15
widget_button.c
V 26
file 3fh.5l8.r27997/206171
K 15
widget_button.h
V 26
file 3g7.5l8.r27997/207004
K 17
widget_checkbox.c
V 26
file 3fi.5l8.r27997/212261
K 17
widget_checkbox.h
V 26
file 3g8.5l8.r27997/212538
K 14
widget_combo.c
V 26
file 4k3.5l8.r27997/207831
K 14
widget_combo.h
V 26
file 4k4.5l8.r27997/208928
K 13
widget_core.c
V 26
file 3fj.5l8.r27997/207282
K 13
widget_edit.c
V 26
file 3fk.5l8.r27997/210029
K 13
widget_edit.h
V 26
file 3g9.5l8.r27997/210605
K 13
widget_icon.c
V 25
file 3fl.5l8.r27428/21228
K 13
widget_icon.h
V 25
file 3ga.5l8.r27385/19517
K 14
widget_label.c
V 26
file 3fm.5l8.r27997/203702
K 14
widget_label.h
V 26
file 3gb.5l8.r27997/204527
K 10
widget_p.h
V 25
file 3fn.5l8.r27385/15187
K 18
widget_scrollbar.c
V 25
file 3fo.5lj.r27584/22339
K 18
widget_scrollbar.h
V 25
file 3gc.5l8.r27385/14638
K 15
widget_window.c
V 26
file 3fp.5l8.r27997/213912
K 15
widget_window.h
V 26
file 3gd.5l8.r27997/203147
K 7
wldlg.c
V 26
file 18q.5l8.r27997/211157
K 7
wldlg.h
V 25
file 18r.5l8.r27385/11408
END
ENDREP
id: 16t.5l8.r27997/219091
type: dir
pred: 16t.5l8.r27930/5317
count: 941
text: 27997 214191 4887 4887 b09421a905b2688c60832c5bd60ebb3c
props: 11108 12869 78 0 a27c61ac5fddbd709df8c1876129f940
cpath: /trunk/client/gui-sdl2
copyroot: 23136 /trunk/client/gui-sdl2

PLAIN
K 11
Makefile.am
V 24
file 5f.5ck.r27705/90803
K 6
agents
V 21
dir zf.5ck.r27763/695
K 11
attribute.c
V 24
file xh.5ck.r25151/59391
K 11
attribute.h
V 24
file xi.5ck.r18863/23649
K 7
audio.c
V 25
file 139.5ck.r27127/10791
K 7
audio.h
V 25
file 13a.5ck.r27127/11031
K 12
audio_none.c
V 25
file 13d.5ck.r24916/15731
K 12
audio_none.h
V 25
file 13e.5ck.r18863/20841
K 11
audio_sdl.c
V 25
file 13f.5ck.r27123/78063
K 11
audio_sdl.h
V 25
file 13g.5ck.r18863/23885
K 17
chatline_common.c
V 25
file 14q.5ck.r24895/20143
K 17
chatline_common.h
V 24
file 14r.5ck.r24892/5917
K 16
citydlg_common.c
V 24
file z4.5ck.r27397/15042
K 16
citydlg_common.h
V 24
file z5.5ck.r27397/15293
K 13
cityrepdata.c
V 25
file mb.5ck.r24790/282697
K 13
cityrepdata.h
V 24
file mc.5ck.r18863/19121
K 13
client_main.c
V 23
file 2f.5cp.r27642/9635
K 13
client_main.h
V 23
file hz.5cq.r26714/9499
K 8
climap.c
V 24
file 197.5ck.r20232/3008
K 8
climap.h
V 25
file 198.5ck.r18863/24126
K 9
climisc.c
V 24
file d5.5ck.r27616/94233
K 9
climisc.h
V 23
file i0.5ck.r26654/5011
K 8
clinet.c
V 24
file hc.5ck.r26633/57244
K 8
clinet.h
V 24
file i1.5ck.r18863/24866
K 15
colors_common.c
V 24
file 33a.5ck.r22855/3020
K 15
colors_common.h
V 24
file 33b.5ck.r24136/6711
K 19
connectdlg_common.c
V 25
file 2fw.5ck.r27275/53841
K 19
connectdlg_common.h
V 25
file 2fx.5ck.r19154/53802
K 9
control.c
V 23
file gz.5ck.r27873/6672
K 9
control.h
V 24
file i2.5ck.r27181/67376
K 7
dummy.c
V 26
file 4f9.5ck.r26905/141682
K 12
dummycxx.cpp
V 26
file 6kr.5ck.r26905/106211
K 8
editor.c
V 24
file 3bg.5ck.r26198/2350
K 8
editor.h
V 24
file 3bh.5ck.r26198/2592
K 17
global_worklist.c
V 26
file 4i6.5ck.r26905/117850
K 17
global_worklist.h
V 26
file 4i7.5ck.r26905/126022
K 6
goto.c
V 23
file vu.5ck.r27873/6912
K 6
goto.h
V 24
file vv.5ck.r27871/19506
K 11
gui-gtk-2.0
V 22
dir zs.5ck.r27987/9351
K 11
gui-gtk-3.0
V 22
dir zs.5g7.r27987/4752
K 6
gui-qt
V 24
dir 6ie.5ck.r27946/21996
K 7
gui-sdl
V 24
dir 16t.5ck.r27917/12685
K 8
gui-sdl2
V 25
dir 16t.5l8.r27997/219091
K 8
gui-stub
V 22
dir mh.5ck.r27870/9461
K 7
gui-xaw
V 23
dir 9o.5ck.r27870/13281
K 14
gui_cbsetter.c
V 26
file a3c.5ck.r27417/165161
K 14
gui_cbsetter.h
V 25
file a3d.5ck.r26905/69091
K 15
gui_interface.c
V 26
file 6jm.5ir.r27417/187983
K 15
gui_interface.h
V 26
file 6jn.5is.r27417/193557
K 10
helpdata.c
V 24
file h1.5ck.r27973/16772
K 10
helpdata.h
V 24
file i3.5ck.r25494/33011
K 7
include
V 24
dir b8.5ck.r27417/187740
K 19
luaconsole_common.c
V 26
file 75z.5ck.r26905/100821
K 19
luaconsole_common.h
V 26
file 760.5ck.r26905/106500
K 9
luascript
V 24
dir 761.5ck.r27705/90564
K 16
mapctrl_common.c
V 23
file 15m.5ck.r27634/293
K 16
mapctrl_common.h
V 24
file 15n.5ck.r27397/5459
K 16
mapview_common.c
V 24
file z2.5ck.r27611/89062
K 16
mapview_common.h
V 23
file z3.5ck.r27397/9503
K 19
messagewin_common.c
V 26
file 14s.5ck.r24790/282945
K 19
messagewin_common.h
V 25
file 14t.5ck.r18863/21579
K 7
music.c
V 25
file zmc.5ck.r27127/11271
K 7
music.h
V 25
file zme.5ck.r27127/11513
K 9
options.c
V 24
file dc.5ck.r27663/12198
K 9
options.h
V 24
file i4.5ck.r27394/10269
K 17
overview_common.c
V 26
file 2yk.5ck.r24790/283201
K 17
overview_common.h
V 26
file 2yl.5ck.r24790/283707
K 10
packhand.c
V 24
file n.5ck.r27620/181791
K 10
packhand.h
V 24
file i5.5ck.r18863/20596
K 15
plrdlg_common.c
V 23
file 14u.5ck.r23426/823
K 15
plrdlg_common.h
V 25
file 14v.5ck.r18863/21328
K 17
repodlgs_common.c
V 25
file 11i.5ck.r22325/76263
K 17
repodlgs_common.h
V 25
file 11j.5ck.r19589/11861
K 9
reqtree.c
V 25
file 2ym.5ck.r25398/35740
K 9
reqtree.h
V 24
file 2yn.5ck.r24150/6004
K 9
servers.c
V 25
file 33x.5ck.r25113/10928
K 9
servers.h
V 25
file 33y.5ck.r20478/36372
K 6
text.c
V 23
file 2g3.5ck.r27383/103
K 6
text.h
V 25
file 2g4.5ck.r24459/13284
K 15
themes_common.c
V 22
file 352.5ck.r26465/95
K 15
themes_common.h
V 25
file 353.5ck.r18863/22710
K 10
tilespec.c
V 24
file hl.5ck.r27871/19747
K 10
tilespec.h
V 24
file i6.5ck.r27090/13425
K 19
unitselect_common.c
V 26
file 76v.5ck.r26905/117249
K 19
unitselect_common.h
V 26
file 76w.5ck.r26905/117548
K 14
update_queue.c
V 26
file 4jw.5ck.r26905/141084
K 14
update_queue.h
V 26
file 4jx.5ck.r26905/141966
K 10
voteinfo.c
V 26
file 4fe.5ck.r26905/141386
K 10
voteinfo.h
V 26
file 4ff.5ck.r26905/142263
END
ENDREP
id: d.5ck.r27997/223640
type: dir
pred: d.5ck.r27987/13881
count: 6556
text: 27997 219353 4274 4274 d5214f29374216ee97be6bd06c066fec
props: 23990 857 387 0 afe872b7fe8919650a535e373916e1f7
cpath: /trunk/client
copyroot: 15280 /trunk

PLAIN
K 9
ABOUT-NLS
V 24
file fu.5ck.r27270/69307
K 7
AUTHORS
V 24
file 5u.5ck.r22143/14016
K 7
COPYING
V 19
file 1h.0.r9643/400
K 9
ChangeLog
V 26
file 6l.5ck.r27473/7455495
K 7
INSTALL
V 22
file 6.5ck.r27777/1982
K 11
Makefile.am
V 23
file 59.5ck.r27480/1506
K 4
NEWS
V 24
file 6m.5ck.r25634/30702
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 21
dir 8.5ck.r27934/1446
K 10
autogen.sh
V 23
file 12o.5ck.r27624/562
K 9
bootstrap
V 23
dir 2p5.5ck.r27114/4172
K 6
client
V 23
dir d.5ck.r27997/223640
K 6
common
V 22
dir p.5ck.r27973/16543
K 12
configure.ac
V 25
file 149.5ck.r27705/58094
K 4
data
V 22
dir w.5ck.r27970/10497
K 12
dependencies
V 22
dir 2yu.5ck.r27817/318
K 3
doc
V 22
dir k7.5ck.r27991/2295
K 10
fc_version
V 25
file 2lo.5en.r27865/50626
K 11
gen_headers
V 24
dir 1hsw.5ck.r27799/7131
K 2
m4
V 23
dir 12p.5ck.r27799/9591
K 7
scripts
V 23
dir 2yo.5ck.r27213/1366
K 6
server
V 21
dir z.5ck.r27995/8303
K 5
tests
V 23
dir 2g9.5ck.r27783/1363
K 5
tools
V 23
dir 4pj.5js.r27995/3288
K 12
translations
V 23
dir t0a.5ck.r27966/3003
K 7
utility
V 22
dir 1c.5ck.r27903/3210
K 5
win32
V 24
dir 2eu.5ck.r27475/16089
END
ENDREP
id: 3.5ck.r27997/225005
type: dir
pred: 3.5ck.r27995/9663
count: 19118
text: 27997 223874 1118 1118 9900c4e7bd7a0edeb0fccb12c55e6d3a
props: 23244 4830 282 0 e4bb46e81629a60eef613b169b23a9ea
cpath: /trunk
copyroot: 15280 /trunk

PLAIN
K 8
branches
V 20
dir 1.0.r27996/10162
K 4
tags
V 19
dir 2.0.r27200/6414
K 5
trunk
V 23
dir 3.5ck.r27997/225005
K 7
website
V 21
dir 3ge.0.r22980/2263
END
ENDREP
id: 0.0.r27997/225401
type: dir
pred: 0.0.r27996/10483
count: 27997
text: 27997 225233 155 155 94ad0c968156d2524c4b6694f5246da5
cpath: /
copyroot: 0 /

3fm.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_label.c

3fu.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget.c

18f.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/plrdlg.c

18j.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/repodlgs.h

3gb.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_label.h

16y.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/chatline.c

3fk.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_edit.c

3fv.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget.h

3bn.5ox.t27996-1 modify true false /trunk/client/gui-sdl2/action_dialog.c

3g9.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_edit.h

2qg.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/pages.c

18b.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/messagewin.c

188.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/menu.c

18m.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/spaceshipdlg.c

18q.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/wldlg.c

174.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/cma_fe.c

17r.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/gui_string.c

3fh.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_button.c

172.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/cityrep.c

178.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/connectdlg.c

17a.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/dialogs.c

17l.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/gui_iconv.c

3g7.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_button.h

3fi.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_checkbox.c

3fj.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_core.c

3g8.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_checkbox.h

17c.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/diplodlg.c

18d.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/optiondlg.c

170.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/citydlg.c

17f.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/gotodlg.c

4k3.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_combo.c

183.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/inteldlg.c

184.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/mapctrl.c

4k4.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_combo.h

17e.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/finddlg.c

186.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/mapview.c

3fp.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_window.c

3gd.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/widget_window.h

18i.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/repodlgs.c

17z.5l8.t27996-1 modify true false /trunk/client/gui-sdl2/helpdlg.c


225401 225553
