aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2008-11-19 14:48:34 -0600
committerTed Gould <ted@canonical.com>2008-11-19 14:48:34 -0600
commit9d3a43aca6398a3c11c2b3cdc21beaa3ff0e21ae (patch)
tree10e8ad3a0822ba339c363e6db18562ce582a5a29
parent04153d7d65573ee2dd0a19ca51aeb3b3e6b99a8d (diff)
downloadlibayatana-indicator-9d3a43aca6398a3c11c2b3cdc21beaa3ff0e21ae.tar.gz
libayatana-indicator-9d3a43aca6398a3c11c2b3cdc21beaa3ff0e21ae.tar.bz2
libayatana-indicator-9d3a43aca6398a3c11c2b3cdc21beaa3ff0e21ae.zip
Getting all the widgets in the menu item. Doesn't quite work right, but the widgets are there.
-rw-r--r--src/indicator-audio.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/indicator-audio.c b/src/indicator-audio.c
index c678bab..87f9284 100644
--- a/src/indicator-audio.c
+++ b/src/indicator-audio.c
@@ -10,9 +10,33 @@ create_output_menu_item (void)
GtkWidget * label_hbox = gtk_hbox_new(FALSE, 12);
GtkWidget * label = gtk_label_new("Volume:");
- gtk_box_pack_end(GTK_BOX(label_hbox), label, TRUE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(label_hbox), label, TRUE, FALSE, 0);
gtk_widget_show(label);
+ GtkWidget * slider_hbox = gtk_hbox_new(FALSE, 3);
+
+ GtkWidget * mute_button = gtk_button_new();
+ GtkWidget * mute_icon = gtk_image_new_from_icon_name("audio-volume-low", GTK_ICON_SIZE_MENU);
+ gtk_container_add(GTK_CONTAINER(mute_button), mute_icon);
+ gtk_widget_show(mute_icon);
+ gtk_box_pack_start(GTK_BOX(slider_hbox), mute_button, FALSE, FALSE, 3);
+ gtk_widget_show(mute_button);
+
+ GtkWidget * scale = gtk_hscale_new_with_range(0.0, 1.0, 0.1);
+ gtk_scale_set_digits(GTK_SCALE(scale), 2);
+ gtk_scale_set_draw_value(GTK_SCALE(scale), FALSE);
+ gtk_box_pack_start(GTK_BOX(slider_hbox), scale, TRUE, TRUE, 3);
+ gtk_widget_show(scale);
+
+ GtkWidget * max_button = gtk_button_new();
+ GtkWidget * max_icon = gtk_image_new_from_icon_name("audio-volume-high", GTK_ICON_SIZE_MENU);
+ gtk_container_add(GTK_CONTAINER(max_button), max_icon);
+ gtk_widget_show(max_icon);
+ gtk_box_pack_start(GTK_BOX(slider_hbox), max_button, FALSE, FALSE, 3);
+ gtk_widget_show(max_button);
+
+ gtk_box_pack_start(GTK_BOX(label_hbox), slider_hbox, TRUE, TRUE, 0);
+ gtk_widget_show(slider_hbox);
gtk_container_add(GTK_CONTAINER(menuitem), label_hbox);
gtk_widget_show(label_hbox);