void cd_systray_set_orientation (GtkOrientation o) { GtkOrientation o_ = na_tray_get_orientation (myData.tray); if (o != o_) { na_tray_set_orientation (myData.tray, o); } }
static void na_tray_dispose (GObject *object) { NaTray *tray = NA_TRAY (object); NaTrayPrivate *priv = tray->priv; TraysScreen *trays_screen = priv->trays_screen; if (trays_screen != NULL) { trays_screen->all_trays = g_slist_remove (trays_screen->all_trays, tray); if (trays_screen->all_trays == NULL) { /* Make sure we drop the manager selection */ g_object_unref (trays_screen->tray_manager); trays_screen->tray_manager = NULL; g_hash_table_destroy (trays_screen->icon_table); trays_screen->icon_table = NULL; g_hash_table_destroy (trays_screen->tip_table); trays_screen->tip_table = NULL; } else { NaTray *new_tray; new_tray = get_tray (trays_screen); if (new_tray != NULL) na_tray_manager_set_orientation (trays_screen->tray_manager, na_tray_get_orientation (new_tray)); } } priv->trays_screen = NULL; if (priv->idle_redraw_id != 0) { g_source_remove (priv->idle_redraw_id); priv->idle_redraw_id = 0; } G_OBJECT_CLASS (na_tray_parent_class)->dispose (object); }
static void icon_tip_show_next (IconTip *icontip) { IconTipBuffer *buffer; if (icontip->buffer == NULL) { /* this will also destroy the tip window */ g_hash_table_remove (icontip->tray->priv->trays_screen->tip_table, icontip->icon); return; } if (icontip->source_id != 0) g_source_remove (icontip->source_id); icontip->source_id = 0; buffer = icontip->buffer->data; icontip->buffer = g_slist_remove (icontip->buffer, buffer); if (icontip->fixedtip == NULL) { icontip->fixedtip = na_fixed_tip_new (icontip->icon, na_tray_get_orientation (icontip->tray)); g_signal_connect (icontip->fixedtip, "clicked", G_CALLBACK (icon_tip_show_next_clicked), icontip); } na_fixed_tip_set_markup (icontip->fixedtip, buffer->text); if (!GTK_WIDGET_MAPPED (icontip->fixedtip)) gtk_widget_show (icontip->fixedtip); icontip->id = buffer->id; if (buffer->timeout > 0) icontip->source_id = g_timeout_add (buffer->timeout * 1000, icon_tip_show_next_timeout, icontip); icon_tip_buffer_free (buffer, NULL); }