changeset 1778:1d3d05c541d3 trunk

[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
author nenolod
date Wed, 04 Oct 2006 02:31:31 -0700
parents 17e38b5c8e2f
children 87d4da9b31ea
files ChangeLog audacious/mainwin.c audacious/widgets/skin.c audacious/widgets/skin.h
diffstat 4 files changed, 125 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 04 02:22:04 2006 -0700
+++ b/ChangeLog	Wed Oct 04 02:31:31 2006 -0700
@@ -1,3 +1,13 @@
+2006-10-04 09:22:04 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2511]
+  - support for the [skin.hints:mainwinTextWidth] property.
+  
+  trunk/audacious/mainwin.c      |    4 ++++
+  trunk/audacious/widgets/skin.c |    8 ++++++++
+  trunk/audacious/widgets/skin.h |    1 +
+  3 files changed, 13 insertions(+)
+
+
 2006-10-04 09:21:05 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [2509]
   - make audacious re-link when libwidgets.a has been updated.
--- a/audacious/mainwin.c	Wed Oct 04 02:22:04 2006 -0700
+++ b/audacious/mainwin.c	Wed Oct 04 02:31:31 2006 -0700
@@ -845,6 +845,26 @@
     if (bmp_active_skin->properties.mainwin_infobar_x && bmp_active_skin->properties.mainwin_infobar_y)
 	widget_move(WIDGET(mainwin_othertext), bmp_active_skin->properties.mainwin_infobar_x,
 		bmp_active_skin->properties.mainwin_infobar_y);
+
+    if (bmp_active_skin->properties.mainwin_number_0_x && bmp_active_skin->properties.mainwin_number_0_y)
+	widget_move(WIDGET(mainwin_minus_num), bmp_active_skin->properties.mainwin_number_0_x,
+		bmp_active_skin->properties.mainwin_number_0_y);
+
+    if (bmp_active_skin->properties.mainwin_number_1_x && bmp_active_skin->properties.mainwin_number_1_y)
+	widget_move(WIDGET(mainwin_10min_num), bmp_active_skin->properties.mainwin_number_1_x,
+		bmp_active_skin->properties.mainwin_number_1_y);
+
+    if (bmp_active_skin->properties.mainwin_number_2_x && bmp_active_skin->properties.mainwin_number_2_y)
+	widget_move(WIDGET(mainwin_min_num), bmp_active_skin->properties.mainwin_number_2_x,
+		bmp_active_skin->properties.mainwin_number_2_y);
+
+    if (bmp_active_skin->properties.mainwin_number_3_x && bmp_active_skin->properties.mainwin_number_3_y)
+	widget_move(WIDGET(mainwin_10sec_num), bmp_active_skin->properties.mainwin_number_3_x,
+		bmp_active_skin->properties.mainwin_number_3_y);
+
+    if (bmp_active_skin->properties.mainwin_number_4_x && bmp_active_skin->properties.mainwin_number_4_y)
+	widget_move(WIDGET(mainwin_sec_num), bmp_active_skin->properties.mainwin_number_4_x,
+		bmp_active_skin->properties.mainwin_number_4_y);
 }
 
 void
--- a/audacious/widgets/skin.c	Wed Oct 04 02:22:04 2006 -0700
+++ b/audacious/widgets/skin.c	Wed Oct 04 02:31:31 2006 -0700
@@ -607,6 +607,86 @@
         g_free(tmp);
     }
 
+    tmp = read_ini_string(filename, "skin", "mainwinNumber0X");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_0_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber0Y");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_0_y = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber1X");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_1_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber1Y");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_1_y = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber2X");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_2_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber2Y");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_2_y = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber3X");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_3_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber3Y");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_3_y = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber4X");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_4_x = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinNumber4Y");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_number_4_y = atoi(tmp);
+        g_free(tmp);
+    }
+
     g_free(filename);
 }
 
--- a/audacious/widgets/skin.h	Wed Oct 04 02:22:04 2006 -0700
+++ b/audacious/widgets/skin.h	Wed Oct 04 02:31:31 2006 -0700
@@ -80,6 +80,21 @@
 	gint mainwin_text_width;
 	gint mainwin_infobar_x;
 	gint mainwin_infobar_y;
+
+	gint mainwin_number_0_x;
+	gint mainwin_number_0_y;
+
+	gint mainwin_number_1_x;
+	gint mainwin_number_1_y;
+
+	gint mainwin_number_2_x;
+	gint mainwin_number_2_y;
+
+	gint mainwin_number_3_x;
+	gint mainwin_number_3_y;
+
+	gint mainwin_number_4_x;
+	gint mainwin_number_4_y;
 } SkinProperties;
 
 #define SKIN_PIXMAP(x)  ((SkinPixmap *)(x))