Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] suspicious code in /freeciv-cvs-Mar-27/client/gui-???/repo
Home

[Freeciv-Dev] suspicious code in /freeciv-cvs-Mar-27/client/gui-???/repo

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] suspicious code in /freeciv-cvs-Mar-27/client/gui-???/repodlgs.c (PR#2148)
From: STyx <sylvaintricot@xxxxxxx>
Date: Mon, 7 Oct 2002 13:49:49 -0700 (PDT)

suspicious code in /freeciv-cvs-Mar-27/client/gui-???/repodlgs.c

in function: economy_list_callback()

in gtk(s):

void economy_list_callback(GtkWidget *w, gint row, gint column)
{
int i;

i=economy_improvement_type[row];
if(i>=0 && i<game.num_impr_types && !is_wonder(i))
gtk_widget_set_sensitive(sellobsolete_command, TRUE);
gtk_widget_set_sensitive(sellall_command, TRUE);
return;
}

correction:

void economy_list_callback(GtkWidget *w, gint row, gint column)
{
int i;

i=economy_improvement_type[row];
if(i>=0 && i<game.num_impr_types && !is_wonder(i)) {
gtk_widget_set_sensitive(sellobsolete_command, TRUE);
gtk_widget_set_sensitive(sellall_command, TRUE);
}
}

in xaw:

void economy_list_callback(Widget w, XtPointer client_data,
                   XtPointer call_data)
{
XawListReturnStruct *ret;
int i;
ret=XawListShowCurrent(economy_list);

if(ret->list_index!=XAW_LIST_NONE) {
i=economy_improvement_type[ret->list_index];
if(i>=0 && i<game.num_impr_types && !is_wonder(i))
XtSetSensitive(sellobsolete_command, TRUE);
XtSetSensitive(sellall_command, TRUE);
return;
}
XtSetSensitive(sellobsolete_command, FALSE);
XtSetSensitive(sellall_command, FALSE);
}

correction:

void economy_list_callback(Widget w, XtPointer client_data,
                   XtPointer call_data)
{
XawListReturnStruct *ret;
int i;
ret=XawListShowCurrent(economy_list);

if(ret->list_index!=XAW_LIST_NONE) {
i=economy_improvement_type[ret->list_index];
if(i>=0 && i<game.num_impr_types && !is_wonder(i)) {
XtSetSensitive(sellobsolete_command, TRUE);
XtSetSensitive(sellall_command, TRUE);
}
return;
}
XtSetSensitive(sellobsolete_command, FALSE);
XtSetSensitive(sellall_command, FALSE);
}







[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] suspicious code in /freeciv-cvs-Mar-27/client/gui-???/repodlgs.c (PR#2148), STyx <=