changeset 33218:f0c2a62e3e89

Position windows initially at coordinates given in skin file. So far, the initial positions of the main and subwindow were not the ones specified in the skin file, but fixed defaults.
author ib
date Sat, 23 Apr 2011 08:05:27 +0000
parents d5dbf016cd58
children 5f9eaf3eea63
files DOCS/xml/de/skin.xml DOCS/xml/en/skin.xml gui/app.c gui/cfg.c gui/interface.c
diffstat 5 files changed, 9 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/xml/de/skin.xml	Sat Apr 23 03:32:34 2011 +0000
+++ b/DOCS/xml/de/skin.xml	Sat Apr 23 08:05:27 2011 +0000
@@ -766,11 +766,6 @@
               kennzeichnen Breite und Höhe des Fensters; sie sind optional (wenn sie fehlen, hat
               das Fenster dieselbe Größe wie die Grafik).
             </para>
-            <note>
-              <para>
-                Die Koordinaten <literal>X,Y</literal> funktionieren im Moment nicht beim Unterfenster.
-              </para>
-            </note>
           </listitem>
         </varlistentry>
 
--- a/DOCS/xml/en/skin.xml	Sat Apr 23 03:32:34 2011 +0000
+++ b/DOCS/xml/en/skin.xml	Sat Apr 23 08:05:27 2011 +0000
@@ -642,11 +642,7 @@
   <literal>width</literal> and <literal>height</literal>
   denote the size of the window; they are optional (if they are missing, the
   window is the same size as the image).
-  </para>
-  <note><para>
-  The <literal>X,Y</literal> coordinates do not currently work for the subwindow.
-  </para></note>
-  </listitem>
+  </para></listitem>
 </varlistentry>
 
 <varlistentry>
--- a/gui/app.c	Sat Apr 23 03:32:34 2011 +0000
+++ b/gui/app.c	Sat Apr 23 08:05:27 2011 +0000
@@ -89,9 +89,6 @@
     appMPlayer.IndexOfMainItems = -1;
     appMPlayer.IndexOfBarItems  = -1;
     appMPlayer.IndexOfMenuItems = -1;
-
-    appMPlayer.sub.x = -1;   // NOTE TO MYSELF: is this really necessary?
-    appMPlayer.sub.y = -1;   // NOTE TO MYSELF: is this really necessary?
 }
 
 void appFreeStruct(void)
--- a/gui/cfg.c	Sat Apr 23 03:32:34 2011 +0000
+++ b/gui/cfg.c	Sat Apr 23 08:05:27 2011 +0000
@@ -91,10 +91,10 @@
 int gtkShowVideoWindow = 1;
 
 int gui_save_pos   = 1;
-int gui_main_pos_x = -2;
-int gui_main_pos_y = -2;
-int gui_sub_pos_x  = -1;
-int gui_sub_pos_y  = -1;
+int gui_main_pos_x = -3;
+int gui_main_pos_y = -3;
+int gui_sub_pos_x  = -3;
+int gui_sub_pos_y  = -3;
 
 static m_config_t *gui_conf;
 
--- a/gui/interface.c	Sat Apr 23 03:32:34 2011 +0000
+++ b/gui/interface.c	Sat Apr 23 08:05:27 2011 +0000
@@ -237,9 +237,13 @@
     }
 
     if (gui_save_pos) {
+        if (gui_main_pos_x != -3)
         appMPlayer.main.x = gui_main_pos_x;
+        if (gui_main_pos_y != -3)
         appMPlayer.main.y = gui_main_pos_y;
+        if (gui_sub_pos_x != -3)
         appMPlayer.sub.x  = gui_sub_pos_x;
+        if (gui_sub_pos_y != -3)
         appMPlayer.sub.y  = gui_sub_pos_y;
     }