changeset 1792:b8f082ddd9f1 trunk

[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
author nenolod
date Wed, 04 Oct 2006 19:39:30 -0700
parents 15c92d5aebcd
children 1ccc69c49768
files ChangeLog audacious/mainwin.c audacious/widgets/skin.c audacious/widgets/skin.h
diffstat 4 files changed, 57 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 04 19:00:09 2006 -0700
+++ b/ChangeLog	Wed Oct 04 19:39:30 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-05 02:00:09 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2539]
+  - really preserve the old message on othertext info
+  
+  trunk/audacious/mainwin.c |    6 ++++--
+  1 file changed, 4 insertions(+), 2 deletions(-)
+
+
 2006-10-05 01:52:37 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2537]
   - another oops in my oops fix, sorry
--- a/audacious/mainwin.c	Wed Oct 04 19:00:09 2006 -0700
+++ b/audacious/mainwin.c	Wed Oct 04 19:39:30 2006 -0700
@@ -908,6 +908,21 @@
         widget_show(WIDGET(mainwin_menurow));
     else
         widget_hide(WIDGET(mainwin_menurow));
+
+    if (bmp_active_skin->properties.mainwin_text_visible)
+        widget_show(WIDGET(mainwin_info));
+    else
+        widget_hide(WIDGET(mainwin_info));
+
+    if (bmp_active_skin->properties.mainwin_othertext_visible)
+        widget_show(WIDGET(mainwin_othertext));
+    else
+        widget_hide(WIDGET(mainwin_othertext));
+
+    if (bmp_active_skin->properties.mainwin_vis_visible)
+        widget_show(WIDGET(mainwin_vis));
+    else
+        widget_hide(WIDGET(mainwin_vis));
 }
 
 void
--- a/audacious/widgets/skin.c	Wed Oct 04 19:00:09 2006 -0700
+++ b/audacious/widgets/skin.c	Wed Oct 04 19:39:30 2006 -0700
@@ -781,6 +781,30 @@
         g_free(tmp);
     }
 
+    tmp = read_ini_string(filename, "skin", "mainwinOthertextVisible");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_othertext_visible = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinTextVisible");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_text_visible = atoi(tmp);
+        g_free(tmp);
+    }
+
+    tmp = read_ini_string(filename, "skin", "mainwinVisVisible");
+
+    if (tmp != NULL)
+    {
+        skin->properties.mainwin_vis_visible = atoi(tmp);
+        g_free(tmp);
+    }
+
     g_free(filename);
 }
 
--- a/audacious/widgets/skin.h	Wed Oct 04 19:00:09 2006 -0700
+++ b/audacious/widgets/skin.h	Wed Oct 04 19:39:30 2006 -0700
@@ -72,15 +72,25 @@
 } SkinColorId;
 
 typedef struct _SkinProperties {
+	/* this enables the othertext engine, not it's visibility -nenolod */
 	gboolean mainwin_othertext;
+
+	/* Vis properties */
 	gint mainwin_vis_x;
 	gint mainwin_vis_y;
 	gint mainwin_vis_width;
+	gboolean mainwin_vis_visible;
+
+	/* Text properties */
 	gint mainwin_text_x;
 	gint mainwin_text_y;
 	gint mainwin_text_width;
+	gboolean mainwin_text_visible;
+
+	/* Infobar properties */
 	gint mainwin_infobar_x;
 	gint mainwin_infobar_y;
+	gboolean mainwin_othertext_visible;
 
 	gint mainwin_number_0_x;
 	gint mainwin_number_0_y;