Use accessor functions to access GtkScaleButton
This commit is contained in:
@ -999,7 +999,7 @@ create_volume_button (void)
|
|||||||
button = gtk_volume_button_new ();
|
button = gtk_volume_button_new ();
|
||||||
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), 33);
|
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), 33);
|
||||||
/* Hack: get the private dock */
|
/* Hack: get the private dock */
|
||||||
widget = GTK_SCALE_BUTTON (button)->plus_button->parent->parent->parent;
|
widget = gtk_scale_button_get_plus_button (GTK_SCALE_BUTTON (button))->parent->parent->parent;
|
||||||
gtk_widget_show_all (widget);
|
gtk_widget_show_all (widget);
|
||||||
return new_widget_info ("volumebutton", widget, ASIS);
|
return new_widget_info ("volumebutton", widget, ASIS);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,6 +70,7 @@ gtk_volume_button_init (GtkVolumeButton *button)
|
|||||||
{
|
{
|
||||||
GtkScaleButton *sbutton = GTK_SCALE_BUTTON (button);
|
GtkScaleButton *sbutton = GTK_SCALE_BUTTON (button);
|
||||||
GtkObject *adj;
|
GtkObject *adj;
|
||||||
|
GtkWidget *minus_button, *plus_button;
|
||||||
const char *icons[] = {
|
const char *icons[] = {
|
||||||
"audio-volume-muted",
|
"audio-volume-muted",
|
||||||
"audio-volume-high",
|
"audio-volume-high",
|
||||||
@ -86,17 +87,20 @@ gtk_volume_button_init (GtkVolumeButton *button)
|
|||||||
1,
|
1,
|
||||||
_("Adjusts the volume"));
|
_("Adjusts the volume"));
|
||||||
|
|
||||||
atk_object_set_name (gtk_widget_get_accessible (sbutton->minus_button),
|
minus_button = gtk_scale_button_get_minus_button (sbutton);
|
||||||
_("Volume Down"));
|
plus_button = gtk_scale_button_get_plus_button (sbutton);
|
||||||
atk_object_set_description (gtk_widget_get_accessible (sbutton->minus_button),
|
|
||||||
_("Decreases the volume"));
|
|
||||||
gtk_widget_set_tooltip_text (sbutton->minus_button, _("Volume Down"));
|
|
||||||
|
|
||||||
atk_object_set_name (gtk_widget_get_accessible (sbutton->plus_button),
|
atk_object_set_name (gtk_widget_get_accessible (minus_button),
|
||||||
|
_("Volume Down"));
|
||||||
|
atk_object_set_description (gtk_widget_get_accessible (minus_button),
|
||||||
|
_("Decreases the volume"));
|
||||||
|
gtk_widget_set_tooltip_text (minus_button, _("Volume Down"));
|
||||||
|
|
||||||
|
atk_object_set_name (gtk_widget_get_accessible (plus_button),
|
||||||
_("Volume Up"));
|
_("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"));
|
_("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);
|
gtk_scale_button_set_icons (sbutton, icons);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user