aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-audio.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2008-11-20 17:04:30 -0600
committerTed Gould <ted@canonical.com>2008-11-20 17:04:30 -0600
commita29584a83acfabcfe173441ebe8e3a2369c39e80 (patch)
treedac18cd9405718e26b3e03c7bbe00cd052fddb58 /src/indicator-audio.c
parent712bddcdd12a7f4ee16bf9b1e2bdce9fe35bde46 (diff)
downloadlibayatana-indicator-a29584a83acfabcfe173441ebe8e3a2369c39e80.tar.gz
libayatana-indicator-a29584a83acfabcfe173441ebe8e3a2369c39e80.tar.bz2
libayatana-indicator-a29584a83acfabcfe173441ebe8e3a2369c39e80.zip
Clean compile, but something is broken in the _init function. Not sure what.
Diffstat (limited to 'src/indicator-audio.c')
-rw-r--r--src/indicator-audio.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/src/indicator-audio.c b/src/indicator-audio.c
index 5d2dbdc..48acaa3 100644
--- a/src/indicator-audio.c
+++ b/src/indicator-audio.c
@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
+#include "slidermenuitem.h"
#include "indicator-audio.h"
void
@@ -14,42 +15,7 @@ block_prelight (GtkWidget * widget, GtkStateType prev, gpointer data)
GtkWidget *
create_output_menu_item (void)
{
- GtkWidget * menuitem = gtk_menu_item_new();
- g_signal_connect(G_OBJECT(menuitem), "state-changed", G_CALLBACK(block_prelight), NULL);
-
- GtkWidget * label_hbox = gtk_hbox_new(FALSE, 12);
-
- GtkWidget * label = gtk_label_new("Volume:");
- 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);
+ GtkWidget * menuitem = slider_menu_item_new("Volume:", 0.0, 1.0, 0.02);
return menuitem;
}