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

Committed to S2_1, S2_2 and trunk revisions r14622 - r14624

Patches exactly as already posted

Ulrik

>From 7eed27385744eae2eeb75267209364158fd0dec3 Mon Sep 17 00:00:00 2001
From: Ulrik Sverdrup <[EMAIL PROTECTED]>
Date: Thu, 24 Apr 2008 21:18:30 +0200
Subject: [PATCH] (PR#39821) Global Lists Bug... Can't Add to top of list?

The global worklist editor would not allow the < buttons (prepend and
append) to become sensitive, since ptr->pcity is NULL for global
worklits. This fixes that case.
---
 client/gui-gtk-2.0/wldlg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/gui-gtk-2.0/wldlg.c b/client/gui-gtk-2.0/wldlg.c
index 29cccdc..0b1bab6 100644
--- a/client/gui-gtk-2.0/wldlg.c
+++ b/client/gui-gtk-2.0/wldlg.c
@@ -898,7 +898,8 @@ static void src_selection_callback(GtkTreeSelection *selection, gpointer data)
   /* update widget sensitivity. */
   if (gtk_tree_selection_get_selected(selection, NULL, NULL)) {
     if (can_client_issue_orders()
-	&& ptr->pcity && city_owner(ptr->pcity) == game.player_ptr) {
+      && (!ptr->pcity || city_owner(ptr->pcity) == game.player_ptr)) {
+      /* if ptr->pcity is NULL, this is a global worklist */
       gtk_widget_set_sensitive(ptr->change_cmd, TRUE);
       gtk_widget_set_sensitive(ptr->prepend_cmd, TRUE);
       gtk_widget_set_sensitive(ptr->append_cmd, TRUE);
-- 
1.5.5

>From aede16b3f7b792881a5bacc17d8aabbe2a78afeb Mon Sep 17 00:00:00 2001
From: englabenny <[EMAIL PROTECTED]>
Date: Thu, 24 Apr 2008 19:43:11 +0000
Subject: [PATCH] (PR#39821) Global Lists Bug... Can't Add to top of list?

The global worklist editor would not allow the < buttons (prepend and
append) to become sensitive, since ptr->pcity is NULL for global
worklits. This fixes that case.



git-svn-id: http://svn.gna.org/svn/freeciv/branches/[EMAIL PROTECTED] a0f10bec-cc02-0410-94fc-a9cfff90b4cd
---
 client/gui-gtk-2.0/wldlg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/gui-gtk-2.0/wldlg.c b/client/gui-gtk-2.0/wldlg.c
index a3373d1..6bdf509 100644
--- a/client/gui-gtk-2.0/wldlg.c
+++ b/client/gui-gtk-2.0/wldlg.c
@@ -873,7 +873,8 @@ static void src_selection_callback(GtkTreeSelection *selection, gpointer data)
   /* update widget sensitivity. */
   if (gtk_tree_selection_get_selected(selection, NULL, NULL)) {
     if (can_client_issue_orders()
-	&& ptr->pcity && city_owner(ptr->pcity) == client.conn.playing) {
+      && (!ptr->pcity || city_owner(ptr->pcity) == client.conn.playing)) {
+      /* if ptr->pcity is NULL, this is a global worklist */
       gtk_widget_set_sensitive(ptr->change_cmd, TRUE);
       gtk_widget_set_sensitive(ptr->prepend_cmd, TRUE);
       gtk_widget_set_sensitive(ptr->append_cmd, TRUE);
-- 
1.5.5

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to