static void mex_telepathy_channel_toggle_mute (MxAction *action, gpointer user_data) { MexTelepathyChannel *self = MEX_TELEPATHY_CHANNEL (user_data); MexTelepathyChannelPrivate *priv = self->priv; gboolean muted; g_object_get (priv->mic_volume, "mute", &muted, NULL); muted = !muted; g_object_set (priv->mic_volume, "mute", muted, NULL); if (muted) { mx_stylable_set_style_class (MX_STYLABLE( priv->mute_button), "MediaUnmute"); mx_action_set_display_name (action, "Mic On"); } else { mx_stylable_set_style_class (MX_STYLABLE(priv->mute_button), "MediaMute"); mx_action_set_display_name (action, "Mic Off"); } }
static void mex_telepathy_channel_set_camera_state (MexTelepathyChannel *self, gboolean on) { MexTelepathyChannelPrivate *priv = self->priv; MxAction *action = mx_button_get_action ( MX_BUTTON (self->priv->camera_button)); if (on) { clutter_actor_show (priv->video_outgoing); // We are starting, so change the button to pause. mx_stylable_set_style_class (MX_STYLABLE ( priv->camera_button), "CameraOff"); mx_action_set_display_name (action, "Camera Off"); } else { clutter_actor_hide (priv->video_outgoing); // We are stopping, so change the button to play. mx_stylable_set_style_class (MX_STYLABLE ( priv->camera_button), "CameraOn"); mx_action_set_display_name (action, "Camera On"); } }
/** * mx_combo_box_insert_text: * @box: A #MxComboBox * @position: zero indexed position to insert the item at * @text: name of the item * * Insert an item into the combo box list. * */ void mx_combo_box_insert_text (MxComboBox *box, gint position, const gchar *text) { MxAction *action; g_return_if_fail (MX_IS_COMBO_BOX (box)); action = mx_action_new (); mx_action_set_display_name (action, text); box->priv->actions = g_slist_insert (box->priv->actions, g_object_ref_sink (action), position); mx_combo_box_update_menu (box); }