[Freeciv-Dev] (PR#39482) Themes directory hierarchy is not consistent

2007-08-04 Thread Marko Lindqvist

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

 Directory hierarchy under data/themes is not consistent.

 - We have sdl theme 'human' in directory gui-sdl/human ($client/$theme)
 - Current version of this Freeciv theme is Freeciv/gtk-2.0 ($theme/$client)
 - In addition we have directory 'common' (common to what? client or
theme or both?) and 'morgan/640x480' ($theme/$subtheme, no client
information at all).

 I favor Freeciv theme style $theme/$client[/$subtheme] hierarchy.
Anyway, I'd like correct style decided before committing more stuff
(Freeciv theme) to that directory.


 - ML



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


Re: [Freeciv-Dev] (PR#39482) Themes directory hierarchy is not consistent

2007-08-04 Thread Marko Lindqvist

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

On 04/08/07, Marko Lindqvist [EMAIL PROTECTED] wrote:

  I favor Freeciv theme style $theme/$client[/$subtheme] hierarchy.

 Umh, I just added $subtheme part without thinking. Actually I think
that only workable solution is $client/$theme[/$subtheme]


 - ML



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


[Freeciv-Dev] (PR#39482) Themes directory hierarchy is not consistent

2007-08-04 Thread Christian Prochaska

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

 [EMAIL PROTECTED] - Sa 04. Aug 2007, 11:41:52]:
 
  Directory hierarchy under data/themes is not consistent.
 
  - We have sdl theme 'human' in directory gui-sdl/human ($client/$theme)

yes

  - Current version of this Freeciv theme is Freeciv/gtk-2.0
($theme/$client)

that's actually ($theme/$subtheme). The gtk-2.0 subdirectory is part
of every theme for GTK+ 2.0.

  - In addition we have directory 'common' (common to what? client or
 theme or both?) 

I guess it was meant common to (gui-ftwl) theme. 

 and 'morgan/640x480' ($theme/$subtheme, no client
 information at all).

client is gui-ftwl

I'll move common and morgan into a gui-ftwl subdirectory. Patch
for the ftwl client is attached.

Index: utility/ftwl/theme_engine.c
===
--- utility/ftwl/theme_engine.c	(Revision 13149)
+++ utility/ftwl/theme_engine.c	(Arbeitskopie)
@@ -74,7 +74,7 @@
   my_snprintf(current_res, sizeof(current_res), %dx%d, size.width,
 	  size.height);
 
-  my_snprintf(filename, sizeof(filename), themes/%s/%s/%s,
+  my_snprintf(filename, sizeof(filename), themes/gui-ftwl/%s/%s/%s,
 	  current_theme, current_res, example_file);
   if (!datafilename(filename)) {
 freelog(LOG_FATAL, ERROR: There is no theme '%s' in resolution '%s'.,
@@ -92,13 +92,13 @@
   char prefix[prefixes][512];
   int i;
 
-  my_snprintf(prefix[0], sizeof(prefix[0]), themes/%s/%s/, current_theme,
+  my_snprintf(prefix[0], sizeof(prefix[0]), themes/gui-ftwl/%s/%s/, current_theme,
 	  current_res);
-  my_snprintf(prefix[1], sizeof(prefix[1]), themes/%s/, current_theme);
-  my_snprintf(prefix[2], sizeof(prefix[2]), themes/common/%s/,
+  my_snprintf(prefix[1], sizeof(prefix[1]), themes/gui-ftwl/%s/, current_theme);
+  my_snprintf(prefix[2], sizeof(prefix[2]), themes/gui-ftwl/common/%s/,
 	  current_res);
-  my_snprintf(prefix[3], sizeof(prefix[3]), themes/common/);
-  my_snprintf(prefix[4], sizeof(prefix[4]), themes/);
+  my_snprintf(prefix[3], sizeof(prefix[3]), themes/gui-ftwl/common/);
+  my_snprintf(prefix[4], sizeof(prefix[4]), themes/gui-ftwl/);
   my_snprintf(prefix[5], sizeof(prefix[5]), %s, );
 
   for (i = 0; i  prefixes; i++) {
@@ -608,7 +608,7 @@
   struct section_file *result = fc_malloc(sizeof(*result));
   char filename[512],*tmp;
 
-  my_snprintf(filename, sizeof(filename), themes/%s/%s/%s,
+  my_snprintf(filename, sizeof(filename), themes/gui-ftwl/%s/%s/%s,
 	  current_theme, current_res, name);
   tmp = datafilename_required(filename);
 
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev