Index: applet.c
===================================================================
--- applet.c	(revision 10436)
+++ applet.c	(working copy)
@@ -664,6 +664,8 @@
   for (tracks = g_list_first (applet->tracks); tracks; tracks = tracks->next)
     gst_mixer_set_mute (applet->mixer, tracks->data, !mute);
 
+  g_message ("set: mute %d", !mute);
+
   if (mute) {
     /* sync back actual volume */
     cb_volume (adj, applet);
@@ -990,15 +992,24 @@
 {
   int range = track->max_volume - track->min_volume;
   gdouble scale = ((gdouble) range) / 100;
-  int *volumes, n;
+  int *volumes, n, volint;
 
-  volume *= scale;
-  volume += track->min_volume;
+  if (volume == 1.0) {
+    volint = track->max_volume;
+  } else if (volume == 0.0) {
+    volint = track->min_volume;
+  } else {
+    volume *= scale;
+    volume += track->min_volume;
+    volint = lrint (volume);
+  }
 
   volumes = g_new (gint, track->num_channels);
   for (n = 0; n < track->num_channels; n++)
-    volumes[n] = lrint (volume);
+    volumes[n] = volint;
   gst_mixer_set_volume (mixer, track, volumes);
+
+  g_message ("set: volume %d", volint);
   g_free (volumes);
 }
 
@@ -1065,15 +1076,18 @@
   GdkPixbuf *pixbuf;
   gint n;
   gdouble volume;
-  gboolean mute, did_change;
+  gboolean show_mute, mute, did_change;
   gchar *tooltip_str;
   GstMixerTrack *first_track;
   GString *track_names;
   GList *iter;
 
+  show_mute = mute = 0;
+
   if (!applet->mixer) {
     n = 0;
-    mute = FALSE;
+    show_mute = 1;
+    mute = 0;
   } else if (!applet->tracks) {
     return;
   } else {
@@ -1081,9 +1095,9 @@
     first_track = g_list_first (applet->tracks)->data;
     volume = gnome_volume_applet_get_volume (applet->mixer, first_track);
     mute = GST_MIXER_TRACK_HAS_FLAG (first_track,
-				     GST_MIXER_TRACK_MUTE);
+				     GST_MIXER_TRACK_MUTE) ? 1 : 0;
     if (volume <= 0) {
-	mute = TRUE;
+	show_mute = 1;
 	n = 0;
     }
     else {
@@ -1096,12 +1110,14 @@
     }
   }
 
+  g_message ("get: volume %f (scale %f) mute %d %d", volume, gtk_adjustment_get_value (gtk_range_get_adjustment (applet->dock->scale)), mute, show_mute);
+
   did_change = (force_refresh || (STATE (volume, mute) != applet->state) ||
       applet->force_next_update);
   applet->force_next_update = FALSE;
 
   if (did_change) {
-    if (mute) {
+    if (show_mute) {
       pixbuf = applet->pix[0];
     } else {
       pixbuf = applet->pix[n];
@@ -1125,7 +1141,7 @@
       track_names = g_string_append (track_names, track->label);
   }
 
-  if (mute) {
+  if (show_mute) {
     tooltip_str = g_strdup_printf (_("%s: muted"), track_names->str);
   } else {
     /* Translator comment: I'm not all too sure if this makes sense
