summaryrefslogtreecommitdiff
path: root/gtk/gtkvolumebutton.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-07-08 03:30:47 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-13 19:40:49 +0200
commitbcc84948995b94dc51450eba48f7335e3150637c (patch)
treea61f012cd8dc37995f77bc9eb1b403bbe8eded52 /gtk/gtkvolumebutton.c
parent6fb0e3a09f234c18cfeefad4416cf1dfd075df1f (diff)
downloadgtk+-bcc84948995b94dc51450eba48f7335e3150637c.tar.gz
Use accessor functions to access GtkScaleButton
Diffstat (limited to 'gtk/gtkvolumebutton.c')
-rw-r--r--gtk/gtkvolumebutton.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkvolumebutton.c b/gtk/gtkvolumebutton.c
index 6352b002c9..bcf2a8e690 100644
--- a/gtk/gtkvolumebutton.c
+++ b/gtk/gtkvolumebutton.c
@@ -70,6 +70,7 @@ gtk_volume_button_init (GtkVolumeButton *button)
{
GtkScaleButton *sbutton = GTK_SCALE_BUTTON (button);
GtkObject *adj;
+ GtkWidget *minus_button, *plus_button;
const char *icons[] = {
"audio-volume-muted",
"audio-volume-high",
@@ -86,17 +87,20 @@ gtk_volume_button_init (GtkVolumeButton *button)
1,
_("Adjusts the volume"));
- atk_object_set_name (gtk_widget_get_accessible (sbutton->minus_button),
+ minus_button = gtk_scale_button_get_minus_button (sbutton);
+ plus_button = gtk_scale_button_get_plus_button (sbutton);
+
+ atk_object_set_name (gtk_widget_get_accessible (minus_button),
_("Volume Down"));
- atk_object_set_description (gtk_widget_get_accessible (sbutton->minus_button),
+ atk_object_set_description (gtk_widget_get_accessible (minus_button),
_("Decreases the volume"));
- gtk_widget_set_tooltip_text (sbutton->minus_button, _("Volume Down"));
+ gtk_widget_set_tooltip_text (minus_button, _("Volume Down"));
- atk_object_set_name (gtk_widget_get_accessible (sbutton->plus_button),
+ atk_object_set_name (gtk_widget_get_accessible (plus_button),
_("Volume Up"));
- atk_object_set_description (gtk_widget_get_accessible (sbutton->plus_button),
+ atk_object_set_description (gtk_widget_get_accessible (plus_button),
_("Increases the volume"));
- gtk_widget_set_tooltip_text (sbutton->plus_button, _("Volume Up"));
+ gtk_widget_set_tooltip_text (plus_button, _("Volume Up"));
gtk_scale_button_set_icons (sbutton, icons);