Re: [Freeciv-Dev] GTK science report select-help problem (PR#31)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
David Pfitzner wrote:
> In the GTK+ client science report, if you enable the help toggle, and
> then select a Research or Goal tech, you get the help popup ok, but then
> the selection thingy in the science report stays changed to whatever you
> selected for help.
The attached patch fixes this, though in a rather heavy handed
manner: it updates the science dialog after popping up the help.
It should be possible to just update the appropriate menu, but
that looked harder to do.
Regards,
-- David
diff -u -r --exclude-from exclude freeciv-cvs/client/gui-gtk/repodlgs.c
freeciv-mod/client/gui-gtk/repodlgs.c
--- freeciv-cvs/client/gui-gtk/repodlgs.c Sat Jun 12 17:40:05 1999
+++ freeciv-mod/client/gui-gtk/repodlgs.c Sun Jul 4 13:39:23 1999
@@ -264,10 +264,13 @@
to=(size_t)data;
- if (GTK_TOGGLE_BUTTON(science_help_toggle)->active)
+ if (GTK_TOGGLE_BUTTON(science_help_toggle)->active) {
popup_help_dialog_typed(advances[to].name, HELP_TECH);
- else
- {
+ /* Following is to make the menu go back to the current research;
+ * there may be a better way to do this? --dwp */
+ science_dialog_update();
+ }
+ else {
sprintf(text, "%d/%d",
game.player_ptr->research.researched,
research_time(game.player_ptr));
@@ -275,7 +278,7 @@
packet.tech=to;
send_packet_player_request(&aconnection, &packet,
PACKET_PLAYER_RESEARCH);
- }
+ }
}
/****************************************************************
@@ -289,10 +292,13 @@
to=(size_t)data;
- if (GTK_TOGGLE_BUTTON(science_help_toggle)->active)
+ if (GTK_TOGGLE_BUTTON(science_help_toggle)->active) {
popup_help_dialog_typed(advances[to].name, HELP_TECH);
- else
- {
+ /* Following is to make the menu go back to the current goal;
+ * there may be a better way to do this? --dwp */
+ science_dialog_update();
+ }
+ else {
sprintf(text, "(%d steps)",
tech_goal_turns(game.player_ptr, to));
gtk_set_label(science_goal_label,text);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Freeciv-Dev] GTK science report select-help problem (PR#31),
David Pfitzner <=
|
|