aboutsummaryrefslogtreecommitdiff
path: root/src/sound-service-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r--src/sound-service-dbus.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 6fb0a64..0db03d4 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -56,6 +56,7 @@ struct _SoundServiceDbusPrivate {
GDBusConnection* connection;
DbusmenuMenuitem* root_menuitem;
Device* device;
+ gboolean greeter_mode;
};
static GDBusNodeInfo * node_info = NULL;
@@ -144,9 +145,10 @@ sound_service_dbus_init (SoundServiceDbus *self)
}
DbusmenuMenuitem*
-sound_service_dbus_create_root_item (SoundServiceDbus* self)
+sound_service_dbus_create_root_item (SoundServiceDbus* self, gboolean greeter_mode)
{
SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);
+ priv->greeter_mode = greeter_mode;
priv->root_menuitem = dbusmenu_menuitem_new();
//g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem));
DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH);
@@ -169,25 +171,27 @@ sound_service_dbus_build_sound_menu ( SoundServiceDbus* self,
dbusmenu_menuitem_child_add_position (priv->root_menuitem, slider_item, 1);
dbusmenu_menuitem_child_add_position (priv->root_menuitem, voip_input_menu_item, 2);
- // Separator
- DbusmenuMenuitem* separator = dbusmenu_menuitem_new();
-
- dbusmenu_menuitem_property_set (separator,
- DBUSMENU_MENUITEM_PROP_TYPE,
- DBUSMENU_CLIENT_TYPES_SEPARATOR);
- dbusmenu_menuitem_child_add_position (priv->root_menuitem, separator, 3);
- g_object_unref (separator);
-
- // Sound preferences dialog
- DbusmenuMenuitem* settings_mi = dbusmenu_menuitem_new();
-
- dbusmenu_menuitem_property_set( settings_mi,
- DBUSMENU_MENUITEM_PROP_LABEL,
- _("Sound Settings..."));
- dbusmenu_menuitem_child_append(priv->root_menuitem, settings_mi);
- g_object_unref (settings_mi);
- g_signal_connect(G_OBJECT(settings_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
- G_CALLBACK(show_sound_settings_dialog), NULL);
+ if (!priv->greeter_mode) {
+ // Separator
+ DbusmenuMenuitem* separator = dbusmenu_menuitem_new();
+
+ dbusmenu_menuitem_property_set (separator,
+ DBUSMENU_MENUITEM_PROP_TYPE,
+ DBUSMENU_CLIENT_TYPES_SEPARATOR);
+ dbusmenu_menuitem_child_add_position (priv->root_menuitem, separator, 3);
+ g_object_unref (separator);
+
+ // Sound preferences dialog
+ DbusmenuMenuitem* settings_mi = dbusmenu_menuitem_new();
+
+ dbusmenu_menuitem_property_set( settings_mi,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Sound Settings..."));
+ dbusmenu_menuitem_child_append(priv->root_menuitem, settings_mi);
+ g_object_unref (settings_mi);
+ g_signal_connect(G_OBJECT(settings_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
+ G_CALLBACK(show_sound_settings_dialog), NULL);
+ }
}
/**