Exemplo n.º 1
0
/**
 * gdl_dock_object_nick_from_type:
 * @type: The type for which to find the nickname
 *
 * Finds the nickname for a given type
 *
 * Returns: If the object has a nickname, then it is returned.
 *   Otherwise, the type name.
 */
const gchar *
gdl_dock_object_nick_from_type (GType type)
{
    gchar *nick = NULL;
    guint i = 0;

    if (!dock_register)
        gdl_dock_object_register_init ();

    for (i=0; i < dock_register->len; i++) {
        struct DockRegisterItem item
            = g_array_index (dock_register, struct DockRegisterItem, i);

	if (g_direct_equal (item.type, (gpointer) type))
		nick = g_strdup (item.nick);
    }

    return nick ? nick : g_type_name (type);
}
static gboolean
gtk_source_completion_proposal_equal_default (GtkSourceCompletionProposal *proposal,
                                              GtkSourceCompletionProposal *other)
{
	return g_direct_equal (proposal, other);
}
Exemplo n.º 3
0
/**
 * fo_object_equal_func_default:
 * @a: First object to compare.
 * @b: Second object to compare.
 * 
 * Default 'equal_func' which just compares object addresses.
 * 
 * Return value: %TRUE if objects are equal.
 **/
gboolean
fo_object_equal_func_default (gconstpointer a,
			      gconstpointer b)
{
    return g_direct_equal(a, b);
}