diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-01-27 16:23:36 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-01-27 16:23:36 +0000 |
commit | 170afb3ecc0e216a34945eb31a9743d86bf9c325 (patch) | |
tree | 730135511e4101a2ae609729003c4486571ad122 /src/indicator-sound.c | |
parent | 5a86d06d8019cd9a827f69839d23268a2a6ebc51 (diff) | |
download | ayatana-indicator-sound-170afb3ecc0e216a34945eb31a9743d86bf9c325.tar.gz ayatana-indicator-sound-170afb3ecc0e216a34945eb31a9743d86bf9c325.tar.bz2 ayatana-indicator-sound-170afb3ecc0e216a34945eb31a9743d86bf9c325.zip |
signals now work, also pulling in slider
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r-- | src/indicator-sound.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 64a6688..ed7de27 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -25,7 +25,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <glib-object.h> #include <gtk/gtk.h> #include <libdbusmenu-gtk/menu.h> -/*#include <idoscalemenuitem.h>*/ +#include <idoscalemenuitem.h> #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-bindings.h> @@ -71,7 +71,9 @@ INDICATOR_SET_TYPE(INDICATOR_SOUND_TYPE) static GtkLabel * get_label (IndicatorObject * io); static GtkImage * get_icon (IndicatorObject * io); static GtkMenu * get_menu (IndicatorObject * io); -//static GtkWidget *volume_item; +static GtkWidget *volume_item = NULL; +static GtkMenu* menu = NULL; + static DBusGProxy * sound_dbus_proxy = NULL; @@ -154,7 +156,7 @@ connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer u static void catch_signal (DBusGProxy * proxy, gint sink_index, gboolean value, gpointer userdata) { - g_debug("signal caught - i don't believe it !"); + g_debug("signal caught - i don't believe it ! with index %i and value %i", sink_index, value); } @@ -201,9 +203,10 @@ get_icon (IndicatorObject * io) static GtkMenu * get_menu (IndicatorObject * io) { - //volume_item = ido_scale_menu_item_new_with_range ("Volume", 0, 100, 1); - //gtk_menu_shell_append (GTK_MENU_SHELL (menu), volume_item); - return GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_SOUND_DBUS_NAME, INDICATOR_SOUND_DBUS_OBJECT)); + volume_item = ido_scale_menu_item_new_with_range ("Volume", 0, 100, 1); + menu = GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_SOUND_DBUS_NAME, INDICATOR_SOUND_DBUS_OBJECT)); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), volume_item); + return menu; } |