Esempio n. 1
0
File: acl_oid.c Progetto: mlt/acl
Datum
acl_merge(PG_FUNCTION_ARGS)
{
	ArrayType	   *parent;
	ArrayType	   *child;
	bool			container;
	bool			deny_first;

	merge_acls_extract_args(fcinfo, &parent, &child, &container, &deny_first);

	PG_RETURN_ARRAYTYPE_P(merge_acls(parent, child,
									 ACL_TYPE_LENGTH, ACL_TYPE_ALIGNMENT,
									 extract_acl_entry_base,
									 container, deny_first));
}
GtkWidget *
sunone_permissions_dialog_new (SunOneConnection *cnc, const gchar *calid)
{
	SunOnePermissionsDialog *dialog;
	SunOnePermissionsDialogPrivate *priv;

	g_return_val_if_fail (IS_SUNONE_CONNECTION (cnc), NULL);
	g_return_val_if_fail (calid != NULL, NULL);

	dialog = g_object_new (SUNONE_PERMISSIONS_DIALOG_TYPE, NULL);
	priv = dialog->priv;
	priv->cnc = cnc;
	priv->calid = g_strdup (calid);
	gtk_window_set_title (GTK_WINDOW (dialog), _("Folder permissions"));
	gtk_widget_set_size_request(GTK_WIDGET (dialog), 500, 400);

	gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);

	gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);

	g_signal_connect (dialog, "response",
		G_CALLBACK (dialog_button_clicked_cb), NULL);

	/* get properties for this calendar */
	priv->calprops = sunone_connection_get_calprops (priv->cnc, priv->calid, FALSE);
	if (!priv->calprops) {
		gtk_widget_destroy (GTK_WIDGET (dialog));
		e_notice (NULL, GTK_MESSAGE_ERROR, _("Could not get properties for this folder."));
		return NULL;
	}

	merge_acls (dialog);
	init_dialog (dialog);

	return GTK_WIDGET (dialog);
}