aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-02-17 16:07:28 +0000
committerConor Curran <conor.curran@canonical.com>2011-02-17 16:07:28 +0000
commit6ad2bc640794ad3d78c401e4e9391169446db619 (patch)
tree73e22675a5937b6dbaaf7f22b55c1daefb84a065 /src/indicator-sound.c
parentc1fdbb5237dd04d6508fafc7d4af67645d4c66c5 (diff)
downloadayatana-indicator-sound-6ad2bc640794ad3d78c401e4e9391169446db619.tar.gz
ayatana-indicator-sound-6ad2bc640794ad3d78c401e4e9391169446db619.tar.bz2
ayatana-indicator-sound-6ad2bc640794ad3d78c401e4e9391169446db619.zip
voip widget added
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 96ab89b..138c5ac 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -79,6 +79,10 @@ static gboolean new_volume_slider_widget (DbusmenuMenuitem * newitem,
DbusmenuMenuitem * parent,
DbusmenuClient * client,
gpointer user_data);
+static gboolean new_voip_slider_widget (DbusmenuMenuitem * newitem,
+ DbusmenuMenuitem * parent,
+ DbusmenuClient * client,
+ gpointer user_data);
static gboolean new_transport_widget (DbusmenuMenuitem * newitem,
DbusmenuMenuitem * parent,
DbusmenuClient * client,
@@ -191,6 +195,9 @@ get_menu (IndicatorObject * io)
DBUSMENU_VOLUME_MENUITEM_TYPE,
new_volume_slider_widget);
dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client),
+ DBUSMENU_VOIP_INPUT_MENUITEM_TYPE,
+ new_voip_slider_widget);
+ dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client),
DBUSMENU_TRANSPORT_MENUITEM_TYPE,
new_transport_widget);
dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client),
@@ -403,6 +410,43 @@ new_volume_slider_widget(DbusmenuMenuitem * newitem,
parent);
return TRUE;
}
+static gboolean
+new_voip_slider_widget (DbusmenuMenuitem * newitem,
+ DbusmenuMenuitem * parent,
+ DbusmenuClient * client,
+ gpointer user_data)
+{
+ g_debug("indicator-sound: new_voip_slider_widget");
+/*
+ GtkWidget* voip_widget = NULL;
+ IndicatorObject *io = NULL;
+
+
+ g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE);
+ g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE);
+
+ volume_widget = volume_widget_new (newitem);
+ io = g_object_get_data (G_OBJECT (client), "indicator");
+ IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(INDICATOR_SOUND (io));
+ priv->volume_widget = volume_widget;
+
+ GtkWidget* ido_slider_widget = volume_widget_get_ido_slider(VOLUME_WIDGET(priv->volume_widget));
+
+ gtk_widget_show_all(ido_slider_widget);
+ // register the style callback on this widget with state manager's style change
+ // handler (needs to remake the blocking animation for each style).
+ g_signal_connect (ido_slider_widget, "style-set",
+ G_CALLBACK(sound_state_manager_style_changed_cb),
+ priv->state_manager);
+
+ GtkMenuItem *menu_volume_item = GTK_MENU_ITEM(ido_slider_widget);
+ dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client),
+ newitem,
+ menu_volume_item,
+ parent);
+*/
+ return TRUE;
+}
/*******************************************************************/
//UI callbacks