static void _active_model_bulk_change_end_cb (AnerleyFeedModel *model, gpointer userdata) { MnbPeoplePanelPrivate *priv = GET_PRIVATE (userdata); gint number_active_people; gchar *tooltip; if (clutter_model_get_first_iter ((ClutterModel *)model)) { // mx_table_set_row_spacing (MX_TABLE (priv->content_table), 6); if (priv->panel_client) { mpl_panel_client_request_button_style (priv->panel_client, "people-button-active"); number_active_people = clutter_model_get_n_rows (CLUTTER_MODEL (priv->active_model)); if (number_active_people > 1) { tooltip = g_strdup_printf (_("people - you are chatting with %d people"), number_active_people); mpl_panel_client_request_tooltip (priv->panel_client, tooltip); g_free (tooltip); } else { mpl_panel_client_request_tooltip (priv->panel_client, _("people - you are chatting with someone")); } } } else { // mx_table_set_row_spacing (MX_TABLE (priv->content_table), 0); if (priv->panel_client) { mpl_panel_client_request_button_style (priv->panel_client, "people-button"); mpl_panel_client_request_tooltip (priv->panel_client, _("people")); } } /* Workaround for MB#6690 */ clutter_actor_queue_relayout (CLUTTER_ACTOR (priv->content_table)); }
static void bluetooth_status_changed (MoblinPanel *panel, gboolean connecting, gpointer user_data) { MplPanelClient *client = MPL_PANEL_CLIENT (user_data); gchar *style = NULL; if (connecting) { style = g_strdup ("state-connecting"); } else { style = g_strdup ("state-idle"); } mpl_panel_client_request_button_style (client, style); g_free (style); }
static void dawati_bt_shell_update (DawatiBtShell *shell) { DawatiBtShellPrivate *priv = GET_PRIVATE (shell); gboolean showinfo; showinfo = g_hash_table_size (priv->devices) == 0; g_signal_handler_block (priv->kill_toggle, priv->kill_handler); mx_toggle_set_active (MX_TOGGLE (priv->kill_toggle), priv->enabled); g_signal_handler_unblock (priv->kill_toggle, priv->kill_handler); /* Now way to know from Connman: mx_widget_set_disabled (MX_WIDGET (priv->kill_toggle), disabled); */ g_object_set (priv->info_label, "visible", showinfo, NULL); if (priv->enabled) { if (!clutter_actor_get_parent (priv->device_panelbox)) mx_box_layout_insert_actor (MX_BOX_LAYOUT (priv->content), priv->device_panelbox, 2); clutter_actor_show (priv->add_button); clutter_actor_animate (priv->add_button, CLUTTER_LINEAR, 300, "opacity", 0xff, NULL); clutter_actor_show (priv->send_button); clutter_actor_animate (priv->send_button, CLUTTER_LINEAR, 300, "opacity", 0xff, NULL); mx_stylable_set_style_pseudo_class (MX_STYLABLE (priv->button_box), NULL); } else { if (clutter_actor_get_parent (priv->device_panelbox)) clutter_actor_remove_child (priv->content, priv->device_panelbox); clutter_actor_animate (priv->add_button, CLUTTER_LINEAR, 300, "opacity", 0x00, NULL); clutter_actor_animate (priv->send_button, CLUTTER_LINEAR, 300, "opacity", 0x00, "signal::completed", fadeout_completed_cb, shell, NULL); mx_stylable_set_style_pseudo_class (MX_STYLABLE (priv->button_box), "state-off"); } if (priv->panel_client) { g_object_set (priv->kill_toggle, "disabled", FALSE, NULL); if (!priv->available) { mpl_panel_client_request_button_state (priv->panel_client, MNB_BUTTON_HIDDEN); } else { mpl_panel_client_request_button_state (priv->panel_client, MNB_BUTTON_NORMAL); if (priv->enabled) mpl_panel_client_request_button_style (priv->panel_client, "state-idle"); else mpl_panel_client_request_button_style (priv->panel_client, "state-off"); } } else { g_object_set (priv->kill_toggle, "disabled", !priv->available, NULL); } }