aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-03-31 15:31:08 +0100
committerConor Curran <conor.curran@canonical.com>2010-03-31 15:31:08 +0100
commit3933b7c64c59cfd4e1463e4ef4aee41e04bc1764 (patch)
tree43bc8f783bd83df9e96f8e751f035ead1c9f3c56 /src
parent5f6b6835f032fe69f01b1fff2e57e1e0cec00fab (diff)
parent0120abf822211adae0d055de1098db6145aaee51 (diff)
downloadayatana-indicator-sound-3933b7c64c59cfd4e1463e4ef4aee41e04bc1764.tar.gz
ayatana-indicator-sound-3933b7c64c59cfd4e1463e4ef4aee41e04bc1764.tar.bz2
ayatana-indicator-sound-3933b7c64c59cfd4e1463e4ef4aee41e04bc1764.zip
the step size of the scrolling on the icon on the panel has been increased inline with the bug report
Diffstat (limited to 'src')
-rw-r--r--src/indicator-sound.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 09faff1..6c8f4e1 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -85,10 +85,8 @@ static void scroll (IndicatorObject*io, gint delta, IndicatorScrollDirec
//Slider related
static GtkWidget *volume_slider = NULL;
static gboolean new_slider_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);
-/*static void slider_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, GtkWidget *widget);*/
static gboolean value_changed_event_cb(GtkRange *range, gpointer user_data);
static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data);
-/*static void slider_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data);*/
static void slider_grabbed(GtkWidget *widget, gpointer user_data);
static void slider_released(GtkWidget *widget, gpointer user_data);
@@ -122,11 +120,12 @@ static gint previous_state = 0;
static gdouble initial_volume_percent = 0;
static gboolean initial_mute ;
static gboolean device_available;
-static gboolean slider_in_direct_use;
+static gboolean slider_in_direct_use = FALSE;
static GtkIconSize design_team_size;
static gint blocked_id;
static gint animation_id;
+
static GList * blocked_animation_list = NULL;
static GList * blocked_iter = NULL;
static void prepare_blocked_animation();
@@ -271,7 +270,6 @@ static gboolean new_slider_item(DbusmenuMenuitem * newitem, DbusmenuMenuitem * p
g_signal_connect(slider, "value-changed", G_CALLBACK(value_changed_event_cb), newitem);
g_signal_connect(volume_slider, "slider-grabbed", G_CALLBACK(slider_grabbed), NULL);
g_signal_connect(volume_slider, "slider-released", G_CALLBACK(slider_released), NULL);
-/* g_signal_connect(slider, "size-allocate", G_CALLBACK(slider_size_allocate), NULL);*/
// Set images on the ido
GtkWidget* primary_image = ido_scale_menu_item_get_primary_image((IdoScaleMenuItem*)volume_slider);
@@ -285,6 +283,10 @@ static gboolean new_slider_item(DbusmenuMenuitem * newitem, DbusmenuMenuitem * p
g_object_unref(secondary_gicon);
gtk_widget_set_sensitive(volume_slider, !initial_mute);
+
+ GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (slider));
+ gtk_adjustment_set_step_increment(adj, 3);
+
gtk_widget_show_all(volume_slider);
return TRUE;
@@ -692,12 +694,15 @@ 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));
+
+ //g_debug("the scroll step size = %f", adj->step_increment);
- if (direction == INDICATOR_OBJECT_SCROLL_UP)
- value += adj->step_increment;
- else
- value -= adj->step_increment;
-
+ if (direction == INDICATOR_OBJECT_SCROLL_UP){
+ value += adj->step_increment;
+ }
+ else{
+ value -= adj->step_increment;
+ }
gtk_range_set_value (GTK_RANGE (sound->slider),
- value);
+ value);
}