changeset 1857:2ed05cc57194 trunk

[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY - make Osmosis mainwin 425x100 instead of 425x105 - reposition the minimize, shade and close buttons on the Osmosis skin.
author nenolod
date Wed, 11 Oct 2006 18:23:22 -0700
parents 6597c7bd11d9
children ea26e65372be
files ChangeLog audacious/mainwin.c audacious/widgets/skin.c audacious/widgets/skin.h skins/Osmosis/skin.hints
diffstat 5 files changed, 93 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 11 17:53:03 2006 -0700
+++ b/ChangeLog	Wed Oct 11 18:23:22 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-12 00:53:03 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2669]
+  - avoid recreating the window unless an actual size-dimensional change has occured.
+  
+  trunk/audacious/mainwin.c |   52 +++++++++++++++++++++++++++-------------------
+  1 file changed, 31 insertions(+), 21 deletions(-)
+
+
 2006-10-12 00:47:31 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2667]
   - don't use hardcoded values for the time indicator area
--- a/audacious/mainwin.c	Wed Oct 11 17:53:03 2006 -0700
+++ b/audacious/mainwin.c	Wed Oct 11 18:23:22 2006 -0700
@@ -951,6 +951,18 @@
 	widget_move(WIDGET(mainwin_about), bmp_active_skin->properties.mainwin_about_x,
 		bmp_active_skin->properties.mainwin_about_y);
 
+    if (bmp_active_skin->properties.mainwin_minimize_x && bmp_active_skin->properties.mainwin_minimize_y)
+	widget_move(WIDGET(mainwin_minimize), bmp_active_skin->properties.mainwin_minimize_x,
+		bmp_active_skin->properties.mainwin_minimize_y);
+
+    if (bmp_active_skin->properties.mainwin_shade_x && bmp_active_skin->properties.mainwin_shade_y)
+	widget_move(WIDGET(mainwin_shade), bmp_active_skin->properties.mainwin_shade_x,
+		bmp_active_skin->properties.mainwin_shade_y);
+
+    if (bmp_active_skin->properties.mainwin_close_x && bmp_active_skin->properties.mainwin_close_y)
+	widget_move(WIDGET(mainwin_close), bmp_active_skin->properties.mainwin_close_x,
+		bmp_active_skin->properties.mainwin_close_y);
+
     /* visibility attributes */
     if (bmp_active_skin->properties.mainwin_menurow_visible)
         widget_show(WIDGET(mainwin_menurow));
--- a/audacious/widgets/skin.c	Wed Oct 11 17:53:03 2006 -0700
+++ b/audacious/widgets/skin.c	Wed Oct 11 18:23:22 2006 -0700
@@ -1068,6 +1068,60 @@
         g_free(tmp);
     }
 
+    skin->properties.mainwin_minimize_x = 244;
+    tmp = read_ini_string(filename, "skin", "mainwinMinimizeX");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_minimize_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    skin->properties.mainwin_minimize_y = 3;
+    tmp = read_ini_string(filename, "skin", "mainwinMinimizeY");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_minimize_y = atoi(tmp);
+        g_free(tmp);
+    }
+
+    skin->properties.mainwin_shade_x = 254;
+    tmp = read_ini_string(filename, "skin", "mainwinShadeX");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_shade_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    skin->properties.mainwin_shade_y = 3;
+    tmp = read_ini_string(filename, "skin", "mainwinShadeY");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_shade_y = atoi(tmp);
+        g_free(tmp);
+    }
+
+    skin->properties.mainwin_close_x = 264;
+    tmp = read_ini_string(filename, "skin", "mainwinCloseX");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_close_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    skin->properties.mainwin_close_y = 3;
+    tmp = read_ini_string(filename, "skin", "mainwinCloseY");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_close_y = atoi(tmp);
+        g_free(tmp);
+    }
+
     if (filename != NULL)
         g_free(filename);
 }
--- a/audacious/widgets/skin.h	Wed Oct 11 17:53:03 2006 -0700
+++ b/audacious/widgets/skin.h	Wed Oct 11 18:23:22 2006 -0700
@@ -152,6 +152,15 @@
 	gint mainwin_about_x;
 	gint mainwin_about_y;
 
+	gint mainwin_minimize_x;
+	gint mainwin_minimize_y;
+
+	gint mainwin_shade_x;
+	gint mainwin_shade_y;
+
+	gint mainwin_close_x;
+	gint mainwin_close_y;
+
 	gint mainwin_width;
 	gint mainwin_height;
 
--- a/skins/Osmosis/skin.hints	Wed Oct 11 17:53:03 2006 -0700
+++ b/skins/Osmosis/skin.hints	Wed Oct 11 18:23:22 2006 -0700
@@ -32,7 +32,7 @@
 mainwinVisVisible=1
 mainwinMenurowVisible=0
 mainwinWidth=425
-mainwinHeight=105
+mainwinHeight=100
 mainwinPreviousX=5
 mainwinPreviousY=48
 mainwinPlayX=33
@@ -53,5 +53,12 @@
 mainwinShuffleY=22
 mainwinRepeatX=355
 mainwinRepeatY=22
-mainwinAboutX=0
-mainwinAboutY=0
+mainwinAboutX=999
+mainwinAboutY=999
+mainwinMinimizeX=393
+mainwinMinimizeY=3
+mainwinShadeX=403
+mainwinShadeY=3
+mainwinCloseX=413
+mainwinCloseY=3
+