Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] (PR#18617) gui-xaw: science dialog cleanup/fix
Home

[Freeciv-Dev] (PR#18617) gui-xaw: science dialog cleanup/fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#18617) gui-xaw: science dialog cleanup/fix
From: "Egor Vyscrebentsov" <evyscr@xxxxxxxxx>
Date: Sat, 15 Jul 2006 06:33:23 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=18617 >

Good daytime!

There is an error in xaw science dialog change callback,
which cause client to crash if technology goal is not set.
Just several unnecesary wrong lines.

Patch is attached (trunk, s2_1, s2_0).

-- 
Thanks, evyscr

Index: client/gui-xaw/repodlgs.c
===================================================================
--- client/gui-xaw/repodlgs.c   (revision 12086)
+++ client/gui-xaw/repodlgs.c   (working copy)
@@ -409,22 +409,13 @@
 void science_change_callback(Widget w, XtPointer client_data, 
                             XtPointer call_data)
 {
-  char current_text[512];
   size_t to = (size_t) client_data;
   Boolean b;
-  struct player_research* research = get_player_research(game.player_ptr);
 
   XtVaGetValues(science_help_toggle, XtNstate, &b, NULL);
   if (b == TRUE) {
     popup_help_dialog_typed(advances[to].name, HELP_TECH);
   } else {
-    my_snprintf(current_text, sizeof(current_text),
-               _("Researching %s: %d/%d"),
-               advances[to].name, research->bulbs_researched,
-               total_bulbs_required(game.player_ptr));
-
-    XtVaSetValues(science_current_label, XtNlabel, current_text, NULL);
-
     dsend_packet_player_research(&aconnection, to);
   }
 }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#18617) gui-xaw: science dialog cleanup/fix, Egor Vyscrebentsov <=