DELTA 19300 0 4521
SVN  ×GËH>ĸ~ I  O> {m¨ P ĸ B a P ¤ B K P T B K P Ĩ B l P ĸ B @ P ­ B j P  B  Dļ~6 P  B W P  B ¯= P  B u P  B U P ¤ B P Fb P  B U P  B : k P   B  P Ą B  P Ą B  P Ŗ B  P ĸ B   P ą B ] P Ą B T P   B u P Ą B E P § B  P Ą B ^fc_types.h"#include "unittype.h"

/* client */
#include "client_main.h"
#include "control.h"
#include "goto.h"
#include "tilespec.h"
#include "unitselect_common/* Activate this to get more columns (see below) */
#undef DEBUG_USDLG

enum usdlg_column_types {
  COL_PIXBUF,
  COL_TEXT,
  COL_INT
};

enum usdlg_row_types {
  ROW_UNITTYPE,
  ROW_ACTIVITY,
  ROW_UNIT,
  ROW_UNIT_TRANSPORTED
};

/* Basic data (Unit, description, count) */
#define USDLG_COLUMNS_DEFAULT       3
/* Additional data; shown if DEBUG_USDLG */
#define USDLG_COL_UTID          USDLG_COLUMNS_DEFAULT + 0 /* Unit type ID */
#define USDLG_COL_UID           USDLG_COLUMNS_DEFAULT + 1 /* Unit ID */
#define USDLG_COL_LOCATION      USDLG_COLUMNS_DEFAULT + 2 /* Unit location */
#define USDLG_COL_ACTIVITY      USDLG_COLUMNS_DEFAULT + 3 /* Unit activity */
#define USDLG_COL_ROW_TYPE      USDLG_COLUMNS_DEFAULT + 4 /* Row type */
#define USDLG_COLUMNS_DEBUG     USDLG_COLUMNS_DEFAULT + 5
/* Layout options; never shown */
#define USDLG_COL_STYLE         USDLG_COLUMNS_DEBUG + 0
#define USDLG_COL_WEIGHT        USDLG_COLUMNS_DEBUG + 1
#define USDLG_COLUMNS_ALL       USDLG_COLUMNS_DEBUG + 2

#ifdef DEBUG_USDLG
  #define USDLG_COLUMNS_SHOW    USDLG_COLUMNS_DEBUG
#else
  #define USDLG_COLUMNS_SHOW    USDLG_COLUMNS_DEFAULT
#endif /* DEBUG */

enum usdlg_column_types usdlg_col_types[USDLG_COLUMNS_ALL] = {
  COL_PIXBUF, /* Unit */
  COL_TEXT,   /* Description */
  COL_INT,    /* Count */
  COL_INT,    /* Debug: unit type */
  COL_INT,    /* Debug: unit ID */
  COL_INT,    /* Debug: location */
  COL_INT,    /* Debug: activity */
  COL_INT,    /* Debug: row type */
  COL_INT,    /* Layout: style */
  COL_INT     /* Layout: width */
};

static const char *usdlg_col_titles[USDLG_COLUMNS_ALL] = {
  N_("Unit"),
  N_("Description"),
  N_("Count"),
  "[Unittype]", /* Only for debug, no translation! */
  "[Unit ID]",
  "[Location]",
  "[Activity]",
  "[Row type]",
  "[Style]",
  "[Width]"
};

enum usdlg_cmd {
  USDLG_CMD_SELECT,
  USDLG_CMD_DESELECT,
  USDLG_CMD_READY,
  USDLG_CMD_SENTRY,
  USDLG_CMD_CENTER,
  USDLG_CMD_FOCUS,
  USDLG_CMD_LAST
};

struct unit_select_dialog {
  struct tile *ptile;
  int unit_id_focus;

  GtkWidget *shell;
  GtkWidget *notebook;

  struct {
    GtkTreeStore *store;
    GtkWidget *view;
    GtkTreePath *path;
  } units;

  struct {
    GtkTreeStore *store;
    GtkWidget *page;
    GtkWidget *view;
    GtkTreePath *path;

    GtkWidget *cmd[USDLG_CMD_LAST];
  } tabs[SELLOC_COUNT];
};

/* The unit selection dialog; should only be used in usdlg_get(). */
static struct unit_select_dialog *unit_select_dlg = NULL;

static struct unit_select_dialog *usdlg_get(bool create);
static struct unit_select_dialog *usdlg_create(void);
static void usdlg_destroy(void);
static void usdlg_destroy_callback(GtkObject *object, gpointer data);
static void usdlg_tile(struct unit_select_dialog *pdialog,
                       struct tile *ptile);
static void usdlg_refresh(struct unit_select_dialog *pdialog);

static void usdlg_tab_select(struct unit_select_dialog *pdialog,
                             const char *title,
                             enum unit_select_location_mode loc);
static GtkTreeStore *usdlg_tab_store_new(void);
static bool usdlg_tab_update(struct unit_select_dialog *pdialog, 
                             struct usdata_hash *ushash,
                             enum unit_select_location_mode loc);
static void usdlg_tab_append_utype(GtkTreeStore *store,
                                   enum unit_select_location_mode loc,
                                   struct unit_type *putype,
                                   GtkTreeIter *it);
static void usdlg_tab_append_activity(GtkTreeStore *store,
                                      enum unit_select_location_mode loc,
                                      const struct unit_type *putype,
                                      enum unit_activity act,
                                      int count, GtkTreeIter *it,
                                      GtkTreeIter *parent);
static void usdlg_tab_append_units(struct unit_select_dialog *pdialog,
                                   enum unit_select_location_mode loc,
                                   enum unit_activity act,
                                   const struct unit *punit,
                                   bool transported, GtkTreeIter *it,
                                   GtkTreeIter *parent);

static void usdlg_cmd_ready(GtkObject *object, gpointer data);
static void usdlg_cmd_sentry(GtkObject *object, gpointer data);
static void usdlg_cmd_select(GtkObject *object, gpointer data);
static void usdlg_cmd_deselect(GtkObject *object, gpointer data);
static void usdlg_cmd_exec(GtkObject *object, gpointer data,
                           enum usdlg_cmd cmd);
static void usdlg_cmd_exec_unit(struct unit *punit, enum usdlg_cmd cmd);
static void usdlg_cmd_center(GtkObject *object, gpointer data);
static void usdlg_cmd_focus(GtkObject *object, gpointer data);
static void usdlg_cmd_focus_real(GtkTreeView *view);
static void usdlg_cmd_row_activated(GtkTreeView *view, GtkTreePath *path,
                                    GtkTreeViewColumn *col, gpointer data);
static void usdlg_cmd_cursor_changed(GtkTreeView *view, gpointer data);


 Popup the unit selection dialog.
***********/
void unit_select_dialog_popup_main(struct tile *ptile, bool create)
{
  struct unit_select_dialog *pdialog;

  /* Create the dialog if it is requested. */
  pdialog = usdlg_get(create);

  /* Present the unit selection dialog if it exists. */
  if (pdialog) {
    /* Show all. */
    gtk_widget_show_all(GTK_WIDGET(pdialog->shell));
    /* Update tile. */
    usdlg_tile(pdialog, ptile);
    /* Refresh data and hide unused tabs. */
    usdlg_refresh(pdialog);
  }
}

 Popdown the unit selection dialog.
***********/
void unit_select_dialog_popdown(void)
{
  usdlg_destroy();
}

 Get the current unit selection dialog. Create it if needed and 'create' is
  TRUE.
***********/
static struct unit_select_dialog *usdlg_get(bool create)
{
  if (unit_select_dlg) {
    /* Return existing dialog. */
    return unit_select_dlg;
  } else if (create) {
    /* Create new dialog. */
    unit_select_dlg = usdlg_create();
    return unit_select_dlg;
  } else {
    /* Nothing. */
    return NULL;
  }
}

 Create a new unit selection dialog.
***********/
static struct unit_select_dialog *usdlg_create(void)
{
  GtkWidget *hbox, *vbox;
  GtkWidget *close_cmd;
  struct unit_select_dialog *pdialog;

  /* Create a container for the dialog. */
  pdialog = fc_calloc(1, sizeof(*pdialog));

  /* No tile defined. */
  pdialog->ptile = NULL;

  /* Create the dialog. */
  pdialog->shell = gtk_dialog_new_with_buttons(_("Unit selection"), NULL, 0,
                                               NULL);
  setup_dialog(pdialog->shell, toplevel);
  g_signal_connect(pdialog->shell, "destroy",
                   G_CALLBACK(usdlg_destroy_callback), pdialog);
  gtk_window_set_position(GTK_WINDOW(pdialog->shell), GTK_WIN_POS_MOUSE);
  gtk_widget_realize(pdialog->shell);

  vbox = GTK_DIALOG(pdialog->shell)->vbox;
  hbox = gtk_hbox_new(TRUE, 0);
  gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);

  /* Notebook. */
  pdialog->notebook = gtk_notebook_new();
  gtk_notebook_set_tab_pos(GTK_NOTEBOOK(pdialog->notebook),
                           GTK_POS_BOTTOM);
  gtk_box_pack_start(GTK_BOX(vbox), pdialog->notebook, TRUE, TRUE, 0);

  /* Append pages. */
  usdlg_tab_select(pdialog, _("_Units"), SELLOC_UNITS);
  usdlg_tab_select(pdialog, _("_Tile"), SELLOC_TILE);
  usdlg_tab_select(pdialog, _("C_ontinent"), SELLOC_CONT);
  usdlg_tab_select(pdialog, _("_Land"), SELLOC_LAND);
  usdlg_tab_select(pdialog, _("_Sea"), SELLOC_SEA);
  usdlg_tab_select(pdialog, _("_Both"), SELLOC_BOTH);
  usdlg_tab_select(pdialog, _("_World"), SELLOC_WORLD);

  /* Buttons. */
  close_cmd = gtk_dialog_add_button(GTK_DIALOG(pdialog->shell),
                                    GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
  gtk_dialog_set_default_response(GTK_DIALOG(pdialog->shell),
                                  GTK_RESPONSE_CLOSE);
  g_signal_connect(close_cmd, "clicked",
                   G_CALLBACK(usdlg_destroy_callback), pdialog);

  return pdialog;
}

 Destroy a unit selection dialog.
***********/
static void usdlg_destroy(void)
{
  if (unit_select_dlg) {
    gtk_widget_destroy(GTK_WIDGET(unit_select_dlg->shell));
    free(unit_select_dlg);
  }
  unit_select_dlg = NULL;
}

 Callback for the destruction of the dialog.
***********/
static void usdlg_destroy_callback(GtkObject *object, gpointer data)
{
  usdlg_destroy();
}

 Set the reference tile.
***********/
static void usdlg_tile(struct unit_select_dialog *pdialog,
                       struct tile *ptile)
{
  if (!pdialog) {
    return;
  }

  /* Check for a valid tile. */
  if (ptile != NULL) {
    pdialog->ptile = ptile;
  } else if (pdialog->
    if (punit) {
      pdialog->ptile = unit_tile(punit);
      center_tile_mapcanvas(pdialog->ptile);
    } else {
      pdialog->ptile = get_center_tile_mapcanvas();
    }
  }
}

 Refresh the dialog.
***********/
static void usdlg_refresh(struct unit_select_dialog *pdialog)
{
  struct usdata_hash *ushash = NULL;
  enum unit_select_location_mode loc;

  if (!pdialog) {
    return;
  }

  /* Sort units into the hash. */
  ushash = usdlg_data_new(pdialog->ptile);
  /* Update all tabs. */
  for (loc = unit_select_location_mode_begin();
       loc != unit_select_location_mode_end();
       loc = unit_select_location_mode_next(loc)) {
    bool show = usdlg_tab_update(pdialog, ushash, loc);

    if (!show) {
      gtk_widget_hide(pdialog->tabs[loc].page);
    } else {
      gtk_widget_show(pdialog->tabs[loc].page);

      if (pdialog->tabs[loc].path) {
        gtk_tree_view_expand_row(GTK_TREE_VIEW(pdialog->tabs[loc].view),
                                 pdialog->tabs[loc].path,FALSE);
        gtk_tree_view_set_cursor(GTK_TREE_VIEW(pdialog->tabs[loc].view),
                                 pdialog->tabs[loc].path, NULL, FALSE);
        gtk_tree_path_free(pdialog->tabs[loc].path);
        pdialog->tabs[loc].path = NULL;
      }
    }
  }
  /* Destroy the hash. */
  usdlg_data_destroy(ushash);
}

 +--------------------------------+
  | +-----------------+----------+ |
  | | (unit list)     | select   | |
  | |                 | deselect | |
  | |                 |          | |
  | |                 | center   | |
  | |                 | focus    | |
  | +-----------------+----------+ |
  | | tabs | ... |                 |
  |                          close |
  +--------------------------------+
***********/
static void usdlg_tab_select(struct unit_select_dialog *pdialog,
                             const char *title,
                             enum unit_select_location_mode loc)
{
  GtkWidget *page, *label, *hbox, *vbox, *bbox, *view, *sw;
  GtkTreeStore *store;
  static bool titles_done;
  int i;

  page = gtk_vbox_new(FALSE, 0);
  gtk_container_set_border_width(GTK_CONTAINER(page), 8);
  pdialog->tabs[loc].page = page;

  label = gtk_label_new_with_mnemonic(title);
  gtk_notebook_append_page(GTK_NOTEBOOK(pdialog->notebook), page, label);

  hbox = gtk_hbox_new(FALSE, 0);
  gtk_box_pack_start(GTK_BOX(page), hbox, TRUE, TRUE, 0);

  store = usdlg_tab_store_new();
  pdialog->tabs[loc].store = store;

  view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
  pdialog->tabs[loc].view = view;
  g_object_unref(store);

  g_signal_connect(view, "row-activated", G_CALLBACK(usdlg_cmd_row_activated),
                   (gpointer *)loc);
  g_signal_connect(view, "cursor-changed",
                   G_CALLBACK(usdlg_cmd_cursor_changed), (gpointer *)loc);

  /* Translate titles. */
  intl_slist(ARRAY_SIZE(usdlg_col_titles), usdlg_col_titles, &titles_done);

  for (i = 0; i < USDLG_COLUMNS_SHOW; i++) {
    GtkTreeViewColumn *column = NULL;
    GtkCellRenderer *renderer = NULL;

    switch (usdlg_col_types[i]) {
    case COL_PIXBUF:
      renderer = gtk_cell_renderer_pixbuf_new();
      column = gtk_tree_view_column_new_with_attributes(
                 usdlg_col_titles[i], renderer, "pixbuf", i, NULL);
      gtk_tree_view_column_set_expand(column, FALSE);
      break;
    case COL_TEXT:
      renderer = gtk_cell_renderer_text_new();
      column = gtk_tree_view_column_new_with_attributes(
                 usdlg_col_titles[i], renderer, "text", i,
                 "style", USDLG_COL_STYLE, "weight", USDLG_COL_WEIGHT, NULL);
      gtk_tree_view_column_set_expand(column, TRUE);
      break;
    case COL_INT:
      renderer = gtk_cell_renderer_text_new();
      column = gtk_tree_view_column_new_with_attributes(
                 usdlg_col_titles[i], renderer, "text", i,
                 "style", USDLG_COL_STYLE, "weight", USDLG_COL_WEIGHT, NULL);
      g_object_set(renderer, "xalign", 1.0, NULL);
      gtk_tree_view_column_set_alignment(column, 1.0);
      gtk_tree_view_column_set_expand(column, FALSE);
      break;
    }

    fc_assert_ret(column != NULL);
    gtk_tree_view_append_column(GTK_TREE_VIEW(view), column);
  }

  sw = gtk_scrolled_window_new(NULL, NULL);
  gtk_widget_set_size_request(sw, -1, 300);
  gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
                                      GTK_SHADOW_ETCHED_IN);
  gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
                                 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
  gtk_container_add(GTK_CONTAINER(sw), view);
  gtk_box_pack_start(GTK_BOX(hbox), sw, TRUE, TRUE, 0);

  vbox = gtk_vbox_new(FALSE, 10);
  gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0);

  /* button box 1: ready, sentry */
  bbox = gtk_vbox_new(FALSE, 0);
  gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);

  pdialog->tabs[loc].cmd[USDLG_CMD_READY]
    = gtk_button_new_with_mnemonic(_("Ready"));
  gtk_box_pack_start(GTK_BOX(bbox), pdialog->tabs[loc].cmd[USDLG_CMD_READY],
                     FALSE, TRUE, 0);
  g_signal_connect(pdialog->tabs[loc].cmd[USDLG_CMD_READY], "clicked",
                   G_CALLBACK(usdlg_cmd_ready), (gpointer *)loc);
  gtk_widget_set_sensitive(
    GTK_WIDGET(pdialog->tabs[loc].cmd[USDLG_CMD_READY]), FALSE);

  pdialog->tabs[loc].cmd[USDLG_CMD_SENTRY]
    = gtk_button_new_with_mnemonic(_("Sentry"));
  gtk_box_pack_start(GTK_BOX(bbox), pdialog->tabs[loc].cmd[USDLG_CMD_SENTRY],
                     FALSE, TRUE, 0);
  g_signal_connect(pdialog->tabs[loc].cmd[USDLG_CMD_SENTRY], "clicked",
                   G_CALLBACK(usdlg_cmd_sentry), (gpointer *)loc);
  gtk_widget_set_sensitive(
    GTK_WIDGET(pdialog->tabs[loc].cmd[USDLG_CMD_SENTRY]), FALSE);

  /* button box 2: select, deselect */
  bbox = gtk_vbox_new(FALSE, 0);
  gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);

  pdialog->tabs[loc].cmd[USDLG_CMD_SELECT]
    = gtk_button_new_with_mnemonic(_("_Select"));
  gtk_box_pack_start(GTK_BOX(bbox), pdialog->tabs[loc].cmd[USDLG_CMD_SELECT],
                     FALSE, TRUE, 0);
  g_signal_connect(pdialog->tabs[loc].cmd[USDLG_CMD_SELECT], "clicked",
                   G_CALLBACK(usdlg_cmd_select), (gpointer *)loc);
  gtk_widget_set_sensitive(
    GTK_WIDGET(pdialog->tabs[loc].cmd[USDLG_CMD_SELECT]), FALSE);

  pdialog->tabs[loc].cmd[USDLG_CMD_DESELECT]
    = gtk_button_new_with_mnemonic(_("_Deselect"));
  gtk_box_pack_start(GTK_BOX(bbox),
                     pdialog->tabs[loc].cmd[USDLG_CMD_DESELECT], FALSE, TRUE,
                     0);
  g_signal_connect(pdialog->tabs[loc].cmd[USDLG_CMD_DESELECT], "clicked",
                   G_CALLBACK(usdlg_cmd_deselect), (gpointer *)loc);
  gtk_widget_set_sensitive(
    GTK_WIDGET(pdialog->tabs[loc].cmd[USDLG_CMD_DESELECT]), FALSE);

  /* button box 3: center, focus */
  bbox = gtk_vbox_new(FALSE, 0);
  gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);

  pdialog->tabs[loc].cmd[USDLG_CMD_CENTER]
    = gtk_button_new_with_mnemonic(_("C_enter"));
  gtk_box_pack_start(GTK_BOX(bbox), pdialog->tabs[loc].cmd[USDLG_CMD_CENTER],
                     FALSE, TRUE, 0);
  g_signal_connect(pdialog->tabs[loc].cmd[USDLG_CMD_CENTER], "clicked",
                   G_CALLBACK(usdlg_cmd_center), (gpointer *)loc);
  gtk_widget_set_sensitive(
    GTK_WIDGET(pdialog->tabs[loc].cmd[USDLG_CMD_CENTER]), FALSE);

  pdialog->tabs[loc].cmd[USDLG_CMD_FOCUS]
    = gtk_button_new_with_mnemonic(_("_Focus"));
  gtk_box_pack_start(GTK_BOX(bbox), pdialog->tabs[loc].cmd[USDLG_CMD_FOCUS],
                     FALSE, TRUE, 0);
  g_signal_connect(pdialog->tabs[loc].cmd[USDLG_CMD_FOCUS], "clicked",
                   G_CALLBACK(usdlg_cmd_focus), (gpointer *)loc);
  gtk_widget_set_sensitive(
    GTK_WIDGET(pdialog->tabs[loc].cmd[USDLG_CMD_FOCUS]), FALSE);
}

 Create a player dialog store.
***********/
static GtkTreeStore *usdlg_tab_store_new(void)
{
  GtkTreeStore *store;
  GType model_types[USDLG_COLUMNS_ALL];
  int i;

  for (i = 0; i < USDLG_COLUMNS_ALL; i++) {
    switch (usdlg_col_types[i]) {
    case COL_PIXBUF:
      model_types[i] = GDK_TYPE_PIXBUF;
      break;
    case COL_TEXT:
      model_types[i] = G_TYPE_STRING;
      break;
    case COL_INT:
      model_types[i] = G_TYPE_INT;
      break;
    }
  }

  store = gtk_tree_store_newv(i, model_types);

  return store;
}

 Update on tab of the dialog.
***********/
static bool usdlg_tab_update(struct unit_select_dialog *pdialog,
                             struct usdata_hash *ushash,
                             enum unit_select_location_mode loc)
{
  bool show = FALSE;
  GtkTreeStore *store;

  fc_assert_ret_val(ushash, FALSE);
  fc_assert_ret_val(pdialog != NULL, FALSE);

  store = pdialog->tabs[loc].store;

  /* clear current store. */
  gtk_tree_store_clear(GTK_TREE_STORE(store));

  /* Iterate over all unit types. */
  if (loc == SELLOC_UNITS) {
    /* Special case - show all units on this tile in their transports. */
    unit_type_iterate(utype) {
      struct usdata *data;

      usdata_hash_lookup(ushash, utype_index(utype), &data);

      if (!data) {
        continue;
      }

      activity_type_iterate(act) {
        if (unit_list_size(data->units[loc][act]) == 0) {
          continue;
        }

        unit_list_iterate(data->units[loc][act], punit) {
          GtkTreeIter it_unit;

          usdlg_tab_append_units(pdialog, loc, act, punit, FALSE,
                                 &it_unit, NULL);
        } unit_list_iterate_end;

        /* Show this tab. */
        show = TRUE;
      } activity_type_iterate_end;
    } unit_type_iterate_end;
  } else {
    unit_type_iterate(utype) {
      struct usdata *data;
      bool first = TRUE;
      GtkTreeIter it_utype;
      GtkTreePath *path;
      int count = 0;

      usdata_hash_lookup(ushash, utype_index(utype), &data);

      if (!data) {
        continue;
      }

      activity_type_iterate(act) {
        GtkTreeIter it_act;

        if (unit_list_size(data->units[loc][act]) == 0) {
          continue;
        }

        /* Level 1: Display unit type. */
        if (first) {
          usdlg_tab_append_utype(GTK_TREE_STORE(store), loc, data->utype,
                                 &it_utype);
          first = FALSE;
        }

        /* Level 2: Display unit activities. */
        usdlg_tab_append_activity(GTK_TREE_STORE(store), loc, data->utype,
                                  act, unit_list_size(data->units[loc][act]),
                                  &it_act, &it_utype);

        /* Level 3: Display all units with this activitiy
         *          (and transported units in further level(s)). */
        unit_list_iterate(data->units[loc][act], punit) {
          GtkTreeIter it_unit;

          usdlg_tab_append_units(pdialog, loc, act, punit, FALSE,
                                 &it_unit, &it_act);
        } unit_list_iterate_end;

        count += unit_list_size(data->units[loc][act]);

        /* Update sum of units with this type. */
        gtk_tree_store_set(GTK_TREE_STORE(store), &it_utype, 2, count, -1);

        /* Expand to the activities. */
        path
          = gtk_tree_model_get_path(GTK_TREE_MODEL(pdialog->tabs[loc].store),
                                    &it_utype);
        gtk_tree_view_expand_row(GTK_TREE_VIEW(pdialog->tabs[loc].view), path,
                                 FALSE);
        gtk_tree_path_free(path);

        /* Show this tab. */
        show = TRUE;
      } activity_type_iterate_end;
    } unit_type_iterate_end;
  }

  return show;
}

 Append the data for one unit type.
***********/
static void usdlg_tab_append_utype(GtkTreeStore *store,
                                   enum unit_select_location_mode loc,
                                   struct unit_type *putype,
                                   GtkTreeIter *it)
{
  GdkPixbuf *pix;
  char buf[128];

  fc_assert_ret(store != NULL);
  fc_assert_ret(putype != NULL);

  /* Add this item. */
  gtk_tree_store_append(GTK_TREE_STORE(store), it, NULL);

  /* Create a icon */
  pix = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8,
                       tileset_full_tile_width(tileset),
                      type(putype, &canvas_store, 0, 0);
  }

  /* The name of the unit. */
  fc_snprintf(buf, sizeof(buf), "%s", utype_name_translation(putype));

  /* Add it to the tree. */
  gtk_tree_store_set(GTK_TREE_STORE(store), it,
                     0, pix,                            /* Unit pixmap */
                     1, buf,                            /* Text */
                     2, -1, /* will be set later */     /* Number of units */
                     3, utype_index(putype),            /* Unit type ID */
                     /* 4: not set */                   /* Unit ID */
                     5, loc,                            /* Unit location */
                     /* 6: not set */                   /* Unit activity */
                     7, ROW_UNITTYPE,                   /* Row type */
                     8, PANGO_STYLE_NORMAL,             /* Style */
                     9, PANGO_WEIGHT_BOLD,              /* Weight */
                     -1);
  g_object_unref(pix);
}

 Append the unit activity.
***********/
static void usdlg_tab_append_activity(GtkTreeStore *store,
                                      enum unit_select_location_mode loc,
                                      const struct unit_type *putype,
                                      enum unit_activity act,
                                      int count, GtkTreeIter *it,
                                      GtkTreeIter *parent)
{
  char buf[128] = "";

  fc_assert_ret(store != NULL);
  fc_assert_ret(putype != NULL);

  /* Add this item. */
  gtk_tree_store_append(GTK_TREE_STORE(store), it, parent);

  /* The activity. */
  fc_snprintf(buf, sizeof(buf), "%s", get_activity_text(act));

  /* Add it to the tree. */
  gtk_tree_store_set(GTK_TREE_STORE(store), it,
                     /* 0: not set */                   /* Unit pixmap */
                     1, buf,                            /* Text */
                     2, count,                          /* Number of units */
                     3, utype_index(putype),            /* Unit type ID */
                     /* 4: not set */                   /* Unit ID */
                     5, loc,                            /* Unit location */
                     6, act,                            /* Unit activity */
                     7, ROW_ACTIVITY,                   /* Row type */
                     8, PANGO_STYLE_NORMAL,             /* Style */
                     9, PANGO_WEIGHT_NORMAL,            /* Weight */
                     -1);
}

 Append units (recursively).
***********/
static void usdlg_tab_append_units(struct unit_select_dialog *pdialog,
                                   enum unit_select_location_mode loc,
                                   enum unit_activity act,
                                   const struct unit *punit,
                                   bool transported, GtkTreeIter *it,
                                   GtkTreeIter *parent)
{
  char buf[248] = "", buf2[248] = "";
  GdkPixbuf *pix;
  struct city *phome;
  enum usdlg_row_types row = ROW_UNIT;
  int style = PANGO_STYLE_NORMAL;
  int weight = PANGO_WEIGHT_NORMAL;
  GtkTreeStore *store;

  fc_assert_ret(pdialog != NULL);
  fc_assert_ret(punit != NULL);

  store = pdialog->tabs[loc].store;


  /* Add this item. */
  gtk_tree_store_append(GTK_TREE_STORE(store), it, parent);

  /* Unit pixmap */
  pix = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8,
                       tileset_full_tile_width(tileset),
                      phome = game_city_by_number(punit->homecity);
  if (phome) {
    fc_snprintf(buf2, sizeof(buf2), "%s", city_name(phome));
  } else if (unit_owner(punit) == client_player()
             || client_is_global_observer()) {
    /* TRANS: used in place of unit home city name */
    sz_strlcpy(buf2, _("no home city"));
  } else {
    /* TRANS: used in place of unit home city name */
    sz_strlcpy(buf2, _("unknown"));
  }
#ifdef DEBUG
  /* Strings only used in debug builds, don't bother with i18n */
  fc_snprintf(buf, sizeof(buf), "%s [Unit ID %d]\n(%s)\nCoordinates: (%d,%d)",
              unit_name_translation(punit), punit->id, buf2,
              TILE_XY(unit_tile(punit)));
  {
    struct unit *ptrans = unit_transport_get(punit);

    if (ptrans) {
      cat_snprintf(buf, sizeof(buf), "\nTransported by unit ID %d",
                   ptrans->id);
    }
  }
#else /* DEBUG */
  /* TRANS: unit type and home city, e.g. "Transport\n(New Orleans)" */
  fc_snprintf(buf, sizeof(buf), _("%s\n(%s)"), unit_name_translation(punit),
              buf2);
#endif /* DEBUG */

  if (transported) {
    weight = PANGO_WEIGHT_NORMAL;
    style = PANGO_STYLE_ITALIC;
    row = ROW_UNIT_TRANSPORTED;
  }

  /* Add it to the tree. */
  gtk_tree_store_set(GTK_TREE_STORE(store), it,
                     0, pix,                            /* Unit pixmap */
                     1, buf,                            /* Text */
                     2, 1,                              /* Number of units */
                     3, utype_index(unit_type(punit)),  /* Unit type ID */
                     4, punit->id,                      /* Unit ID */
                     5, loc,                            /* Unit location */
                     6, act,                            /* Unit activity */
                     7, row,                            /* Row type */
                     8, style,                          /* Style */
                     9, weight,                         /* Weight */
                     -1);
  g_object_unref(pix);

  if (get_transporter_occupancy(punit) > 0) {
    unit_list_iterate(unit_transport_cargo(punit), pcargo) {
      GtkTreeIter it_cargo;

      usdlg_tab_append_units(pdialog, loc, act, pcargo, TRUE, &it_cargo, it);
    } unit_list_iterate_end;
  }

  if (!transported && unit_is_in_focus(punit)) {
    pdialog->tabs[loc].path
      = gtk_tree_model_get_path(GTK_TREE_MODEL(store), it);
  }
}

 Callback for the ready button.
***********/
static void usdlg_cmd_ready(GtkObject *object, gpointer data)
{
  usdlg_cmd_exec(object, data, USDLG_CMD_READY);
}

 Callback for the sentry button.
***********/
static void usdlg_cmd_sentry(GtkObject *object, gpointer data)
{
  usdlg_cmd_exec(object, data, USDLG_CMD_SENTRY);
}

 Callback for the select button.
***********/
static void usdlg_cmd_select(GtkObject *object, gpointer data)
{
  usdlg_cmd_exec(object, data, USDLG_CMD_SELECT);
}

 Callback for the deselect button.
***********/
static void usdlg_cmd_deselect(GtkObject *object, gpointer data)
{
  usdlg_cmd_exec(object, data, USDLG_CMD_DESELECT);
}

 Main function for the callbacks.
***********/
static void usdlg_cmd_exec(GtkObject *object, gpointer data,
                           enum usdlg_cmd cmd)
{
  enum unit_select_location_mode loc = (enum unit_select_location_mode) data;
  GtkTreeView *view;
  GtkTreeSelection *selection;
  GtkTreeModel *model;
  GtkTreeIter it;
  gint row;
  struct unit_select_dialog *pdialog = usdlg_get(FALSE);

  fc_assert_ret(pdialog != NULL);
  fc_assert_ret(unit_select_location_mode_is_valid(loc));

  if (!can_client_change_view() || !can_client_control()) {
    return;
  }

  view = GTK_TREE_VIEW(pdialog->tabs[loc].view);
  selection = gtk_tree_view_get_selection(view);

  if (!gtk_tree_selection_get_selected(selection, &model, &it)) {
    log_debug("No selection");
    return;
  }
  gtk_tree_model_get(model, &it, USDLG_COL_ROW_TYPE, &row, -1);

  switch (row) {
  case ROW_UNITTYPE:
    {
      gint loc, utid;
      struct usdata_hash *ushash;
      struct usdata *data;

      gtk_tree_model_get(model, &it, USDLG_COL_LOCATION, &loc,
                         USDLG_COL_UTID, &utid, -1);

      /* We can't be sure that all units still exists - recalc the data. */
      ushash = usdlg_data_new(pdialog->ptile);

      usdata_hash_lookup(ushash, utid, &data);
      if (data != NULL) {
        activity_type_iterate(act) {
          if (unit_list_size(data->units[loc][act]) == 0) {
            continue;
          }

          unit_list_iterate(data->units[loc][act], punit) {
            usdlg_cmd_exec_unit(punit, cmd);
          } unit_list_iterate_end;
        } activity_type_iterate_end;
      }

      /* Destroy the hash. */
      usdlg_data_destroy(ushash);
    }
    break;
  case ROW_ACTIVITY:
    {
      gint loc, act, utid;
      struct usdata_hash *ushash;
      struct usdata *data;

      gtk_tree_model_get(model, &it, USDLG_COL_ACTIVITY, &act,
                         USDLG_COL_LOCATION, &loc, USDLG_COL_UTID, &utid, -1);

      /* We can't be sure that all units still exists - recalc the data. */
      ushash = usdlg_data_new(pdialog->ptile);

      usdata_hash_lookup(ushash, utid, &data);
      if (data != NULL 
          && unit_list_size(data->units[loc][act]) != 0) {
        unit_list_iterate(data->units[loc][act], punit) {
          usdlg_cmd_exec_unit(punit, cmd);
        } unit_list_iterate_end;
      }

      /* Destroy the hash. */
      usdlg_data_destroy(ushash);
    }
    break;
  case ROW_UNIT:
  case ROW_UNIT_TRANSPORTED:
    {
      gint uid;
      struct unit *punit;

      gtk_tree_model_get(model, &it, USDLG_COL_UID, &uid, -1);

      punit = game_unit_by_number(uid);

      if (!punit) {
        log_debug("Unit vanished (Unit ID %d)!", uid);
        return;
      }

      usdlg_cmd_exec_unit(punit, cmd);
    }
    break;
  }

  /* Update focus. */
  unit_focus_update();
  /* Refresh dialog. */
  usdlg_refresh(pdialog);
}

 Update one unit (select/deselect/ready/sentry).
***********/
static void usdlg_cmd_exec_unit(struct unit *punit, enum usdlg_cmd cmd)
{
  fc_assert_ret(punit);

  switch (cmd) {
  case USDLG_CMD_SELECT:
    if (!unit_is_in_focus(punit)) {
      unit_focus_add(punit);
    }
  break;
  case USDLG_CMD_DESELECT:
    if (unit_is_in_focus(punit)) {
      unit_focus_remove(punit);
    }
    break;
  case USDLG_CMD_READY:
    if (punit->activity != ACTIVITY_IDLE) {
      request_new_unit_activity(punit, ACTIVITY_IDLE);
    }
    break;
  case USDLG_CMD_SENTRY:
    if (punit->activity != ACTIVITY_SENTRY) {
      request_new_unit_activity(punit, ACTIVITY_SENTRY);
    }
    break;
  case USDLG_CMD_CENTER:
  case USDLG_CMD_FOCUS:
    /* Nothing here. It is done in its own functions. */
    break;
  case USDLG_CMD_LAST:
    /* Should never happen. */
    fc_assert_ret(cmd != USDLG_CMD_LAST);
    break;
  }
}

 Callback for the center button.
***********/
static void usdlg_cmd_center(GtkObject *object, gpointer data)
{
  enum unit_select_location_mode loc = (enum unit_select_location_mode) data;
  GtkTreeView *view;
  GtkTreeSelection *selection;
  GtkTreeModel *model;
  GtkTreeIter it;
  gint row;
  struct unit_select_dialog *pdialog = usdlg_get(FALSE);

  fc_assert_ret(pdialog != NULL);
  fc_assert_ret(unit_select_location_mode_is_valid(loc));

  view = GTK_TREE_VIEW(pdialog->tabs[loc].view);
  selection = gtk_tree_view_get_selection(view);

  if (!gtk_tree_selection_get_selected(selection, &model, &it)) {
    log_debug("No selection");
    return;
  }
  gtk_tree_model_get(model, &it, USDLG_COL_ROW_TYPE, &row, -1);

  if (row == ROW_UNIT || row == ROW_UNIT_TRANSPORTED) {
    gint uid;
    struct unit *punit;

    gtk_tree_model_get(model, &it, USDLG_COL_UID, &uid, -1);

    punit = player_unit_by_number(client_player(), uid);
    if (punit) {
      center_tile_mapcanvas(unit_tile(punit));
    }
  }
}

 Callback for the focus button.
***********/
static void usdlg_cmd_focus(GtkObject *object, gpointer data)
{
  enum unit_select_location_mode loc = (enum unit_select_location_mode) data;
  struct unit_select_dialog *pdialog = usdlg_get(FALSE);

  fc_assert_ret(pdialog != NULL);
  fc_assert_ret(unit_select_location_mode_is_valid(loc));

  usdlg_cmd_focus_real(GTK_TREE_VIEW(pdialog->tabs[loc].view));
}

 Callback if a row is activated.
***********/
static void usdlg_cmd_row_activated(GtkTreeView *view, GtkTreePath *path,
                                    GtkTreeViewColumn *col, gpointer data)
{
  usdlg_cmd_focus_real(view);
}

 Focus to the currently selected unit.
***********/
static void usdlg_cmd_focus_real(GtkTreeView *view)
{
  GtkTreeSelection *selection = gtk_tree_view_get_selection(view);
  GtkTreeModel *model;
  GtkTreeIter it;
  gint row;

  if (!can_client_change_view() || !can_client_control()) {
    return;
  }

  if (!gtk_tree_selection_get_selected(selection, &model, &it)) {
    log_debug("No selection");
    return;
  }
  gtk_tree_model_get(model, &it, USDLG_COL_ROW_TYPE, &row, -1);

  if (row == ROW_UNIT || row == ROW_UNIT_TRANSPORTED) {
    gint uid;
    struct unit *punit;

    gtk_tree_model_get(model, &it, USDLG_COL_UID, &uid, -1);

    punit = player_unit_by_number(client_player(), uid);
    if (punit && unit_owner(punit) == client_player()) {
      unit_focus_set(punit);
      usdlg_destroy();
    }
  }
}

 Callback if the row is changed.
***********/
static void usdlg_cmd_cursor_changed(GtkTreeView *view, gpointer data)
{
  enum unit_select_location_mode loc = (enum unit_select_location_mode) data;
  GtkTreeSelection *selection;
  GtkTreeModel *model;
  GtkTreeIter it;
  gint row, uid;
  struct unit_select_dialog *pdialog = usdlg_get(FALSE);
  struct unit *punit;
  bool cmd_status[USDLG_CMD_LAST];
  int cmd_id;

  fc_assert_ret(pdialog != NULL);
  fc_assert_ret(unit_select_location_mode_is_valid(loc));

  selection = gtk_tree_view_get_selection(view);
  if (!gtk_tree_selection_get_selected(selection, &model, &it)) {
    log_debug("No selection");
    return;
  }
  gtk_tree_model_get(model, &it, USDLG_COL_ROW_TYPE, &row, USDLG_COL_UID,
                     &uid, -1);

  switch (row) {
  case ROW_UNITTYPE:
  case ROW_ACTIVITY:
    /* Button status for rows unittype and activity:
     *             player    observer
     * ready        TRUE      FALSE
     * sentry       TRUE      FALSE
     * select       TRUE      FALSE
     * deselect     TRUE      FALSE
     * center       FALSE     FALSE
     * focus        FALSE     FALSE */
    if (can_client_change_view() && can_client_control()) {
      cmd_status[USDLG_CMD_READY] = TRUE;
      cmd_status[USDLG_CMD_SENTRY] = TRUE;
      cmd_status[USDLG_CMD_SELECT] = TRUE;
      cmd_status[USDLG_CMD_DESELECT] = TRUE;
    } else {
      cmd_status[USDLG_CMD_READY] = FALSE;
      cmd_status[USDLG_CMD_SENTRY] = FALSE;
      cmd_status[USDLG_CMD_SELECT] = FALSE;
      cmd_status[USDLG_CMD_DESELECT] = FALSE;
    }

    cmd_status[USDLG_CMD_CENTER] = FALSE;
    cmd_status[USDLG_CMD_FOCUS] = FALSE;
    break;
  case ROW_UNIT:
  case ROW_UNIT_TRANSPORTED:
    /* Button status for rows unit and unit (transported):
     *             player    observer
     * ready        !IDLE     FALSE
     * sentry       !SENTRY   FALSE
     * select       !FOCUS    FALSE
     * deselect     FOCUS     FALSE
     * center       TRUE      TRUE
     * focus        !FOCUS    FALSE */
    punit = player_unit_by_number(client_player(), uid);

    if (punit && can_client_change_view() && can_client_control()) {
      if (punit->activity == ACTIVITY_IDLE) {
        cmd_status[USDLG_CMD_READY] = FALSE;
      } else {
        cmd_status[USDLG_CMD_READY] = TRUE;
      }

      if (punit->activity == ACTIVITY_SENTRY) {
        cmd_status[USDLG_CMD_SENTRY] = FALSE;
      } else {
        cmd_status[USDLG_CMD_SENTRY] = TRUE;
      }

      if (!unit_is_in_focus(punit)) {
        cmd_status[USDLG_CMD_SELECT] = TRUE;
        cmd_status[USDLG_CMD_DESELECT] = FALSE;
        cmd_status[USDLG_CMD_FOCUS] = TRUE;
      } else {
        cmd_status[USDLG_CMD_SELECT] = FALSE;
        cmd_status[USDLG_CMD_DESELECT] = TRUE;
        cmd_status[USDLG_CMD_FOCUS] = FALSE;
      }
    } else {
      cmd_status[USDLG_CMD_READY] = FALSE;
      cmd_status[USDLG_CMD_SENTRY] = FALSE;

      cmd_status[USDLG_CMD_SELECT] = FALSE;
      cmd_status[USDLG_CMD_DESELECT] = FALSE;

      cmd_status[USDLG_CMD_FOCUS] = FALSE;
    }

    cmd_status[USDLG_CMD_CENTER] = TRUE;
    break;
  }

  /* Set widget status. */
  for (cmd_id = 0; cmd_id < USDLG_CMD_LAST; cmd_id++) {
    gtk_widget_set_sensitive(GTK_WIDGET(pdialog->tabs[loc].cmd[cmd_id]),
                             cmd_status[cmd_id]);
  }
}
ENDREP
DELTA 22823 0 2607
SVN  ÍXÎE Õ;  mÕ:E UŌ@ öX×  else {
      pdialog->ptile = get_center_tile_mapcanvas();
    }
  }ENDREP
id: 6pa.5kv.r27923/37734
type: file
pred: 6pa.5kv.r26906/76553
count: 8
text: 27923 0 37579 42440 aa78d64a82f9575dc6bcbe4a08c2ee32
props: 26906 76506 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /branches/S2_5/client/gui-gtk-2.0/unitselect.c
copyroot: 22812 /branches/S2_5

PLAIN
K 11
Makefile.am
V 24
file zu.5kv.r25194/10613
K 8
canvas.c
V 26
file 2y6.5ck.r19259/423619
K 8
canvas.h
V 23
file 2y7.0.r10096/14437
K 16
caravan_dialog.c
V 23
file 376.5kv.r26309/304
K 10
chatline.c
V 22
file zw.5kv.r26635/890
K 10
chatline.h
V 24
file zx.5kv.r25819/24874
K 15
choice_dialog.c
V 24
file 377.5ck.r20037/8804
K 15
choice_dialog.h
V 23
file 378.0.r12670/99360
K 14
citizensinfo.c
V 25
file 6n1.5kv.r26906/80400
K 14
citizensinfo.h
V 25
file 6n2.5kv.r26906/80725
K 9
citydlg.c
V 22
file zy.5kv.r24339/935
K 9
citydlg.h
V 20
file zz.0.r5493/6351
K 9
cityrep.c
V 25
file 100.5ck.r22325/71392
K 9
cityrep.h
V 25
file 101.5ck.r18101/91562
K 8
cma_fe.c
V 25
file 102.5ck.r19683/43590
K 8
cma_fe.h
V 25
file 103.5ck.r19385/17470
K 8
colors.c
V 23
file 104.5ck.r21441/270
K 8
colors.h
V 24
file 105.5ck.r16180/3087
K 12
connectdlg.c
V 25
file 106.5ck.r19683/48662
K 12
connectdlg.h
V 25
file 107.5ck.r19154/49180
K 9
dialogs.c
V 25
file 108.5kv.r25859/69522
K 9
dialogs.h
V 25
file 109.5kv.r23887/49261
K 10
diplodlg.c
V 25
file 10a.5ck.r21403/37678
K 10
diplodlg.h
V 23
file 10b.0.r9577/108261
K 17
diplomat_dialog.c
V 25
file 36n.5kv.r26318/16788
K 9
editgui.c
V 25
file 4ej.5kv.r26906/79763
K 9
editgui.h
V 25
file 4ek.5kv.r26906/80082
K 10
editprop.c
V 25
file 4el.5kv.r26906/79444
K 10
editprop.h
V 25
file 3bj.5cl.r21141/52087
K 10
embedggz.c
V 25
file 4gq.5kv.r26906/79124
K 9
finddlg.c
V 25
file 10c.5ck.r20622/23806
K 9
finddlg.h
V 22
file 2d0.0.r5989/22356
K 10
gamedlgs.c
V 25
file 10d.5ck.r21403/38654
K 9
gotodlg.c
V 24
file 10e.5kv.r24413/6564
K 9
gotodlg.h
V 25
file 10f.5ck.r19505/20989
K 10
graphics.c
V 23
file 10g.5ck.r22525/653
K 10
graphics.h
V 23
file 10h.5ck.r22525/906
K 12
gtkpixcomm.c
V 25
file 10i.5ck.r19683/48923
K 12
gtkpixcomm.h
V 24
file 10j.5ck.r19779/2644
K 10
gui_main.c
V 25
file 10k.5kv.r27287/14665
K 10
gui_main.h
V 24
file 10l.5kv.r24709/9944
K 11
gui_stuff.c
V 25
file 10m.5ck.r21403/36693
K 11
gui_stuff.h
V 25
file 10n.5ck.r20622/22320
K 11
happiness.c
V 25
file 10o.5ck.r22264/26496
K 11
happiness.h
V 23
file 10p.0.r9577/106064
K 9
helpdlg.c
V 25
file 10q.5kv.r25496/32646
K 9
helpdlg.h
V 23
file 10r.0.r4313/267882
K 10
inputdlg.c
V 25
file 10s.5ck.r19683/46961
K 10
inputdlg.h
V 24
file 10t.5ck.r19651/6762
K 10
inteldlg.c
V 25
file 10u.5kv.r26230/78183
K 10
inteldlg.h
V 23
file 2d1.0.r9577/108626
K 12
luaconsole.c
V 25
file 75w.5kv.r26906/77517
K 12
luaconsole.h
V 25
file 75x.5kv.r26906/77835
K 9
mapctrl.c
V 24
file 10v.5ck.r20037/8551
K 9
mapctrl.h
V 25
file 10w.5bk.r14157/11089
K 9
mapview.c
V 23
file 10x.5kv.r25641/537
K 9
mapview.h
V 24
file 10y.5ck.r17351/2736
K 6
menu.c
V 25
file 10z.5kv.r26110/14203
K 6
menu.h
V 25
file 110.5ck.r16067/65085
K 12
messagedlg.c
V 24
file 111.5ck.r20767/1172
K 12
messagedlg.h
V 22
file 2d2.0.r5989/22693
K 12
messagewin.c
V 24
file 112.5ck.r21446/1721
K 12
messagewin.h
V 25
file 113.5ck.r18082/27153
K 11
optiondlg.c
V 25
file 4js.5kv.r26906/78800
K 11
optiondlg.h
V 25
file 114.5ck.r17037/29773
K 7
pages.c
V 24
file 2pi.5kv.r27140/4870
K 7
pages.h
V 24
file 2pj.5kv.r24719/1381
K 8
plrdlg.c
V 25
file 115.5ck.r20622/24063
K 8
plrdlg.h
V 22
file 116.0.r10803/7069
K 10
ratesdlg.h
V 22
file 2d3.0.r5989/22018
K 4
rc2c
V 23
file 117.0.r4313/274431
K 10
repodlgs.c
V 24
file 118.5kv.r26322/4677
K 10
repodlgs.h
V 24
file 119.5ck.r18439/2365
K 11
resources.c
V 26
file 11a.5ck.r19259/423360
K 11
resources.h
V 23
file 11b.5ck.r22128/110
K 14
soundset_dlg.c
V 25
file kcq.5kv.r26906/77195
K 14
spaceshipdlg.c
V 25
file 11c.5ck.r20622/24322
K 14
spaceshipdlg.h
V 23
file 11d.0.r9577/110090
K 8
sprite.c
V 23
file 2y8.5kv.r24400/217
K 8
sprite.h
V 23
file 2y9.0.r10141/29270
K 11
theme_dlg.c
V 25
file 47d.5ck.r19767/51012
K 8
themes.c
V 23
file 34x.5ck.r20534/377
K 13
tileset_dlg.c
V 24
file 45i.5kv.r23643/6953
K 12
unitselect.c
V 25
file 6pa.5kv.r27923/37734
K 12
unitselect.h
V 25
file 6pb.5kv.r26906/76875
K 14
voteinfo_bar.c
V 25
file 4h8.5kv.r26906/78156
K 14
voteinfo_bar.h
V 25
file 4h9.5kv.r26906/78482
K 7
wldlg.c
V 24
file 11e.5ck.r22525/1411
K 7
wldlg.h
V 25
file 11f.5ck.r16285/86707
END
ENDREP
id: zs.5kv.r27923/42121
type: dir
pred: zs.5kv.r27287/19050
count: 1646
text: 27923 38008 4100 4100 404ffcd7b05237c9e94e8f622e4b008b
props: 11108 11912 79 0 480bb3268560e84c2d6c8376c422c65e
cpath: /branches/S2_5/client/gui-gtk-2.0
copyroot: 22812 /branches/S2_5

id: 6pa.5kx.r27923/42384
type: file
pred: 6pa.5kx.r26906/65498
count: 14
text: 27923 37605 103 42778 1e4a2254163779b5d3683a50933482f3
props: 26906 65451 34 0 25e6c2f7558b7484000d4d090dea5b92
cpath: /branches/S2_5/client/gui-gtk-3.0/unitselect.c
copyroot: 19694 /trunk/client/gui-gtk-3.0

PLAIN
K 11
Makefile.am
V 24
file zu.5kx.r25194/24605
K 8
canvas.c
V 24
file 2y6.5g7.r22000/1989
K 8
canvas.h
V 25
file 2y7.5g7.r20781/42180
K 16
caravan_dialog.c
V 24
file 376.5kx.r26309/4947
K 10
chatline.c
V 23
file zw.5kx.r26635/5525
K 10
chatline.h
V 24
file zx.5kx.r25819/30073
K 15
choice_dialog.c
V 23
file 377.5g7.r22029/922
K 15
choice_dialog.h
V 23
file 378.0.r12670/99360
K 14
citizensinfo.c
V 25
file 6n1.5kx.r26906/69468
K 14
citizensinfo.h
V 25
file 6n2.5kx.r26906/69800
K 9
citydlg.c
V 22
file zy.5kx.r27354/376
K 9
citydlg.h
V 20
file zz.0.r5493/6351
K 9
cityrep.c
V 23
file 100.5kx.r23708/362
K 9
cityrep.h
V 25
file 101.5ck.r18101/91562
K 8
cma_fe.c
V 24
file 102.5g7.r21996/5016
K 8
cma_fe.h
V 25
file 103.5g7.r21938/12021
K 8
colors.c
V 25
file 104.5g7.r21920/14125
K 8
colors.h
V 25
file 105.5g7.r21920/14399
K 12
connectdlg.c
V 25
file 106.5ck.r19683/48662
K 12
connectdlg.h
V 25
file 107.5ck.r19154/49180
K 9
dialogs.c
V 25
file 108.5kx.r25859/86513
K 9
dialogs.h
V 25
file 109.5kx.r23887/54436
K 10
diplodlg.c
V 24
file 10a.5kx.r24248/4015
K 10
diplodlg.h
V 23
file 10b.0.r9577/108261
K 17
diplomat_dialog.c
V 25
file 36n.5kx.r26318/21439
K 9
editgui.c
V 25
file 4ej.5kx.r26906/68811
K 9
editgui.h
V 25
file 4ek.5kx.r26906/69139
K 10
editprop.c
V 25
file 4el.5kx.r26906/68478
K 10
editprop.h
V 25
file 3bj.5jh.r21141/57145
K 10
embedggz.c
V 25
file 4gq.5kx.r26906/68147
K 9
finddlg.c
V 23
file 10c.5kx.r24964/157
K 9
finddlg.h
V 22
file 2d0.0.r5989/22356
K 10
gamedlgs.c
V 23
file 10d.5g7.r22761/443
K 9
gotodlg.c
V 25
file 10e.5kx.r24413/11207
K 9
gotodlg.h
V 25
file 10f.5ck.r19505/20989
K 10
graphics.c
V 24
file 10g.5g7.r22525/6030
K 10
graphics.h
V 24
file 10h.5g7.r22525/6304
K 12
gtkpixcomm.c
V 25
file 10i.5g7.r21620/11139
K 12
gtkpixcomm.h
V 24
file 10j.5g7.r21587/1498
K 10
gui_main.c
V 25
file 10k.5kx.r27287/28688
K 10
gui_main.h
V 24
file 10l.5kx.r27180/3152
K 11
gui_stuff.c
V 25
file 10m.5g7.r22082/16090
K 11
gui_stuff.h
V 24
file 10n.5g7.r22000/3088
K 11
happiness.c
V 23
file 10o.5kx.r25223/183
K 11
happiness.h
V 23
file 10p.0.r9577/106064
K 9
helpdlg.c
V 23
file 10q.5kx.r26536/344
K 9
helpdlg.h
V 23
file 10r.0.r4313/267882
K 10
inputdlg.c
V 25
file 10s.5g7.r20464/72142
K 10
inputdlg.h
V 24
file 10t.5ck.r19651/6762
K 10
inteldlg.c
V 25
file 10u.5kx.r26230/69666
K 10
inteldlg.h
V 23
file 2d1.0.r9577/108626
K 12
luaconsole.c
V 25
file 76e.5kx.r26906/66489
K 12
luaconsole.h
V 25
file 76f.5kx.r26906/66820
K 9
mapctrl.c
V 23
file 10v.5kx.r22943/708
K 9
mapctrl.h
V 23
file 10w.5g7.r21978/547
K 9
mapview.c
V 23
file 10x.5kx.r26534/185
K 9
mapview.h
V 24
file 10y.5g7.r21620/8982
K 6
menu.c
V 24
file 10z.5kx.r26110/5912
K 6
menu.h
V 25
file 110.5ck.r16067/65085
K 12
messagedlg.c
V 25
file 111.5g7.r22082/18513
K 12
messagedlg.h
V 22
file 2d2.0.r5989/22693
K 12
messagewin.c
V 25
file 112.5g7.r22082/16367
K 12
messagewin.h
V 25
file 113.5ck.r18082/27153
K 11
optiondlg.c
V 25
file 4js.5kx.r26906/67813
K 11
optiondlg.h
V 25
file 114.5ck.r17037/29773
K 7
pages.c
V 24
file 2pi.5lu.r27180/2580
K 7
pages.h
V 24
file 2pj.5kx.r24719/6591
K 8
plrdlg.c
V 24
file 115.5kx.r24248/4295
K 8
plrdlg.h
V 22
file 116.0.r10803/7069
K 10
ratesdlg.h
V 22
file 2d3.0.r5989/22018
K 10
repodlgs.c
V 24
file 118.5kx.r26322/9319
K 10
repodlgs.h
V 24
file 119.5ck.r18439/2365
K 14
soundset_dlg.c
V 25
file cku.5kx.r26906/66160
K 14
spaceshipdlg.c
V 25
file 11c.5g7.r22082/18236
K 14
spaceshipdlg.h
V 23
file 11d.0.r9577/110090
K 8
sprite.c
V 24
file 2y8.5kx.r26098/7071
K 8
sprite.h
V 25
file 2y9.5g7.r20540/56680
K 11
theme_dlg.c
V 25
file 47d.5g7.r20464/70472
K 8
themes.c
V 22
file 34x.5kx.r26760/61
K 13
tileset_dlg.c
V 25
file 45i.5kx.r23643/12148
K 12
unitselect.c
V 25
file 6pa.5kx.r27923/42384
K 12
unitselect.h
V 25
file 6pb.5kx.r26906/65829
K 14
voteinfo_bar.c
V 25
file 4h8.5kx.r26906/67151
K 14
voteinfo_bar.h
V 25
file 4h9.5kx.r26906/67484
K 7
wldlg.c
V 22
file 11e.5g7.r22594/83
K 7
wldlg.h
V 25
file 11f.5ck.r16285/86707
END
ENDREP
id: zs.5kx.r27923/46644
type: dir
pred: zs.5kx.r27354/4625
count: 1762
text: 27923 42672 3959 3959 295e4ca8784f0685989c60ef790c32a8
props: 11108 11912 79 0 480bb3268560e84c2d6c8376c422c65e
cpath: /branches/S2_5/client/gui-gtk-3.0
copyroot: 19694 /trunk/client/gui-gtk-3.0

PLAIN
K 11
Makefile.am
V 23
file 5f.5kv.r25962/1188
K 6
agents
V 22
dir zf.5kv.r27765/1055
K 11
attribute.c
V 24
file xh.5kv.r27498/50327
K 11
attribute.h
V 24
file xi.5ck.r18863/23649
K 7
audio.c
V 24
file 139.5ck.r22180/7668
K 7
audio.h
V 24
file 13a.5ck.r22180/7911
K 12
audio_none.c
V 26
file 13d.5ck.r19259/462511
K 12
audio_none.h
V 25
file 13e.5ck.r18863/20841
K 11
audio_sdl.c
V 25
file 13f.5ck.r19354/73618
K 11
audio_sdl.h
V 25
file 13g.5ck.r18863/23885
K 17
chatline_common.c
V 24
file 14q.5kv.r24896/5437
K 17
chatline_common.h
V 24
file 14r.5kv.r24893/5197
K 16
citydlg_common.c
V 23
file z4.5kv.r25543/5114
K 16
citydlg_common.h
V 24
file z5.5ck.r18863/18619
K 13
cityrepdata.c
V 22
file mb.5kv.r24130/185
K 13
cityrepdata.h
V 24
file mc.5ck.r18863/19121
K 13
client_main.c
V 22
file 2f.5m3.r27644/305
K 13
client_main.h
V 24
file hz.5p3.r26715/15332
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.5kv.r26655/41648
K 9
climisc.h
V 24
file i0.5kv.r26655/41906
K 8
clinet.c
V 23
file hc.5kv.r26022/1649
K 8
clinet.h
V 24
file i1.5ck.r18863/24866
K 15
colors_common.c
V 24
file 33a.5kv.r22856/3020
K 15
colors_common.h
V 25
file 33b.5kv.r24137/11622
K 19
connectdlg_common.c
V 25
file 2fw.5kv.r26715/15608
K 19
connectdlg_common.h
V 25
file 2fx.5ck.r19154/53802
K 9
control.c
V 22
file gz.5kv.r26826/795
K 9
control.h
V 23
file i2.5kv.r26325/5744
K 7
dummy.c
V 26
file 4f9.5kv.r26906/128290
K 12
dummycxx.cpp
V 25
file 6kr.5kv.r26906/60002
K 8
editor.c
V 23
file 3bg.5kv.r26199/994
K 8
editor.h
V 24
file 3bh.5kv.r26199/1251
K 11
ggzclient.c
V 26
file 394.5ck.r20126/104106
K 11
ggzclient.h
V 25
file 395.5ck.r18863/21083
K 17
global_worklist.c
V 26
file 4i6.5kv.r26906/111450
K 17
global_worklist.h
V 26
file 4i7.5kv.r26906/120138
K 6
goto.c
V 22
file vu.5kv.r26658/166
K 6
goto.h
V 24
file vv.5ck.r20865/49000
K 11
gui-gtk-2.0
V 23
dir zs.5kv.r27923/42121
K 11
gui-gtk-3.0
V 23
dir zs.5kx.r27923/46644
K 6
gui-qt
V 24
dir 6ie.5kv.r27862/12957
K 7
gui-sdl
V 23
dir 16t.5kv.r27919/6644
K 8
gui-stub
V 23
dir mh.5kv.r27287/14406
K 7
gui-xaw
V 23
dir 9o.5kv.r27287/22897
K 14
gui_cbsetter.c
V 25
file a3c.5kv.r26906/75933
K 14
gui_cbsetter.h
V 25
file a3d.5kv.r26906/85422
K 15
gui_interface.c
V 26
file 6jm.5ni.r26906/120454
K 15
gui_interface.h
V 26
file 6jn.5nj.r26906/120785
K 10
helpdata.c
V 24
file h1.5kv.r27885/11822
K 10
helpdata.h
V 24
file i3.5kv.r25496/41390
K 7
include
V 24
dir b8.5kv.r26906/119832
K 19
luaconsole_common.c
V 25
file 75z.5kv.r26906/75620
K 19
luaconsole_common.h
V 25
file 760.5kv.r26906/76240
K 9
luascript
V 25
dir 761.5kv.r26906/110514
K 16
mapctrl_common.c
V 24
file 15m.5kv.r27636/2488
K 16
mapctrl_common.h
V 25
file 15n.5ck.r19893/12504
K 16
mapview_common.c
V 23
file z2.5kv.r26344/3914
K 16
mapview_common.h
V 24
file z3.5ck.r20392/39510
K 19
messagewin_common.c
V 25
file 14s.5ck.r19354/71979
K 19
messagewin_common.h
V 25
file 14t.5ck.r18863/21579
K 9
options.c
V 23
file dc.5kv.r27393/9704
K 9
options.h
V 23
file i4.5kv.r23149/6288
K 17
overview_common.c
V 25
file 2yk.5kv.r23660/90028
K 17
overview_common.h
V 24
file 2yl.5ck.r19511/5441
K 10
packhand.c
V 22
file n.5kv.r27034/4159
K 10
packhand.h
V 24
file i5.5ck.r18863/20596
K 15
plrdlg_common.c
V 23
file 14u.5kv.r23427/983
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.5kv.r24137/11365
K 9
reqtree.h
V 24
file 2yn.5ck.r19057/3837
K 9
servers.c
V 25
file 33x.5kv.r25000/28091
K 9
servers.h
V 25
file 33y.5ck.r20478/36372
K 6
text.c
V 25
file 2g3.5kv.r26230/82827
K 6
text.h
V 25
file 2g4.5ck.r22264/31375
K 15
themes_common.c
V 22
file 352.5kv.r26466/95
K 15
themes_common.h
V 25
file 353.5ck.r18863/22710
K 10
tilespec.c
V 22
file hl.5kv.r27294/574
K 10
tilespec.h
V 23
file i6.5kv.r26463/2683
K 19
unitselect_common.c
V 26
file 76v.5kv.r26906/110817
K 19
unitselect_common.h
V 26
file 76w.5kv.r26906/111132
K 14
update_queue.c
V 25
file 4jw.5kv.r26906/74380
K 14
update_queue.h
V 25
file 4jx.5kv.r26906/75002
K 10
voteinfo.c
V 25
file 4fe.5kv.r26906/74693
K 10
voteinfo.h
V 25
file 4ff.5kv.r26906/75313
END
ENDREP
id: d.5kv.r27923/51150
type: dir
pred: d.5kv.r27919/11133
count: 6027
text: 27923 46917 4220 4220 0882dbc86eb383303765c9b49efe3c01
props: 23991 877 341 0 4a292777c297b001f37cdd3988879aee
cpath: /branches/S2_5/client
copyroot: 22812 /branches/S2_5

PLAIN
K 9
ABOUT-NLS
V 24
file fu.5kv.r23463/86338
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.5kv.r27105/6247100
K 7
INSTALL
V 21
file 6.5kv.r27779/472
K 11
Makefile.am
V 22
file 59.5kv.r27141/100
K 4
NEWS
V 24
file 6m.5kv.r27102/55945
K 8
NEWS-2.5
V 24
file 1h59.5kv.r27109/200
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 21
dir 8.5kv.r27667/2722
K 10
autogen.sh
V 23
file 12o.5kv.r24092/228
K 9
bootstrap
V 23
dir 2p5.5kv.r27141/1850
K 6
client
V 22
dir d.5kv.r27923/51150
K 6
common
V 21
dir p.5kv.r27897/6555
K 12
configure.ac
V 23
file 149.5kv.r27511/141
K 4
data
V 22
dir w.5kv.r27885/11576
K 6
debian
V 22
dir 5w.5kv.r23304/4091
K 12
dependencies
V 25
dir 2yu.5kv.r26906/165544
K 11
diff_ignore
V 24
file qq.5ck.r21039/26581
K 3
doc
V 22
dir k7.5kv.r27845/2193
K 10
fc_version
V 22
file 2lo.5kw.r27103/46
K 2
m4
V 23
dir 12p.5kv.r27088/2974
K 7
scripts
V 23
dir 2yo.5kv.r26113/1118
K 6
server
V 21
dir z.5kv.r27916/5696
K 5
tests
V 22
dir 2g9.5kv.r27024/930
K 5
tools
V 23
dir 4pj.5lo.r27672/4394
K 12
translations
V 26
dir t0n.5kv.r27911/3943080
K 7
utility
V 22
dir 1c.5kv.r27905/3384
K 3
vms
V 25
dir u9.5ck.r21528/1396085
K 5
win32
V 23
dir 2eu.5kv.r27293/1686
END
ENDREP
id: 3.5kv.r27923/52645
type: dir
pred: 3.5kv.r27919/12627
count: 17692
text: 27923 51398 1234 1234 b8f738aa131b65dd95e657a9c13882f3
props: 20140 3888 282 0 e4bb46e81629a60eef613b169b23a9ea
cpath: /branches/S2_5
copyroot: 22812 /branches/S2_5

PLAIN
K 5
S1_14
V 21
dir 3.21.r18109/18803
K 4
S2_0
V 21
dir 3.10x.r21862/4178
K 4
S2_1
V 22
dir 3.59e.r20026/11014
K 4
S2_2
V 21
dir 3.5cy.r21861/5036
K 4
S2_3
V 21
dir 3.5f2.r24391/5183
K 4
S2_4
V 22
dir 3.5ii.r27920/12998
K 4
S2_5
V 22
dir 3.5kv.r27923/52645
K 4
S2_6
V 22
dir 3.5qi.r27922/15078
K 11
freeciv-web
V 22
dir 3.5bl.r13594/14918
END
ENDREP
id: 1.0.r27923/53243
type: dir
pred: 1.0.r27922/15676
count: 8684
text: 27923 52888 342 342 47cdd75a4e6950af6faec302a280795a
cpath: /branches
copyroot: 0 /

PLAIN
K 8
branches
V 20
dir 1.0.r27923/53243
K 4
tags
V 19
dir 2.0.r27200/6414
K 5
trunk
V 22
dir 3.5ck.r27921/14979
K 7
website
V 21
dir 3ge.0.r22980/2263
END
ENDREP
id: 0.0.r27923/53567
type: dir
pred: 0.0.r27922/16000
count: 27923
text: 27923 53400 154 154 6679c9686e3735868603c1c7f52e1a25
cpath: /
copyroot: 0 /

6pa.5kv.t27922-1 modify true false /branches/S2_5/client/gui-gtk-2.0/unitselect.c

6pa.5kx.t27922-1 modify true false /branches/S2_5/client/gui-gtk-3.0/unitselect.c


53567 53717
