Re: [Freeciv-Dev] (PR#12188) Alt-t key does not work

2007-12-12 Thread Christian Knoke

URL: http://bugs.freeciv.org/Ticket/Display.html?id=12188 


Hello,

Du schriebst am 11. Dec um 01:22 Uhr:

 It's a keyboard command in 2.1.  If it had been fixed 2 years ago, that
 would have been a good time to change it.  Now, it's embedded in the help
 system and translations.
 
 Let's keep the eye on the prize here.  Waiting for the German translator
 to verify whether it fixes his bug report.

Things have changed since 2005, maybe in the code, in the translations, and
- during last days - on my system, too, with an update from Sarge to Etch.

Now, with you patch, I have no Alt-t mnemonic in the menues any more. More
important, the Alt-t command for the main map (mouse cursor hovering over
it) does not do anything at all. Worse, the numpad cursor keys for moving
units do not work, sometimes. Seems related to what keys I pressed before.

Christian

-- 
Christian Knoke* * *http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.



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


Re: [Freeciv-Dev] (PR#12188) Alt-t key does not work

2007-12-12 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=12188 

Christian Knoke wrote:
 important, the Alt-t command for the main map (mouse cursor hovering over
 it) does not do anything at all. Worse, the numpad cursor keys for moving
 
 OK, the t-command does that hilite thing.
 
OK, good.  Before, Alt-t, control-t, and 't' all did the hilite thing.
But I thought you had an Alt-t menu or dialog item, and that was what
needs to be tested.  Should work now, just wanted confirmation.



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


Re: [Freeciv-Dev] (PR#12188) Alt-t key does not work

2007-12-12 Thread Christian Knoke

URL: http://bugs.freeciv.org/Ticket/Display.html?id=12188 


 important, the Alt-t command for the main map (mouse cursor hovering over
 it) does not do anything at all. Worse, the numpad cursor keys for moving

OK, the t-command does that hilite thing.

Christian

-- 
Christian Knoke* * *http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.



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


Re: [Freeciv-Dev] (PR#12188) Alt-t key does not work

2007-12-12 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=12188 

Looking at Jason's suggestion for 2.2 and beyond, CONTROL+SHIFT+LMB
toggles workers on the main map.  So, it makes some sense for this to be
CONTROL+SHIFT+RMB (instead of 't') to show the overlay.

Committed trunk revision 14156.
Committed S2_2 revision 14157.

Should this new undocumented feature be added to 2.1?

Should the old 't' be removed entirely?  This would require a change to
one very long translation msgid (and the end of the translations would no
longer make any sense).  It would also be removed from xaw (and isn't
implemented in other clients).

BTW, whatever we choose, the overlay doesn't accurately show changes made
using the mouse toggled workers  Blech!

trunk/2.2 patch for posterity:

Index: client/gui-gtk-2.0/gui_main.c
===
--- client/gui-gtk-2.0/gui_main.c   (revision 14155)
+++ client/gui-gtk-2.0/gui_main.c   (working copy)
@@ -615,10 +615,6 @@
 key_cancel_action();
 return TRUE;
 
-  case GDK_t:
-key_city_workers(w, ev);
-return TRUE;
-
   default:
 break;
   };
Index: client/gui-gtk-2.0/mapctrl.c
===
--- client/gui-gtk-2.0/mapctrl.c(revision 14155)
+++ client/gui-gtk-2.0/mapctrl.c(working copy)
@@ -290,14 +290,22 @@
 
   case 3: /* RIGHT mouse button */
 
+/* SHIFT + CONTROL + RMB : Show/hide workers. */
+if ((ev-state  GDK_SHIFT_MASK)  (ev-state  GDK_CONTROL_MASK)) {
+  if (NULL != pcity) {
+overlay_workers_at_city();
+  }
+}
 /* CONTROL + RMB : Quickselect a land unit. */
-if (ev-state  GDK_CONTROL_MASK) {
+else if (ev-state  GDK_CONTROL_MASK) {
   action_button_pressed(ev-x, ev-y, SELECT_LAND);
 }
 /* SHIFT + RMB: Paste Production. */
-else if ((ev-state  GDK_SHIFT_MASK)  pcity) {
-  clipboard_paste_production(pcity);
-  cancel_tile_hiliting();
+else if ((ev-state  GDK_SHIFT_MASK)) {
+  if (NULL != pcity) {
+clipboard_paste_production(pcity);
+cancel_tile_hiliting();
+  }
 }
 /* Plain RMB click. */
 else {
@@ -448,7 +456,7 @@
 }
 
 /**
-  Draws the on the map the tiles the given city is using
+  Best effort to center the map on the currently selected unit(s)
 **/
 void center_on_unit(void)
 {
@@ -456,9 +464,9 @@
 }
 
 /**
-  Draws the on the map the tiles the given city is using
+  Shows/hides overlay on the map for the city at this location
 **/
-void key_city_workers(GtkWidget *w, GdkEventKey *ev)
+void overlay_workers_at_city(void)
 {
   int x, y;
   
Index: client/gui-gtk-2.0/mapctrl.h
===
--- client/gui-gtk-2.0/mapctrl.h(revision 14155)
+++ client/gui-gtk-2.0/mapctrl.h(working copy)
@@ -19,8 +19,6 @@
 
 #include mapctrl_g.h
 
-void key_city_workers(GtkWidget *w, GdkEventKey *ev);
-
 gboolean butt_release_mapcanvas(GtkWidget *w, GdkEventButton *ev, gpointer 
data);
 gboolean butt_down_mapcanvas(GtkWidget *w, GdkEventButton *ev, gpointer data);
 gboolean butt_down_overviewcanvas(GtkWidget *w, GdkEventButton *ev, gpointer 
data);
@@ -29,6 +27,8 @@
 gboolean move_overviewcanvas(GtkWidget *w, GdkEventMotion *ev, gpointer data);
 
 void center_on_unit(void);
+void overlay_workers_at_city(void);
+
 void popupinfo_popdown_callback(GtkWidget *w, gpointer data);
 
 #endif  /* FC__MAPCTRL_H */
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39957) multiple bugs in HACK handling

2007-12-12 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39957 

Jason Dorje Short wrote:
 But the point is that having HACK access allows you to write directly to 
 the filesystem, through the /save command among others.  HACK access 
 should only be given when you do not mind the user having write access. 
   That is why the hack check is done the way it is now and the client is 
 supposed to be able to write to the file to get it.
 
AFAICT, there is no check in the server code that the client has write
access, nor that the file was properly deleted.  And the mask isn't
properly set, either.  There is no security reason for the process.

Madeline, where is your code?  The AUTH code here is cryptologically
unsound.  Did the AUTH code come from someplace special?  Is there any
reason to be backward compatible with anything?




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


[Freeciv-Dev] (PR#39957) multiple bugs in HACK handling

2007-12-12 Thread Madeline Book

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39957 

 [wsimpson - Wed Dec 12 14:25:21 2007]:
 
 Jason Dorje Short wrote:
  But the point is that having HACK access allows you to write 
directly to 
  the filesystem, through the /save command among others.  HACK 
access 
  should only be given when you do not mind the user having write 
access. 
That is why the hack check is done the way it is now and the 
client is 
  supposed to be able to write to the file to get it.
  
 AFAICT, there is no check in the server code that the client has write
 access, nor that the file was properly deleted.  And the mask isn't
 properly set, either.  There is no security reason for the process.
 
 Madeline, where is your code?

I assume you mean the ACL code I mentioned previously; that is in
the warclient sources (svn://svn.gna.org/svn/freeciv-warclient/trunk).
Some points of interest:
common/connection.h-- ALLOW_* enums and conn_pattern 
declarations
common/connection.c-- conn_pattern creation/application
server/connecthand.h   -- user_action declarations
server/connecthand.c   -- the ACL implementation (viz. 
grant_access_level)
server/stdinhand.c -- commands for saving/loading/modifying the 
ACL (i.e. actionlist)

But there are some issues if you wish to incorporate this code into
2.1.x:
- Just looking at the code right now there are lots of obvious places
  that could be optimized and improved, not to mention that the style
  does not always follow the freeciv coding guidelines.
- Some of the code is dependent on other warclient additions (e.g.
  utility/wildcard.[ch]) or assumes that certain features exist
  (e.g. server async DNS).
- As I have been made aware, there is some issue with hostname= type
  patterns and async DNS resolution - some bugs due to the sequence
  of operations.
- The actual ACL definition file is a plain text file with it's own
  unique (although simple) format. Perhaps a .serverrc (a secfile) or
  something else would be better.
- username= type patterns are pretty useless without server AUTH support
  enabled and working (dependence on mysql).

Hence I am not sure our solution is, without some extensive
modifications, acceptable or appropriate to replace the hack mechanism
(e.g. as used to take control of a server that the client launches).

 The AUTH code here is cryptologically
 unsound.

I am slightly confused here in that you change subject to the database
auth code (i.e. server/auth.[ch]) - I assume you meant the hack
mechanism.

As an off-topic comment, no part of the freeciv communication
protocol is really cryptographically sound, but for the most part I
do not think it has to adhere to such stringent measures. Truth
be told, I have on more than one occasion been tempted to add a
dependence on libssl, e.g. so that even the server operator could
be considered an untrusted party.

 Did the AUTH [i.e. our ACL] code come from someplace special? 

No, yaro and I coded it up from scratch more than a year ago. Well, 
except wildcard.[ch], which I grabbed off the internet somewhere.

 Is there any reason to be backward compatible with anything?

With respect to preserving the hack mechanism, it is unlikely that
someone would only upgrade their client and not also their server,
so it would be safe to remove for future versions. That said, it
would seem unnecessary (except perhaps as an excessive measure to
improve security), since there is a capability (new_hack) that
controls its use (e.g. if a new mechanism is created, a new
capability can be introduced and the server can remain compatible with
older clients).



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


Re: [Freeciv-Dev] (PR#39960) reducing the number of *_info messages sent to client (pass 1)

2007-12-12 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39960 

After straightening twisted code paths, and examining verbose debug logs,
and much testing: only eliminated sending 2 game_info() and 1 player_info()
packets, which is not much return on the investment.

It does reveal that most game_info() packets are sent to update the number
of players!  That really doesn't belong in this packet

Committed trunk revision 14158.
Committed S2_2 revision 14159.
Committed S2_1 revision 14160.



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


[Freeciv-Dev] (PR#39965) Uncompressed Compressed savegames use differing whitespace

2007-12-12 Thread [EMAIL PROTECTED]

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39965 

I noticed that savegames using no compression (level 0) and savegames using 
compression (at least the default level 6) use completely different line end 
whitespace, and so the the two files yield more differences than content.  

I would expect that the game use one form of savegame whitespace consistently, 
or that the gzip library used use the same line end white space as the FreeCiv 
game does.  

Or perhaps WinRar is doing this to me... i dunno ;)



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


[Freeciv-Dev] (PR#39954) Savegame got corrupted - Bug? Cannot Meet with nations any longer.

2007-12-12 Thread

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39954 

Yes!  It had moved my units all about, i just thought save data from
something else just got overlay'd or injected into my savegame, but what
you say fits too.  

And in earlier versions (FC210) i'd not know which player i was in a
savegame because sometimes it would Load and have 30 AI and no Humans,
like in this savegame uploaded William stated this, but he chose
correctly, i was Dutch.  

I still do not know why William could Meet and all, i downloaded this
save game and i STILL could not Meet...!?  Is William running the FFC211
i am?  Is there a part of my .rc involved?  He could not see the Human
player but could Meet, I could not Meet, we both used the same file
here.  Perhaps it is the same bug, but my running a different ruleset
gives different quirks to it than William's ruleset??  Here's my ruleset
attached then if need be for it.

Thanks for posting your knowledge, this will save me alot of time
debugging!!


square.serv
Description: Binary data
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39961) Open trading tabs from previous turns have wrong data during current trading...

2007-12-12 Thread

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39961 

Diplomacy - not trading, my apologies, somebody pleae correct the title
of this report  =)

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


Re: [Freeciv-Dev] (PR#39959) SaveGame compression level changes when Leaving (re)Loading savegames!

2007-12-12 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39959 

Leave and Load is identical to Quit and Load, except that Quit also exits
the client, potentially saving the local client and message options.

You'll note in the Game menu that server options are separate.  But anybody
would think that save options on exit would do all 3 kinds of options.

That's a bug, and what I was trying to fix.  Not possible in 2.1 without a
huge packet reorganization, because many field structures are currently
defined (and unrelated fields are combined) in the game_info packet, not
separately in the server settings.  Bad design, from long ago.

Therefore, the general fix will have to wait for 2.2.  I'll try Jason's
hack for 2.1.



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