ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01245
[Merge] lp:~cjcurran/indicator-sound/remaining-scrolling-bugs into lp:indicator-sound
Conor Curran has proposed merging lp:~cjcurran/indicator-sound/remaining-scrolling-bugs into lp:indicator-sound.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
--
https://code.launchpad.net/~cjcurran/indicator-sound/remaining-scrolling-bugs/+merge/21663
Your team ayatana-commits is subscribed to branch lp:indicator-sound.
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2010-03-12 10:56:56 +0000
+++ src/Makefile.am 2010-03-18 18:13:21 +0000
@@ -13,7 +13,7 @@
dbus-shared-names.h \
sound-service-client.h
-libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror
+libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror -DG_LOG_DOMAIN=\"Indicator-Sound\"
libsoundmenu_la_LIBADD = $(APPLET_LIBS)
libsoundmenu_la_LDFLAGS = -module -avoid-version
=== modified file 'src/indicator-sound.c'
--- src/indicator-sound.c 2010-03-17 06:23:33 +0000
+++ src/indicator-sound.c 2010-03-18 18:13:21 +0000
@@ -249,7 +249,7 @@
io = g_object_get_data (G_OBJECT (client), "indicator");
- volume_slider = ido_scale_menu_item_new_with_range ("Volume", initial_volume_percent, 0, 100, 0.5);
+ volume_slider = ido_scale_menu_item_new_with_range ("Volume", initial_volume_percent, 0, 100, 1);
g_object_set(volume_slider, "reverse-scroll-events", TRUE, NULL);
g_signal_connect (volume_slider,
@@ -671,15 +671,18 @@
static void
scroll (IndicatorObject *io, gint delta, IndicatorScrollDirection direction)
{
- IndicatorSound *sound = INDICATOR_SOUND (io);
- GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (sound->slider));
- gdouble value = gtk_range_get_value (GTK_RANGE (sound->slider));
-
- if (direction == INDICATOR_OBJECT_SCROLL_UP)
+ if (device_available == FALSE || current_state == STATE_MUTED)
+ return;
+
+ IndicatorSound *sound = INDICATOR_SOUND (io);
+ GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (sound->slider));
+ gdouble value = gtk_range_get_value (GTK_RANGE (sound->slider));
+
+ if (direction == INDICATOR_OBJECT_SCROLL_UP)
value += adj->step_increment;
- else
+ else
value -= adj->step_increment;
- gtk_range_set_value (GTK_RANGE (sound->slider),
+ gtk_range_set_value (GTK_RANGE (sound->slider),
value);
}
Follow ups