-/*
+/*
* Copyright (C) 2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "roles.h"
#include "resources.h"
-static void autoz_gui_authorization_class_init (AutozGuiAuthorizationClass *klass);
-static void autoz_gui_authorization_init (AutozGuiAuthorization *authorization);
+static void zak_autho_gui_authorization_class_init (ZakAuthoGuiAuthorizationClass *klass);
+static void zak_autho_gui_authorization_init (ZakAuthoGuiAuthorization *authorization);
-static void autoz_gui_authorization_load (AutozGuiAuthorization *authorization);
-static void autoz_gui_authorization_save (AutozGuiAuthorization *authorization);
+static void zak_autho_gui_authorization_load (ZakAuthoGuiAuthorization *authorization);
+static void zak_autho_gui_authorization_save (ZakAuthoGuiAuthorization *authorization);
-static void autoz_gui_authorization_fill_role (AutozGuiAuthorization *authorization);
-static void autoz_gui_authorization_fill_resource (AutozGuiAuthorization *authorization);
+static void zak_autho_gui_authorization_fill_role (ZakAuthoGuiAuthorization *authorization);
+static void zak_autho_gui_authorization_fill_resource (ZakAuthoGuiAuthorization *authorization);
-static void autoz_gui_authorization_on_role_selected (gpointer instance, guint id, gpointer user_data);
-static void autoz_gui_authorization_on_resource_selected (gpointer instance, guint id, gpointer user_data);
+static void zak_autho_gui_authorization_on_role_selected (gpointer instance, guint id, gpointer user_data);
+static void zak_autho_gui_authorization_on_resource_selected (gpointer instance, guint id, gpointer user_data);
-static void autoz_gui_authorization_set_property (GObject *object,
+static void zak_autho_gui_authorization_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_authorization_get_property (GObject *object,
+static void zak_autho_gui_authorization_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_authorization_on_btn_role_clicked (GtkButton *button,
+static void zak_autho_gui_authorization_on_btn_role_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_authorization_on_btn_resource_clicked (GtkButton *button,
+static void zak_autho_gui_authorization_on_btn_resource_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_authorization_on_btn_cancel_clicked (GtkButton *button,
+static void zak_autho_gui_authorization_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_authorization_on_btn_save_clicked (GtkButton *button,
+static void zak_autho_gui_authorization_on_btn_save_clicked (GtkButton *button,
gpointer user_data);
-#define AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_AUTHORIZATION, AutozGuiAuthorizationPrivate))
+#define ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATION, ZakAuthoGuiAuthorizationPrivate))
-typedef struct _AutozGuiAuthorizationPrivate AutozGuiAuthorizationPrivate;
-struct _AutozGuiAuthorizationPrivate
+typedef struct _ZakAuthoGuiAuthorizationPrivate ZakAuthoGuiAuthorizationPrivate;
+struct _ZakAuthoGuiAuthorizationPrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *w;
gint id;
};
-G_DEFINE_TYPE (AutozGuiAuthorization, autoz_gui_authorization, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiAuthorization, zak_autho_gui_authorization, G_TYPE_OBJECT)
static void
-autoz_gui_authorization_class_init (AutozGuiAuthorizationClass *klass)
+zak_autho_gui_authorization_class_init (ZakAuthoGuiAuthorizationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiAuthorizationPrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiAuthorizationPrivate));
- object_class->set_property = autoz_gui_authorization_set_property;
- object_class->get_property = autoz_gui_authorization_get_property;
+ object_class->set_property = zak_autho_gui_authorization_set_property;
+ object_class->get_property = zak_autho_gui_authorization_get_property;
/**
- * AutozGuiAuthorization::updated:
+ * ZakAuthoGuiAuthorization::updated:
* @authorization:
*
*/
}
static void
-autoz_gui_authorization_init (AutozGuiAuthorization *authorization)
+zak_autho_gui_authorization_init (ZakAuthoGuiAuthorization *authorization)
{
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
}
/**
- * autoz_gui_authorization_new:
+ * zak_autho_gui_authorization_new:
* @commons:
* @id:
*
- * Returns: the newly created #AutozGuiAuthorization object.
+ * Returns: the newly created #ZakAuthoGuiAuthorization object.
*/
-AutozGuiAuthorization
-*autoz_gui_authorization_new (AutozGuiCommons *commons, gint id)
+ZakAuthoGuiAuthorization
+*zak_autho_gui_authorization_new (ZakAuthoGuiCommons *commons, gint id)
{
GError *error;
- AutozGuiAuthorization *a = AUTOZ_GUI_AUTHORIZATION (g_object_new (autoz_gui_authorization_get_type (), NULL));
+ ZakAuthoGuiAuthorization *a = ZAK_AUTHO_GUI_AUTHORIZATION (g_object_new (zak_autho_gui_authorization_get_type (), NULL));
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (a);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (a);
priv->commons = commons;
priv->w = GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "w_authorization"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button23"),
- "clicked", G_CALLBACK (autoz_gui_authorization_on_btn_role_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorization_on_btn_role_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button22"),
- "clicked", G_CALLBACK (autoz_gui_authorization_on_btn_resource_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorization_on_btn_resource_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button20"),
- "clicked", G_CALLBACK (autoz_gui_authorization_on_btn_cancel_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorization_on_btn_cancel_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button21"),
- "clicked", G_CALLBACK (autoz_gui_authorization_on_btn_save_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorization_on_btn_save_clicked), (gpointer)a);
priv->id = id;
if (priv->id == 0)
{
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label12")),
g_strdup_printf ("%d", priv->id));
- autoz_gui_authorization_load (a);
+ zak_autho_gui_authorization_load (a);
}
return a;
}
/**
- * autoz_gui_authorization_get_widget:
+ * zak_autho_gui_authorization_get_widget:
* @authorization:
*
*/
GtkWidget
-*autoz_gui_authorization_get_widget (AutozGuiAuthorization *authorization)
+*zak_autho_gui_authorization_get_widget (ZakAuthoGuiAuthorization *authorization)
{
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
return priv->w;
}
/* PRIVATE */
static void
-autoz_gui_authorization_load (AutozGuiAuthorization *authorization)
+zak_autho_gui_authorization_load (ZakAuthoGuiAuthorization *authorization)
{
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
GError *error;
gchar *sql;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (priv->commons->gtkbuilder, "radiobutton2")), TRUE);
}
- autoz_gui_authorization_fill_role (authorization);
- autoz_gui_authorization_fill_resource (authorization);
+ zak_autho_gui_authorization_fill_role (authorization);
+ zak_autho_gui_authorization_fill_resource (authorization);
}
else
{
}
static void
-autoz_gui_authorization_save (AutozGuiAuthorization *authorization)
+zak_autho_gui_authorization_save (ZakAuthoGuiAuthorization *authorization)
{
const GdaDsnInfo *info;
GError *error;
guint type;
- AutozGuiAuthorizationClass *klass = AUTOZ_GUI_AUTHORIZATION_GET_CLASS (authorization);
+ ZakAuthoGuiAuthorizationClass *klass = ZAK_AUTHO_GUI_AUTHORIZATION_GET_CLASS (authorization);
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (priv->commons->gtkbuilder, "radiobutton1"))))
{
}
static void
-autoz_gui_authorization_fill_role (AutozGuiAuthorization *authorization)
+zak_autho_gui_authorization_fill_role (ZakAuthoGuiAuthorization *authorization)
{
GError *error;
gchar *sql;
GdaStatement *stmt;
GdaDataModel *dm;
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
sql = g_strdup_printf ("SELECT role_id"
" FROM %sroles"
}
static void
-autoz_gui_authorization_fill_resource (AutozGuiAuthorization *authorization)
+zak_autho_gui_authorization_fill_resource (ZakAuthoGuiAuthorization *authorization)
{
GError *error;
gchar *sql;
GdaStatement *stmt;
GdaDataModel *dm;
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
sql = g_strdup_printf ("SELECT resource_id"
" FROM %sresources"
}
static void
-autoz_gui_authorization_on_role_selected (gpointer instance, guint id, gpointer user_data)
+zak_autho_gui_authorization_on_role_selected (gpointer instance, guint id, gpointer user_data)
{
- AutozGuiAuthorization *authorization = AUTOZ_GUI_AUTHORIZATION (user_data);
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorization *authorization = ZAK_AUTHO_GUI_AUTHORIZATION (user_data);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label15")),
g_strdup_printf ("%d", id));
- autoz_gui_authorization_fill_role (authorization);
+ zak_autho_gui_authorization_fill_role (authorization);
}
static void
-autoz_gui_authorization_on_resource_selected (gpointer instance, guint id, gpointer user_data)
+zak_autho_gui_authorization_on_resource_selected (gpointer instance, guint id, gpointer user_data)
{
- AutozGuiAuthorization *authorization = AUTOZ_GUI_AUTHORIZATION (user_data);
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorization *authorization = ZAK_AUTHO_GUI_AUTHORIZATION (user_data);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label14")),
g_strdup_printf ("%d", id));
- autoz_gui_authorization_fill_resource (authorization);
+ zak_autho_gui_authorization_fill_resource (authorization);
}
static void
-autoz_gui_authorization_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_authorization_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiAuthorization *authorization = AUTOZ_GUI_AUTHORIZATION (object);
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorization *authorization = ZAK_AUTHO_GUI_AUTHORIZATION (object);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
switch (property_id)
{
}
static void
-autoz_gui_authorization_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_authorization_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiAuthorization *authorization = AUTOZ_GUI_AUTHORIZATION (object);
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorization *authorization = ZAK_AUTHO_GUI_AUTHORIZATION (object);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_authorization_on_btn_role_clicked (GtkButton *button,
+zak_autho_gui_authorization_on_btn_role_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *w;
- AutozGuiAuthorization *authorization = (AutozGuiAuthorization *)user_data;
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorization *authorization = (ZakAuthoGuiAuthorization *)user_data;
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
- AutozGuiRoles *c = autoz_gui_roles_new (priv->commons, TRUE);
+ ZakAuthoGuiRoles *c = zak_autho_gui_roles_new (priv->commons, TRUE);
g_signal_connect (G_OBJECT (c), "selected",
- G_CALLBACK (autoz_gui_authorization_on_role_selected), user_data);
+ G_CALLBACK (zak_autho_gui_authorization_on_role_selected), user_data);
- w = autoz_gui_roles_get_widget (c);
+ w = zak_autho_gui_roles_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
gtk_widget_show (w);
}
static void
-autoz_gui_authorization_on_btn_resource_clicked (GtkButton *button,
+zak_autho_gui_authorization_on_btn_resource_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *w;
- AutozGuiAuthorization *authorization = (AutozGuiAuthorization *)user_data;
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorization *authorization = (ZakAuthoGuiAuthorization *)user_data;
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
- AutozGuiResources *c = autoz_gui_resources_new (priv->commons, TRUE);
+ ZakAuthoGuiResources *c = zak_autho_gui_resources_new (priv->commons, TRUE);
g_signal_connect (G_OBJECT (c), "selected",
- G_CALLBACK (autoz_gui_authorization_on_resource_selected), user_data);
+ G_CALLBACK (zak_autho_gui_authorization_on_resource_selected), user_data);
- w = autoz_gui_resources_get_widget (c);
+ w = zak_autho_gui_resources_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
gtk_widget_show (w);
}
static void
-autoz_gui_authorization_on_btn_cancel_clicked (GtkButton *button,
+zak_autho_gui_authorization_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiAuthorization *authorization = (AutozGuiAuthorization *)user_data;
+ ZakAuthoGuiAuthorization *authorization = (ZakAuthoGuiAuthorization *)user_data;
- AutozGuiAuthorizationPrivate *priv = AUTOZ_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
+ ZakAuthoGuiAuthorizationPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATION_GET_PRIVATE (authorization);
gtk_widget_destroy (priv->w);
}
static void
-autoz_gui_authorization_on_btn_save_clicked (GtkButton *button,
+zak_autho_gui_authorization_on_btn_save_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_authorization_save ((AutozGuiAuthorization *)user_data);
+ zak_autho_gui_authorization_save ((ZakAuthoGuiAuthorization *)user_data);
}
-/*
+/*
* Copyright (C) 2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_AUTHORIZATION_H__
-#define __AUTOZ_GUI_AUTHORIZATION_H__
+#ifndef __ZAK_AUTHO_GUI_AUTHORIZATION_H__
+#define __ZAK_AUTHO_GUI_AUTHORIZATION_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_AUTHORIZATION (autoz_gui_authorization_get_type ())
-#define AUTOZ_GUI_AUTHORIZATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_AUTHORIZATION, AutozGuiAuthorization))
-#define AUTOZ_GUI_AUTHORIZATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_AUTHORIZATION, AutozGuiAuthorizationClass))
-#define IS_AUTOZ_GUI_AUTHORIZATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_AUTHORIZATION))
-#define IS_AUTOZ_GUI_AUTHORIZATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_AUTHORIZATION))
-#define AUTOZ_GUI_AUTHORIZATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_AUTHORIZATION, AutozGuiAuthorizationClass))
+#define TYPE_ZAK_AUTHO_GUI_AUTHORIZATION (zak_autho_gui_authorization_get_type ())
+#define ZAK_AUTHO_GUI_AUTHORIZATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATION, ZakAuthoGuiAuthorization))
+#define ZAK_AUTHO_GUI_AUTHORIZATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_AUTHORIZATION, ZakAuthoGuiAuthorizationClass))
+#define IS_ZAK_AUTHO_GUI_AUTHORIZATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATION))
+#define IS_ZAK_AUTHO_GUI_AUTHORIZATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_AUTHORIZATION))
+#define ZAK_AUTHO_GUI_AUTHORIZATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATION, ZakAuthoGuiAuthorizationClass))
-typedef struct _AutozGuiAuthorization AutozGuiAuthorization;
-typedef struct _AutozGuiAuthorizationClass AutozGuiAuthorizationClass;
+typedef struct _ZakAuthoGuiAuthorization ZakAuthoGuiAuthorization;
+typedef struct _ZakAuthoGuiAuthorizationClass ZakAuthoGuiAuthorizationClass;
-struct _AutozGuiAuthorization
+struct _ZakAuthoGuiAuthorization
{
GObject parent;
};
-struct _AutozGuiAuthorizationClass
+struct _ZakAuthoGuiAuthorizationClass
{
GObjectClass parent_class;
guint updated_signal_id;
};
-GType autoz_gui_authorization_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_authorization_get_type (void) G_GNUC_CONST;
-AutozGuiAuthorization *autoz_gui_authorization_new (AutozGuiCommons *commons, gint id);
+ZakAuthoGuiAuthorization *zak_autho_gui_authorization_new (ZakAuthoGuiCommons *commons, gint id);
-GtkWidget *autoz_gui_authorization_get_widget (AutozGuiAuthorization *authorization);
+GtkWidget *zak_autho_gui_authorization_get_widget (ZakAuthoGuiAuthorization *authorization);
G_END_DECLS
-#endif /* __AUTOZ_GUI_AUTHORIZATION_H__ */
+#endif /* __ZAK_AUTHO_GUI_AUTHORIZATION_H__ */
-/*
+/*
* Copyright (C) 2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "authorizations.h"
#include "authorization.h"
-static void autoz_gui_authorizations_class_init (AutozGuiAuthorizationsClass *klass);
-static void autoz_gui_authorizations_init (AutozGuiAuthorizations *authorizations);
+static void zak_autho_gui_authorizations_class_init (ZakAuthoGuiAuthorizationsClass *klass);
+static void zak_autho_gui_authorizations_init (ZakAuthoGuiAuthorizations *authorizations);
-static void autoz_gui_authorizations_load (AutozGuiAuthorizations *authorizations);
-static void autoz_gui_authorizations_edit (AutozGuiAuthorizations *authorizations);
+static void zak_autho_gui_authorizations_load (ZakAuthoGuiAuthorizations *authorizations);
+static void zak_autho_gui_authorizations_edit (ZakAuthoGuiAuthorizations *authorizations);
-static void autoz_gui_authorizations_on_authorization_updated (gpointer instance, gpointer user_data);
+static void zak_autho_gui_authorizations_on_authorization_updated (gpointer instance, gpointer user_data);
-static void autoz_gui_authorizations_set_property (GObject *object,
+static void zak_autho_gui_authorizations_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_authorizations_get_property (GObject *object,
+static void zak_autho_gui_authorizations_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_authorizations_on_btn_new_clicked (GtkButton *button,
+static void zak_autho_gui_authorizations_on_btn_new_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_authorizations_on_btn_edit_clicked (GtkButton *button,
+static void zak_autho_gui_authorizations_on_btn_edit_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_authorizations_on_btn_delete_clicked (GtkButton *button,
+static void zak_autho_gui_authorizations_on_btn_delete_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_authorizations_on_trv_autoz_gui_authorizations_row_activated (GtkTreeView *tree_view,
+static void zak_autho_gui_authorizations_on_trv_zak_autho_gui_authorizations_row_activated (GtkTreeView *tree_view,
GtkTreePath *tree_path,
GtkTreeViewColumn *column,
gpointer user_data);
-#define AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_AUTHORIZATIONS, AutozGuiAuthorizationsPrivate))
+#define ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS, ZakAuthoGuiAuthorizationsPrivate))
enum
{
COL_TYPE
};
-typedef struct _AutozGuiAuthorizationsPrivate AutozGuiAuthorizationsPrivate;
-struct _AutozGuiAuthorizationsPrivate
+typedef struct _ZakAuthoGuiAuthorizationsPrivate ZakAuthoGuiAuthorizationsPrivate;
+struct _ZakAuthoGuiAuthorizationsPrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *widget;
GtkListStore *lstore_authorizations;
};
-G_DEFINE_TYPE (AutozGuiAuthorizations, autoz_gui_authorizations, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiAuthorizations, zak_autho_gui_authorizations, G_TYPE_OBJECT)
static void
-autoz_gui_authorizations_class_init (AutozGuiAuthorizationsClass *klass)
+zak_autho_gui_authorizations_class_init (ZakAuthoGuiAuthorizationsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiAuthorizationsPrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiAuthorizationsPrivate));
- object_class->set_property = autoz_gui_authorizations_set_property;
- object_class->get_property = autoz_gui_authorizations_get_property;
+ object_class->set_property = zak_autho_gui_authorizations_set_property;
+ object_class->get_property = zak_autho_gui_authorizations_get_property;
}
static void
-autoz_gui_authorizations_init (AutozGuiAuthorizations *authorizations)
+zak_autho_gui_authorizations_init (ZakAuthoGuiAuthorizations *authorizations)
{
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
}
/**
- * autoz_gui_authorizations_new:
+ * zak_autho_gui_authorizations_new:
* @commons:
* @selection:
*
- * Returns: the newly created #AutozGuiAuthorizations object.
+ * Returns: the newly created #ZakAuthoGuiAuthorizations object.
*/
-AutozGuiAuthorizations
-*autoz_gui_authorizations_new (AutozGuiCommons *commons, gboolean selection)
+ZakAuthoGuiAuthorizations
+*zak_autho_gui_authorizations_new (ZakAuthoGuiCommons *commons, gboolean selection)
{
GError *error;
- AutozGuiAuthorizations *a = AUTOZ_GUI_AUTHORIZATIONS (g_object_new (autoz_gui_authorizations_get_type (), NULL));
+ ZakAuthoGuiAuthorizations *a = ZAK_AUTHO_GUI_AUTHORIZATIONS (g_object_new (zak_autho_gui_authorizations_get_type (), NULL));
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (a);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (a);
priv->commons = commons;
priv->lstore_authorizations = GTK_LIST_STORE (gtk_builder_get_object (priv->commons->gtkbuilder, "lstore_authorizations"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button17"),
- "clicked", G_CALLBACK (autoz_gui_authorizations_on_btn_new_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorizations_on_btn_new_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button18"),
- "clicked", G_CALLBACK (autoz_gui_authorizations_on_btn_edit_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorizations_on_btn_edit_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button19"),
- "clicked", G_CALLBACK (autoz_gui_authorizations_on_btn_delete_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_authorizations_on_btn_delete_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "treeview3"),
- "row-activated", G_CALLBACK (autoz_gui_authorizations_on_trv_autoz_gui_authorizations_row_activated), (gpointer)a);
+ "row-activated", G_CALLBACK (zak_autho_gui_authorizations_on_trv_zak_autho_gui_authorizations_row_activated), (gpointer)a);
if (!selection)
{
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "button13")));*/
}
- autoz_gui_authorizations_load (a);
+ zak_autho_gui_authorizations_load (a);
return a;
}
/**
- * autoz_gui_authorizations_get_widget:
+ * zak_autho_gui_authorizations_get_widget:
* @authorizations:
*
*/
GtkWidget
-*autoz_gui_authorizations_get_widget (AutozGuiAuthorizations *authorizations)
+*zak_autho_gui_authorizations_get_widget (ZakAuthoGuiAuthorizations *authorizations)
{
- AutozGuiAuthorizationsPrivate *priv;
+ ZakAuthoGuiAuthorizationsPrivate *priv;
- g_return_val_if_fail (IS_AUTOZ_GUI_AUTHORIZATIONS (authorizations), NULL);
+ g_return_val_if_fail (IS_ZAK_AUTHO_GUI_AUTHORIZATIONS (authorizations), NULL);
- priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
return priv->widget;
}
/* PRIVATE */
static void
-autoz_gui_authorizations_load (AutozGuiAuthorizations *authorizations)
+zak_autho_gui_authorizations_load (ZakAuthoGuiAuthorizations *authorizations)
{
GtkTreeIter iter;
gint rows;
gint row;
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
gtk_list_store_clear (priv->lstore_authorizations);
}
static void
-autoz_gui_authorizations_edit (AutozGuiAuthorizations *authorizations)
+zak_autho_gui_authorizations_edit (ZakAuthoGuiAuthorizations *authorizations)
{
GtkTreeIter iter;
guint id;
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
if (gtk_tree_selection_get_selected (priv->selection, NULL, &iter))
{
COL_ID, &id,
-1);
- AutozGuiAuthorization *c = autoz_gui_authorization_new (priv->commons, id);
+ ZakAuthoGuiAuthorization *c = zak_autho_gui_authorization_new (priv->commons, id);
g_signal_connect (G_OBJECT (c), "updated",
- G_CALLBACK (autoz_gui_authorizations_on_authorization_updated), (gpointer)authorizations);
+ G_CALLBACK (zak_autho_gui_authorizations_on_authorization_updated), (gpointer)authorizations);
- w = autoz_gui_authorization_get_widget (c);
+ w = zak_autho_gui_authorization_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (gtk_builder_get_object (priv->commons->gtkbuilder, "w_main")));
gtk_widget_show_all (w);
}
}
static void
-autoz_gui_authorizations_on_authorization_updated (gpointer instance, gpointer user_data)
+zak_autho_gui_authorizations_on_authorization_updated (gpointer instance, gpointer user_data)
{
- autoz_gui_authorizations_load ((AutozGuiAuthorizations *)user_data);
+ zak_autho_gui_authorizations_load ((ZakAuthoGuiAuthorizations *)user_data);
}
static void
-autoz_gui_authorizations_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_authorizations_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiAuthorizations *authorizations = AUTOZ_GUI_AUTHORIZATIONS (object);
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizations *authorizations = ZAK_AUTHO_GUI_AUTHORIZATIONS (object);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
switch (property_id)
{
}
static void
-autoz_gui_authorizations_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_authorizations_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiAuthorizations *authorizations = AUTOZ_GUI_AUTHORIZATIONS (object);
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizations *authorizations = ZAK_AUTHO_GUI_AUTHORIZATIONS (object);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_authorizations_on_btn_new_clicked (GtkButton *button,
+zak_autho_gui_authorizations_on_btn_new_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *w;
- AutozGuiAuthorizations *authorizations = (AutozGuiAuthorizations *)user_data;
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizations *authorizations = (ZakAuthoGuiAuthorizations *)user_data;
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
- AutozGuiAuthorization *c = autoz_gui_authorization_new (priv->commons, 0);
+ ZakAuthoGuiAuthorization *c = zak_autho_gui_authorization_new (priv->commons, 0);
g_signal_connect (G_OBJECT (c), "updated",
- G_CALLBACK (autoz_gui_authorizations_on_authorization_updated), (gpointer)authorizations);
+ G_CALLBACK (zak_autho_gui_authorizations_on_authorization_updated), (gpointer)authorizations);
- w = autoz_gui_authorization_get_widget (c);
+ w = zak_autho_gui_authorization_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (gtk_builder_get_object (priv->commons->gtkbuilder, "w_main")));
gtk_widget_show_all (w);
}
static void
-autoz_gui_authorizations_on_btn_edit_clicked (GtkButton *button,
+zak_autho_gui_authorizations_on_btn_edit_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_authorizations_edit ((AutozGuiAuthorizations *)user_data);
+ zak_autho_gui_authorizations_edit ((ZakAuthoGuiAuthorizations *)user_data);
}
static void
-autoz_gui_authorizations_on_btn_delete_clicked (GtkButton *button,
+zak_autho_gui_authorizations_on_btn_delete_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dialog;
GtkTreeIter iter;
guint id;
- AutozGuiAuthorizations *authorizations = (AutozGuiAuthorizations *)user_data;
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
+ ZakAuthoGuiAuthorizations *authorizations = (ZakAuthoGuiAuthorizations *)user_data;
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE (authorizations);
if (gtk_tree_selection_get_selected (priv->selection, NULL, &iter))
{
gtk_widget_destroy (dialog);
}
- autoz_gui_authorizations_load (authorizations);
+ zak_autho_gui_authorizations_load (authorizations);
}
}
else
}
static void
-autoz_gui_authorizations_on_trv_autoz_gui_authorizations_row_activated (GtkTreeView *tree_view,
+zak_autho_gui_authorizations_on_trv_zak_autho_gui_authorizations_row_activated (GtkTreeView *tree_view,
GtkTreePath *tree_path,
GtkTreeViewColumn *column,
gpointer user_data)
{
- AutozGuiAuthorizationsPrivate *priv = AUTOZ_GUI_AUTHORIZATIONS_GET_PRIVATE ((AutozGuiAuthorizations *)user_data);
+ ZakAuthoGuiAuthorizationsPrivate *priv = ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_PRIVATE ((ZakAuthoGuiAuthorizations *)user_data);
- autoz_gui_authorizations_edit ((AutozGuiAuthorizations *)user_data);
+ zak_autho_gui_authorizations_edit ((ZakAuthoGuiAuthorizations *)user_data);
}
-/*
+/*
* Copyright (C) 2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_AUTHORIZATIONS_H__
-#define __AUTOZ_GUI_AUTHORIZATIONS_H__
+#ifndef __ZAK_AUTHO_GUI_AUTHORIZATIONS_H__
+#define __ZAK_AUTHO_GUI_AUTHORIZATIONS_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_AUTHORIZATIONS (autoz_gui_authorizations_get_type ())
-#define AUTOZ_GUI_AUTHORIZATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_AUTHORIZATIONS, AutozGuiAuthorizations))
-#define AUTOZ_GUI_AUTHORIZATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_AUTHORIZATIONS, AutozGuiAuthorizationsClass))
-#define IS_AUTOZ_GUI_AUTHORIZATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_AUTHORIZATIONS))
-#define IS_AUTOZ_GUI_AUTHORIZATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_AUTHORIZATIONS))
-#define AUTOZ_GUI_AUTHORIZATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_AUTHORIZATIONS, AutozGuiAuthorizationsClass))
+#define TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS (zak_autho_gui_authorizations_get_type ())
+#define ZAK_AUTHO_GUI_AUTHORIZATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS, ZakAuthoGuiAuthorizations))
+#define ZAK_AUTHO_GUI_AUTHORIZATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS, ZakAuthoGuiAuthorizationsClass))
+#define IS_ZAK_AUTHO_GUI_AUTHORIZATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS))
+#define IS_ZAK_AUTHO_GUI_AUTHORIZATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS))
+#define ZAK_AUTHO_GUI_AUTHORIZATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_AUTHORIZATIONS, ZakAuthoGuiAuthorizationsClass))
-typedef struct _AutozGuiAuthorizations AutozGuiAuthorizations;
-typedef struct _AutozGuiAuthorizationsClass AutozGuiAuthorizationsClass;
+typedef struct _ZakAuthoGuiAuthorizations ZakAuthoGuiAuthorizations;
+typedef struct _ZakAuthoGuiAuthorizationsClass ZakAuthoGuiAuthorizationsClass;
-struct _AutozGuiAuthorizations
+struct _ZakAuthoGuiAuthorizations
{
GObject parent;
};
-struct _AutozGuiAuthorizationsClass
+struct _ZakAuthoGuiAuthorizationsClass
{
GObjectClass parent_class;
};
-GType autoz_gui_authorizations_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_authorizations_get_type (void) G_GNUC_CONST;
-AutozGuiAuthorizations *autoz_gui_authorizations_new (AutozGuiCommons *commons, gboolean selection);
+ZakAuthoGuiAuthorizations *zak_autho_gui_authorizations_new (ZakAuthoGuiCommons *commons, gboolean selection);
-GtkWidget *autoz_gui_authorizations_get_widget (AutozGuiAuthorizations *authorizations);
+GtkWidget *zak_autho_gui_authorizations_get_widget (ZakAuthoGuiAuthorizations *authorizations);
G_END_DECLS
-#endif /* __AUTOZ_GUI_AUTHORIZATIONS_H__ */
+#endif /* __ZAK_AUTHO_GUI_AUTHORIZATIONS_H__ */
/*
- * Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2011-2016 Andrea Zagli <azagli@libero.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <config.h>
#endif
-#ifndef __AUTOZ_GUI_COMMONS_H__
-#define __AUTOZ_GUI_COMMONS_H__
+#ifndef __ZAK_AUTHO_GUI_COMMONS_H__
+#define __ZAK_AUTHO_GUI_COMMONS_H__
#include <gtk/gtk.h>
GdaSqlParser *gdaparser;
gchar *prefix;
- } AutozGuiCommons;
+ } ZakAuthoGuiCommons;
-#endif /* __AUTOZ_GUI_COMMONS_H__ */
+#endif /* __ZAK_AUTHO_GUI_COMMONS_H__ */
G_MODULE_EXPORT void on_mnu_file_close_activate (GtkMenuItem *menuitem,
gpointer user_data);
-static AutozGuiCommons *commons;
+static ZakAuthoGuiCommons *commons;
static GtkWidget *w;
static GtkWidget *vbx_body;
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
"Unable to connect to the choosen autoz db.\n\n%s\n\n%s",
- arg1,
+ arg1,
(error != NULL && error->message != NULL ? error->message : "No details."));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
on_mnu_file_close_activate (NULL, user_data);
}
- AutozGuiOpenAuditDS *m = autoz_gui_open_audit_ds_new (commons);
+ ZakAuthoGuiOpenAuditDS *m = zak_autho_gui_open_audit_ds_new (commons);
- vbx = autoz_gui_open_audit_ds_get_widget (m);
+ vbx = zak_autho_gui_open_audit_ds_get_widget (m);
g_signal_connect (G_OBJECT (m), "opened",
G_CALLBACK (main_on_ds_opened), NULL);
{
GtkWidget *vbx;
- AutozGuiRoles *m = autoz_gui_roles_new (commons, FALSE);
+ ZakAuthoGuiRoles *m = zak_autho_gui_roles_new (commons, FALSE);
- vbx = autoz_gui_roles_get_widget (m);
+ vbx = zak_autho_gui_roles_get_widget (m);
main_set_vbx_body_child (vbx);
}
{
GtkWidget *vbx;
- AutozGuiResources *m = autoz_gui_resources_new (commons, FALSE);
+ ZakAuthoGuiResources *m = zak_autho_gui_resources_new (commons, FALSE);
- vbx = autoz_gui_resources_get_widget (m);
+ vbx = zak_autho_gui_resources_get_widget (m);
main_set_vbx_body_child (vbx);
}
{
GtkWidget *vbx;
- AutozGuiAuthorizations *m = autoz_gui_authorizations_new (commons, FALSE);
+ ZakAuthoGuiAuthorizations *m = zak_autho_gui_authorizations_new (commons, FALSE);
- vbx = autoz_gui_authorizations_get_widget (m);
+ vbx = zak_autho_gui_authorizations_get_widget (m);
main_set_vbx_body_child (vbx);
}
gda_init ();
/* inizializzazione commons */
- commons = g_malloc0 (sizeof (AutozGuiCommons));
+ commons = g_malloc0 (sizeof (ZakAuthoGuiCommons));
#ifdef G_OS_WIN32
-/*
+/*
* Copyright (C) 2011 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "openauditds.h"
-static void autoz_gui_open_audit_ds_class_init (AutozGuiOpenAuditDSClass *klass);
-static void autoz_gui_open_audit_ds_init (AutozGuiOpenAuditDS *open_audit_ds);
+static void zak_autho_gui_open_audit_ds_class_init (ZakAuthoGuiOpenAuditDSClass *klass);
+static void zak_autho_gui_open_audit_ds_init (ZakAuthoGuiOpenAuditDS *open_audit_ds);
-static void autoz_gui_open_audit_ds_set_property (GObject *object,
+static void zak_autho_gui_open_audit_ds_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_open_audit_ds_get_property (GObject *object,
+static void zak_autho_gui_open_audit_ds_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_open_audit_ds_on_wlogin_changed (GdauiLogin *gdauilogin,
+static void zak_autho_gui_open_audit_ds_on_wlogin_changed (GdauiLogin *gdauilogin,
gboolean arg1,
gpointer user_data);
-static void autoz_gui_open_audit_ds_on_btn_cancel_clicked (GtkButton *button,
+static void zak_autho_gui_open_audit_ds_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_open_audit_ds_on_btn_open_clicked (GtkButton *button,
+static void zak_autho_gui_open_audit_ds_on_btn_open_clicked (GtkButton *button,
gpointer user_data);
-#define AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_OPEN_AUDIT_DS, AutozGuiOpenAuditDSPrivate))
+#define ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS, ZakAuthoGuiOpenAuditDSPrivate))
-typedef struct _AutozGuiOpenAuditDSPrivate AutozGuiOpenAuditDSPrivate;
-struct _AutozGuiOpenAuditDSPrivate
+typedef struct _ZakAuthoGuiOpenAuditDSPrivate ZakAuthoGuiOpenAuditDSPrivate;
+struct _ZakAuthoGuiOpenAuditDSPrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *w;
GtkWidget *wlogin;
};
-G_DEFINE_TYPE (AutozGuiOpenAuditDS, autoz_gui_open_audit_ds, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiOpenAuditDS, zak_autho_gui_open_audit_ds, G_TYPE_OBJECT)
static void
-autoz_gui_open_audit_ds_class_init (AutozGuiOpenAuditDSClass *klass)
+zak_autho_gui_open_audit_ds_class_init (ZakAuthoGuiOpenAuditDSClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiOpenAuditDSPrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiOpenAuditDSPrivate));
- object_class->set_property = autoz_gui_open_audit_ds_set_property;
- object_class->get_property = autoz_gui_open_audit_ds_get_property;
+ object_class->set_property = zak_autho_gui_open_audit_ds_set_property;
+ object_class->get_property = zak_autho_gui_open_audit_ds_get_property;
/**
- * AutozGuiOpenAuditDS::opened:
+ * ZakAuthoGuiOpenAuditDS::opened:
* @open_audit_ds:
*
*/
}
static void
-autoz_gui_open_audit_ds_init (AutozGuiOpenAuditDS *open_audit_ds)
+zak_autho_gui_open_audit_ds_init (ZakAuthoGuiOpenAuditDS *open_audit_ds)
{
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
}
/**
- * autoz_gui_open_audit_ds_new:
+ * zak_autho_gui_open_audit_ds_new:
* @commons:
* @id:
*
- * Returns: the newly created #AutozGuiOpenAuditDS object.
+ * Returns: the newly created #ZakAuthoGuiOpenAuditDS object.
*/
-AutozGuiOpenAuditDS
-*autoz_gui_open_audit_ds_new (AutozGuiCommons *commons)
+ZakAuthoGuiOpenAuditDS
+*zak_autho_gui_open_audit_ds_new (ZakAuthoGuiCommons *commons)
{
GError *error;
GdauiLoginMode mode;
- AutozGuiOpenAuditDS *a = AUTOZ_GUI_OPEN_AUDIT_DS (g_object_new (autoz_gui_open_audit_ds_get_type (), NULL));
+ ZakAuthoGuiOpenAuditDS *a = ZAK_AUTHO_GUI_OPEN_AUDIT_DS (g_object_new (zak_autho_gui_open_audit_ds_get_type (), NULL));
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (a);
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (a);
priv->commons = commons;
priv->w = GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "w_open_autoz_datasource"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button1"),
- "clicked", G_CALLBACK (autoz_gui_open_audit_ds_on_btn_cancel_clicked), (gpointer *)a);
+ "clicked", G_CALLBACK (zak_autho_gui_open_audit_ds_on_btn_cancel_clicked), (gpointer *)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button2"),
- "clicked", G_CALLBACK (autoz_gui_open_audit_ds_on_btn_open_clicked), (gpointer *)a);
+ "clicked", G_CALLBACK (zak_autho_gui_open_audit_ds_on_btn_open_clicked), (gpointer *)a);
/* creating login widget */
priv->wlogin = gdaui_login_new (NULL);
gdaui_login_set_mode (GDAUI_LOGIN (priv->wlogin), mode);
g_signal_connect (G_OBJECT (priv->wlogin), "changed",
- G_CALLBACK (autoz_gui_open_audit_ds_on_wlogin_changed), (gpointer *)a);
+ G_CALLBACK (zak_autho_gui_open_audit_ds_on_wlogin_changed), (gpointer *)a);
gtk_container_add (GTK_CONTAINER (gtk_builder_get_object (priv->commons->gtkbuilder, "frame1")),
priv->wlogin);
}
/**
- * autoz_gui_open_audit_ds_get_widget:
+ * zak_autho_gui_open_audit_ds_get_widget:
* @open_audit_ds:
*
*/
GtkWidget
-*autoz_gui_open_audit_ds_get_widget (AutozGuiOpenAuditDS *open_audit_ds)
+*zak_autho_gui_open_audit_ds_get_widget (ZakAuthoGuiOpenAuditDS *open_audit_ds)
{
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
return priv->w;
}
/* PRIVATE */
static void
-autoz_gui_open_audit_ds_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_open_audit_ds_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiOpenAuditDS *open_audit_ds = AUTOZ_GUI_OPEN_AUDIT_DS (object);
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDS *open_audit_ds = ZAK_AUTHO_GUI_OPEN_AUDIT_DS (object);
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
switch (property_id)
{
}
static void
-autoz_gui_open_audit_ds_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_open_audit_ds_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiOpenAuditDS *open_audit_ds = AUTOZ_GUI_OPEN_AUDIT_DS (object);
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDS *open_audit_ds = ZAK_AUTHO_GUI_OPEN_AUDIT_DS (object);
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_open_audit_ds_on_wlogin_changed (GdauiLogin *gdauilogin,
+zak_autho_gui_open_audit_ds_on_wlogin_changed (GdauiLogin *gdauilogin,
gboolean arg1,
gpointer user_data)
{
- AutozGuiOpenAuditDS *open_audit_ds = (AutozGuiOpenAuditDS *)user_data;
+ ZakAuthoGuiOpenAuditDS *open_audit_ds = (ZakAuthoGuiOpenAuditDS *)user_data;
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
gboolean is_valid;
}
static void
-autoz_gui_open_audit_ds_on_btn_cancel_clicked (GtkButton *button,
+zak_autho_gui_open_audit_ds_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiOpenAuditDS *open_audit_ds = (AutozGuiOpenAuditDS *)user_data;
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDS *open_audit_ds = (ZakAuthoGuiOpenAuditDS *)user_data;
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
gtk_widget_destroy (priv->w);
}
static void
-autoz_gui_open_audit_ds_on_btn_open_clicked (GtkButton *button,
+zak_autho_gui_open_audit_ds_on_btn_open_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiOpenAuditDS *open_audit_ds = (AutozGuiOpenAuditDS *)user_data;
- AutozGuiOpenAuditDSPrivate *priv = AUTOZ_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
- AutozGuiOpenAuditDSClass *klass = AUTOZ_GUI_OPEN_AUDIT_DS_GET_CLASS (open_audit_ds);
+ ZakAuthoGuiOpenAuditDS *open_audit_ds = (ZakAuthoGuiOpenAuditDS *)user_data;
+ ZakAuthoGuiOpenAuditDSPrivate *priv = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_PRIVATE (open_audit_ds);
+ ZakAuthoGuiOpenAuditDSClass *klass = ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_CLASS (open_audit_ds);
gchar *cncstring;
-/*
+/*
* Copyright (C) 2010-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_OPEN_AUDIT_DS_H__
-#define __AUTOZ_GUI_OPEN_AUDIT_DS_H__
+#ifndef __ZAK_AUTHO_GUI_OPEN_AUDIT_DS_H__
+#define __ZAK_AUTHO_GUI_OPEN_AUDIT_DS_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_OPEN_AUDIT_DS (autoz_gui_open_audit_ds_get_type ())
-#define AUTOZ_GUI_OPEN_AUDIT_DS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_OPEN_AUDIT_DS, AutozGuiOpenAuditDS))
-#define AUTOZ_GUI_OPEN_AUDIT_DS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_OPEN_AUDIT_DS, AutozGuiOpenAuditDSClass))
-#define IS_AUTOZ_GUI_OPEN_AUDIT_DS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_OPEN_AUDIT_DS))
-#define IS_AUTOZ_GUI_OPEN_AUDIT_DS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_OPEN_AUDIT_DS))
-#define AUTOZ_GUI_OPEN_AUDIT_DS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_OPEN_AUDIT_DS, AutozGuiOpenAuditDSClass))
+#define TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS (zak_autho_gui_open_audit_ds_get_type ())
+#define ZAK_AUTHO_GUI_OPEN_AUDIT_DS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS, ZakAuthoGuiOpenAuditDS))
+#define ZAK_AUTHO_GUI_OPEN_AUDIT_DS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS, ZakAuthoGuiOpenAuditDSClass))
+#define IS_ZAK_AUTHO_GUI_OPEN_AUDIT_DS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS))
+#define IS_ZAK_AUTHO_GUI_OPEN_AUDIT_DS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS))
+#define ZAK_AUTHO_GUI_OPEN_AUDIT_DS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_OPEN_AUDIT_DS, ZakAuthoGuiOpenAuditDSClass))
-typedef struct _AutozGuiOpenAuditDS AutozGuiOpenAuditDS;
-typedef struct _AutozGuiOpenAuditDSClass AutozGuiOpenAuditDSClass;
+typedef struct _ZakAuthoGuiOpenAuditDS ZakAuthoGuiOpenAuditDS;
+typedef struct _ZakAuthoGuiOpenAuditDSClass ZakAuthoGuiOpenAuditDSClass;
-struct _AutozGuiOpenAuditDS
+struct _ZakAuthoGuiOpenAuditDS
{
GObject parent;
};
-struct _AutozGuiOpenAuditDSClass
+struct _ZakAuthoGuiOpenAuditDSClass
{
GObjectClass parent_class;
guint opened_signal_id;
};
-GType autoz_gui_open_audit_ds_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_open_audit_ds_get_type (void) G_GNUC_CONST;
-AutozGuiOpenAuditDS *autoz_gui_open_audit_ds_new (AutozGuiCommons *commons);
+ZakAuthoGuiOpenAuditDS *zak_autho_gui_open_audit_ds_new (ZakAuthoGuiCommons *commons);
-GtkWidget *autoz_gui_open_audit_ds_get_widget (AutozGuiOpenAuditDS *open_audit_ds);
+GtkWidget *zak_autho_gui_open_audit_ds_get_widget (ZakAuthoGuiOpenAuditDS *open_audit_ds);
G_END_DECLS
-#endif /* __AUTOZ_GUI_OPEN_AUDIT_DS_H__ */
+#endif /* __ZAK_AUTHO_GUI_OPEN_AUDIT_DS_H__ */
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "resource.h"
-static void autoz_gui_resource_class_init (AutozGuiResourceClass *klass);
-static void autoz_gui_resource_init (AutozGuiResource *resource);
+static void zak_autho_gui_resource_class_init (ZakAuthoGuiResourceClass *klass);
+static void zak_autho_gui_resource_init (ZakAuthoGuiResource *resource);
-static void autoz_gui_resource_load (AutozGuiResource *resource);
-static void autoz_gui_resource_save (AutozGuiResource *resource);
+static void zak_autho_gui_resource_load (ZakAuthoGuiResource *resource);
+static void zak_autho_gui_resource_save (ZakAuthoGuiResource *resource);
-static void autoz_gui_resource_set_property (GObject *object,
+static void zak_autho_gui_resource_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_resource_get_property (GObject *object,
+static void zak_autho_gui_resource_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_resource_on_btn_cancel_clicked (GtkButton *button,
+static void zak_autho_gui_resource_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_resource_on_btn_save_clicked (GtkButton *button,
+static void zak_autho_gui_resource_on_btn_save_clicked (GtkButton *button,
gpointer user_data);
-#define AUTOZ_GUI_RESOURCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_RESOURCE, AutozGuiResourcePrivate))
+#define ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCE, ZakAuthoGuiResourcePrivate))
-typedef struct _AutozGuiResourcePrivate AutozGuiResourcePrivate;
-struct _AutozGuiResourcePrivate
+typedef struct _ZakAuthoGuiResourcePrivate ZakAuthoGuiResourcePrivate;
+struct _ZakAuthoGuiResourcePrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *w;
gint id;
};
-G_DEFINE_TYPE (AutozGuiResource, autoz_gui_resource, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiResource, zak_autho_gui_resource, G_TYPE_OBJECT)
static void
-autoz_gui_resource_class_init (AutozGuiResourceClass *klass)
+zak_autho_gui_resource_class_init (ZakAuthoGuiResourceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiResourcePrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiResourcePrivate));
- object_class->set_property = autoz_gui_resource_set_property;
- object_class->get_property = autoz_gui_resource_get_property;
+ object_class->set_property = zak_autho_gui_resource_set_property;
+ object_class->get_property = zak_autho_gui_resource_get_property;
/**
- * AutozGuiResource::updated:
+ * ZakAuthoGuiResource::updated:
* @resource:
*
*/
}
static void
-autoz_gui_resource_init (AutozGuiResource *resource)
+zak_autho_gui_resource_init (ZakAuthoGuiResource *resource)
{
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
}
/**
- * autoz_gui_resource_new:
+ * zak_autho_gui_resource_new:
* @commons:
* @id:
*
- * Returns: the newly created #AutozGuiResource object.
+ * Returns: the newly created #ZakAuthoGuiResource object.
*/
-AutozGuiResource
-*autoz_gui_resource_new (AutozGuiCommons *commons, gint id)
+ZakAuthoGuiResource
+*zak_autho_gui_resource_new (ZakAuthoGuiCommons *commons, gint id)
{
GError *error;
- AutozGuiResource *a = AUTOZ_GUI_RESOURCE (g_object_new (autoz_gui_resource_get_type (), NULL));
+ ZakAuthoGuiResource *a = ZAK_AUTHO_GUI_RESOURCE (g_object_new (zak_autho_gui_resource_get_type (), NULL));
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (a);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (a);
priv->commons = commons;
priv->w = GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "w_resource"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button5"),
- "clicked", G_CALLBACK (autoz_gui_resource_on_btn_cancel_clicked), (gpointer *)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resource_on_btn_cancel_clicked), (gpointer *)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button6"),
- "clicked", G_CALLBACK (autoz_gui_resource_on_btn_save_clicked), (gpointer *)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resource_on_btn_save_clicked), (gpointer *)a);
priv->id = id;
if (priv->id == 0)
else
{
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label5")), g_strdup_printf ("%d", priv->id));
- autoz_gui_resource_load (a);
+ zak_autho_gui_resource_load (a);
}
return a;
}
/**
- * autoz_gui_resource_get_widget:
+ * zak_autho_gui_resource_get_widget:
* @resource:
*
*/
GtkWidget
-*autoz_gui_resource_get_widget (AutozGuiResource *resource)
+*zak_autho_gui_resource_get_widget (ZakAuthoGuiResource *resource)
{
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
return priv->w;
}
/* PRIVATE */
static void
-autoz_gui_resource_load (AutozGuiResource *resource)
+zak_autho_gui_resource_load (ZakAuthoGuiResource *resource)
{
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
GError *error;
gchar *sql;
}
static void
-autoz_gui_resource_save (AutozGuiResource *resource)
+zak_autho_gui_resource_save (ZakAuthoGuiResource *resource)
{
const GdaDsnInfo *info;
GError *error;
GdaDataModel *dm;
GtkWidget *dialog;
- AutozGuiResourceClass *klass = AUTOZ_GUI_RESOURCE_GET_CLASS (resource);
+ ZakAuthoGuiResourceClass *klass = ZAK_AUTHO_GUI_RESOURCE_GET_CLASS (resource);
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (priv->commons->gtkbuilder, "entry2"))), "") == 0)
{
}
static void
-autoz_gui_resource_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_resource_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiResource *resource = AUTOZ_GUI_RESOURCE (object);
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResource *resource = ZAK_AUTHO_GUI_RESOURCE (object);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
switch (property_id)
{
}
static void
-autoz_gui_resource_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_resource_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiResource *resource = AUTOZ_GUI_RESOURCE (object);
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResource *resource = ZAK_AUTHO_GUI_RESOURCE (object);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_resource_on_btn_cancel_clicked (GtkButton *button,
+zak_autho_gui_resource_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiResource *resource = (AutozGuiResource *)user_data;
+ ZakAuthoGuiResource *resource = (ZakAuthoGuiResource *)user_data;
- AutozGuiResourcePrivate *priv = AUTOZ_GUI_RESOURCE_GET_PRIVATE (resource);
+ ZakAuthoGuiResourcePrivate *priv = ZAK_AUTHO_GUI_RESOURCE_GET_PRIVATE (resource);
gtk_widget_destroy (priv->w);
}
static void
-autoz_gui_resource_on_btn_save_clicked (GtkButton *button,
+zak_autho_gui_resource_on_btn_save_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_resource_save ((AutozGuiResource *)user_data);
+ zak_autho_gui_resource_save ((ZakAuthoGuiResource *)user_data);
}
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_RESOURCE_H__
-#define __AUTOZ_GUI_RESOURCE_H__
+#ifndef __ZAK_AUTHO_GUI_RESOURCE_H__
+#define __ZAK_AUTHO_GUI_RESOURCE_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_RESOURCE (autoz_gui_resource_get_type ())
-#define AUTOZ_GUI_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_RESOURCE, AutozGuiResource))
-#define AUTOZ_GUI_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_RESOURCE, AutozGuiResourceClass))
-#define IS_AUTOZ_GUI_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_RESOURCE))
-#define IS_AUTOZ_GUI_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_RESOURCE))
-#define AUTOZ_GUI_RESOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_RESOURCE, AutozGuiResourceClass))
+#define TYPE_ZAK_AUTHO_GUI_RESOURCE (zak_autho_gui_resource_get_type ())
+#define ZAK_AUTHO_GUI_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCE, ZakAuthoGuiResource))
+#define ZAK_AUTHO_GUI_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_RESOURCE, ZakAuthoGuiResourceClass))
+#define IS_ZAK_AUTHO_GUI_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCE))
+#define IS_ZAK_AUTHO_GUI_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_RESOURCE))
+#define ZAK_AUTHO_GUI_RESOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCE, ZakAuthoGuiResourceClass))
-typedef struct _AutozGuiResource AutozGuiResource;
-typedef struct _AutozGuiResourceClass AutozGuiResourceClass;
+typedef struct _ZakAuthoGuiResource ZakAuthoGuiResource;
+typedef struct _ZakAuthoGuiResourceClass ZakAuthoGuiResourceClass;
-struct _AutozGuiResource
+struct _ZakAuthoGuiResource
{
GObject parent;
};
-struct _AutozGuiResourceClass
+struct _ZakAuthoGuiResourceClass
{
GObjectClass parent_class;
guint updated_signal_id;
};
-GType autoz_gui_resource_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_resource_get_type (void) G_GNUC_CONST;
-AutozGuiResource *autoz_gui_resource_new (AutozGuiCommons *commons, gint id);
+ZakAuthoGuiResource *zak_autho_gui_resource_new (ZakAuthoGuiCommons *commons, gint id);
-GtkWidget *autoz_gui_resource_get_widget (AutozGuiResource *resource);
+GtkWidget *zak_autho_gui_resource_get_widget (ZakAuthoGuiResource *resource);
G_END_DECLS
-#endif /* __AUTOZ_GUI_RESOURCE_H__ */
+#endif /* __ZAK_AUTHO_GUI_RESOURCE_H__ */
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "resources.h"
#include "resource.h"
-static void autoz_gui_resources_class_init (AutozGuiResourcesClass *klass);
-static void autoz_gui_resources_init (AutozGuiResources *resources);
+static void zak_autho_gui_resources_class_init (ZakAuthoGuiResourcesClass *klass);
+static void zak_autho_gui_resources_init (ZakAuthoGuiResources *resources);
-static void autoz_gui_resources_load (AutozGuiResources *resources);
-static void autoz_gui_resources_edit (AutozGuiResources *resources);
+static void zak_autho_gui_resources_load (ZakAuthoGuiResources *resources);
+static void zak_autho_gui_resources_edit (ZakAuthoGuiResources *resources);
-static void autoz_gui_resources_selected (AutozGuiResources *resources);
-static void autoz_gui_resources_on_resource_updated (gpointer instance, gpointer user_data);
+static void zak_autho_gui_resources_selected (ZakAuthoGuiResources *resources);
+static void zak_autho_gui_resources_on_resource_updated (gpointer instance, gpointer user_data);
-static void autoz_gui_resources_set_property (GObject *object,
+static void zak_autho_gui_resources_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_resources_get_property (GObject *object,
+static void zak_autho_gui_resources_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_resources_on_btn_new_clicked (GtkButton *button,
+static void zak_autho_gui_resources_on_btn_new_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_resources_on_btn_edit_clicked (GtkButton *button,
+static void zak_autho_gui_resources_on_btn_edit_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_resources_on_btn_delete_clicked (GtkButton *button,
+static void zak_autho_gui_resources_on_btn_delete_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_resources_on_trv_autoz_gui_resources_row_activated (GtkTreeView *tree_view,
+static void zak_autho_gui_resources_on_trv_zak_autho_gui_resources_row_activated (GtkTreeView *tree_view,
GtkTreePath *tree_path,
GtkTreeViewColumn *column,
gpointer user_data);
-static void autoz_gui_resources_on_btn_cancel_clicked (GtkButton *button,
+static void zak_autho_gui_resources_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_resources_on_btn_ok_clicked (GtkButton *button,
+static void zak_autho_gui_resources_on_btn_ok_clicked (GtkButton *button,
gpointer user_data);
-#define AUTOZ_GUI_RESOURCES_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_RESOURCES, AutozGuiResourcesPrivate))
+#define ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCES, ZakAuthoGuiResourcesPrivate))
enum
{
COL_NAME
};
-typedef struct _AutozGuiResourcesPrivate AutozGuiResourcesPrivate;
-struct _AutozGuiResourcesPrivate
+typedef struct _ZakAuthoGuiResourcesPrivate ZakAuthoGuiResourcesPrivate;
+struct _ZakAuthoGuiResourcesPrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *widget;
gboolean selection;
};
-G_DEFINE_TYPE (AutozGuiResources, autoz_gui_resources, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiResources, zak_autho_gui_resources, G_TYPE_OBJECT)
static void
-autoz_gui_resources_class_init (AutozGuiResourcesClass *klass)
+zak_autho_gui_resources_class_init (ZakAuthoGuiResourcesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiResourcesPrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiResourcesPrivate));
- object_class->set_property = autoz_gui_resources_set_property;
- object_class->get_property = autoz_gui_resources_get_property;
+ object_class->set_property = zak_autho_gui_resources_set_property;
+ object_class->get_property = zak_autho_gui_resources_get_property;
/**
* Resources::selected:
}
static void
-autoz_gui_resources_init (AutozGuiResources *resources)
+zak_autho_gui_resources_init (ZakAuthoGuiResources *resources)
{
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
}
/**
- * autoz_gui_resources_new:
+ * zak_autho_gui_resources_new:
* @commons:
* @selection:
*
- * Returns: the newly created #AutozGuiResources object.
+ * Returns: the newly created #ZakAuthoGuiResources object.
*/
-AutozGuiResources
-*autoz_gui_resources_new (AutozGuiCommons *commons, gboolean selection)
+ZakAuthoGuiResources
+*zak_autho_gui_resources_new (ZakAuthoGuiCommons *commons, gboolean selection)
{
GError *error;
- AutozGuiResources *a = AUTOZ_GUI_RESOURCES (g_object_new (autoz_gui_resources_get_type (), NULL));
+ ZakAuthoGuiResources *a = ZAK_AUTHO_GUI_RESOURCES (g_object_new (zak_autho_gui_resources_get_type (), NULL));
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (a);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (a);
priv->commons = commons;
priv->selection = selection;
priv->lstore_resources = GTK_LIST_STORE (gtk_builder_get_object (priv->commons->gtkbuilder, "lstore_resources"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button11"),
- "clicked", G_CALLBACK (autoz_gui_resources_on_btn_new_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resources_on_btn_new_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button12"),
- "clicked", G_CALLBACK (autoz_gui_resources_on_btn_edit_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resources_on_btn_edit_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button14"),
- "clicked", G_CALLBACK (autoz_gui_resources_on_btn_delete_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resources_on_btn_delete_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "treeview1"),
- "row-activated", G_CALLBACK (autoz_gui_resources_on_trv_autoz_gui_resources_row_activated), (gpointer)a);
+ "row-activated", G_CALLBACK (zak_autho_gui_resources_on_trv_zak_autho_gui_resources_row_activated), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button15"),
- "clicked", G_CALLBACK (autoz_gui_resources_on_btn_cancel_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resources_on_btn_cancel_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button16"),
- "clicked", G_CALLBACK (autoz_gui_resources_on_btn_ok_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_resources_on_btn_ok_clicked), (gpointer)a);
if (!selection)
{
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "button16")));
}
- autoz_gui_resources_load (a);
+ zak_autho_gui_resources_load (a);
return a;
}
/**
- * autoz_gui_resources_get_widget:
+ * zak_autho_gui_resources_get_widget:
* @resources:
*
*/
GtkWidget
-*autoz_gui_resources_get_widget (AutozGuiResources *resources)
+*zak_autho_gui_resources_get_widget (ZakAuthoGuiResources *resources)
{
- AutozGuiResourcesPrivate *priv;
+ ZakAuthoGuiResourcesPrivate *priv;
- g_return_val_if_fail (IS_AUTOZ_GUI_RESOURCES (resources), NULL);
+ g_return_val_if_fail (IS_ZAK_AUTHO_GUI_RESOURCES (resources), NULL);
- priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
return priv->widget;
}
/* PRIVATE */
static void
-autoz_gui_resources_load (AutozGuiResources *resources)
+zak_autho_gui_resources_load (ZakAuthoGuiResources *resources)
{
GtkTreeIter iter;
gint rows;
gint row;
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
gtk_list_store_clear (priv->lstore_resources);
}
static void
-autoz_gui_resources_edit (AutozGuiResources *resources)
+zak_autho_gui_resources_edit (ZakAuthoGuiResources *resources)
{
GtkTreeIter iter;
guint id;
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
if (gtk_tree_selection_get_selected (priv->sel_selection, NULL, &iter))
{
COL_ID, &id,
-1);
- AutozGuiResource *c = autoz_gui_resource_new (priv->commons, id);
+ ZakAuthoGuiResource *c = zak_autho_gui_resource_new (priv->commons, id);
g_signal_connect (G_OBJECT (c), "updated",
- G_CALLBACK (autoz_gui_resources_on_resource_updated), (gpointer)resources);
+ G_CALLBACK (zak_autho_gui_resources_on_resource_updated), (gpointer)resources);
- w = autoz_gui_resource_get_widget (c);
+ w = zak_autho_gui_resource_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), priv->selection ? GTK_WINDOW (priv->widget) :GTK_WINDOW (gtk_builder_get_object (priv->commons->gtkbuilder, "w_main")));
gtk_widget_show_all (w);
}
}
static void
-autoz_gui_resources_on_resource_updated (gpointer instance, gpointer user_data)
+zak_autho_gui_resources_on_resource_updated (gpointer instance, gpointer user_data)
{
- autoz_gui_resources_load ((AutozGuiResources *)user_data);
+ zak_autho_gui_resources_load ((ZakAuthoGuiResources *)user_data);
}
static void
-autoz_gui_resources_selected (AutozGuiResources *resources)
+zak_autho_gui_resources_selected (ZakAuthoGuiResources *resources)
{
GtkTreeIter iter;
guint id;
- AutozGuiResourcesClass *klass = AUTOZ_GUI_RESOURCES_GET_CLASS (resources);
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResourcesClass *klass = ZAK_AUTHO_GUI_RESOURCES_GET_CLASS (resources);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
if (gtk_tree_selection_get_selected (priv->sel_selection, NULL, &iter))
{
}
static void
-autoz_gui_resources_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_resources_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiResources *resources = AUTOZ_GUI_RESOURCES (object);
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResources *resources = ZAK_AUTHO_GUI_RESOURCES (object);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
switch (property_id)
{
}
static void
-autoz_gui_resources_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_resources_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiResources *resources = AUTOZ_GUI_RESOURCES (object);
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResources *resources = ZAK_AUTHO_GUI_RESOURCES (object);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_resources_on_btn_new_clicked (GtkButton *button,
+zak_autho_gui_resources_on_btn_new_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *w;
- AutozGuiResources *resources = (AutozGuiResources *)user_data;
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResources *resources = (ZakAuthoGuiResources *)user_data;
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
- AutozGuiResource *c = autoz_gui_resource_new (priv->commons, 0);
+ ZakAuthoGuiResource *c = zak_autho_gui_resource_new (priv->commons, 0);
g_signal_connect (G_OBJECT (c), "updated",
- G_CALLBACK (autoz_gui_resources_on_resource_updated), (gpointer)resources);
+ G_CALLBACK (zak_autho_gui_resources_on_resource_updated), (gpointer)resources);
- w = autoz_gui_resource_get_widget (c);
+ w = zak_autho_gui_resource_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), priv->selection ? GTK_WINDOW (priv->widget) :GTK_WINDOW (gtk_builder_get_object (priv->commons->gtkbuilder, "w_main")));
gtk_widget_show_all (w);
}
static void
-autoz_gui_resources_on_btn_edit_clicked (GtkButton *button,
+zak_autho_gui_resources_on_btn_edit_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_resources_edit ((AutozGuiResources *)user_data);
+ zak_autho_gui_resources_edit ((ZakAuthoGuiResources *)user_data);
}
static void
-autoz_gui_resources_on_btn_delete_clicked (GtkButton *button,
+zak_autho_gui_resources_on_btn_delete_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dialog;
GtkTreeIter iter;
guint id;
- AutozGuiResources *resources = (AutozGuiResources *)user_data;
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE (resources);
+ ZakAuthoGuiResources *resources = (ZakAuthoGuiResources *)user_data;
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE (resources);
if (gtk_tree_selection_get_selected (priv->sel_selection, NULL, &iter))
{
gtk_widget_destroy (dialog);
}
- autoz_gui_resources_load (resources);
+ zak_autho_gui_resources_load (resources);
}
}
else
}
static void
-autoz_gui_resources_on_trv_autoz_gui_resources_row_activated (GtkTreeView *tree_view,
+zak_autho_gui_resources_on_trv_zak_autho_gui_resources_row_activated (GtkTreeView *tree_view,
GtkTreePath *tree_path,
GtkTreeViewColumn *column,
gpointer user_data)
{
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE ((AutozGuiResources *)user_data);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE ((ZakAuthoGuiResources *)user_data);
if (priv->selection)
{
- autoz_gui_resources_selected ((AutozGuiResources *)user_data);
+ zak_autho_gui_resources_selected ((ZakAuthoGuiResources *)user_data);
}
else
{
- autoz_gui_resources_edit ((AutozGuiResources *)user_data);
+ zak_autho_gui_resources_edit ((ZakAuthoGuiResources *)user_data);
}
}
static void
-autoz_gui_resources_on_btn_cancel_clicked (GtkButton *button,
+zak_autho_gui_resources_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiResourcesPrivate *priv = AUTOZ_GUI_RESOURCES_GET_PRIVATE ((AutozGuiResources *)user_data);
+ ZakAuthoGuiResourcesPrivate *priv = ZAK_AUTHO_GUI_RESOURCES_GET_PRIVATE ((ZakAuthoGuiResources *)user_data);
gtk_widget_destroy (priv->widget);
g_object_unref (G_OBJECT (user_data));
}
static void
-autoz_gui_resources_on_btn_ok_clicked (GtkButton *button,
+zak_autho_gui_resources_on_btn_ok_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_resources_selected ((AutozGuiResources *)user_data);
+ zak_autho_gui_resources_selected ((ZakAuthoGuiResources *)user_data);
}
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_RESOURCES_H__
-#define __AUTOZ_GUI_RESOURCES_H__
+#ifndef __ZAK_AUTHO_GUI_RESOURCES_H__
+#define __ZAK_AUTHO_GUI_RESOURCES_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_RESOURCES (autoz_gui_resources_get_type ())
-#define AUTOZ_GUI_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_RESOURCES, AutozGuiResources))
-#define AUTOZ_GUI_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_RESOURCES, AutozGuiResourcesClass))
-#define IS_AUTOZ_GUI_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_RESOURCES))
-#define IS_AUTOZ_GUI_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_RESOURCES))
-#define AUTOZ_GUI_RESOURCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_RESOURCES, AutozGuiResourcesClass))
+#define TYPE_ZAK_AUTHO_GUI_RESOURCES (zak_autho_gui_resources_get_type ())
+#define ZAK_AUTHO_GUI_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCES, ZakAuthoGuiResources))
+#define ZAK_AUTHO_GUI_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_RESOURCES, ZakAuthoGuiResourcesClass))
+#define IS_ZAK_AUTHO_GUI_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCES))
+#define IS_ZAK_AUTHO_GUI_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_RESOURCES))
+#define ZAK_AUTHO_GUI_RESOURCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_RESOURCES, ZakAuthoGuiResourcesClass))
-typedef struct _AutozGuiResources AutozGuiResources;
-typedef struct _AutozGuiResourcesClass AutozGuiResourcesClass;
+typedef struct _ZakAuthoGuiResources ZakAuthoGuiResources;
+typedef struct _ZakAuthoGuiResourcesClass ZakAuthoGuiResourcesClass;
-struct _AutozGuiResources
+struct _ZakAuthoGuiResources
{
GObject parent;
};
-struct _AutozGuiResourcesClass
+struct _ZakAuthoGuiResourcesClass
{
GObjectClass parent_class;
guint selected_signal_id;
};
-GType autoz_gui_resources_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_resources_get_type (void) G_GNUC_CONST;
-AutozGuiResources *autoz_gui_resources_new (AutozGuiCommons *commons, gboolean selection);
+ZakAuthoGuiResources *zak_autho_gui_resources_new (ZakAuthoGuiCommons *commons, gboolean selection);
-GtkWidget *autoz_gui_resources_get_widget (AutozGuiResources *resources);
+GtkWidget *zak_autho_gui_resources_get_widget (ZakAuthoGuiResources *resources);
G_END_DECLS
-#endif /* __AUTOZ_GUI_RESOURCES_H__ */
+#endif /* __ZAK_AUTHO_GUI_RESOURCES_H__ */
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "role.h"
-static void autoz_gui_role_class_init (AutozGuiRoleClass *klass);
-static void autoz_gui_role_init (AutozGuiRole *role);
+static void zak_autho_gui_role_class_init (ZakAuthoGuiRoleClass *klass);
+static void zak_autho_gui_role_init (ZakAuthoGuiRole *role);
-static void autoz_gui_role_load (AutozGuiRole *role);
-static void autoz_gui_role_save (AutozGuiRole *role);
+static void zak_autho_gui_role_load (ZakAuthoGuiRole *role);
+static void zak_autho_gui_role_save (ZakAuthoGuiRole *role);
-static void autoz_gui_role_set_property (GObject *object,
+static void zak_autho_gui_role_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_role_get_property (GObject *object,
+static void zak_autho_gui_role_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_role_on_btn_cancel_clicked (GtkButton *button,
+static void zak_autho_gui_role_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_role_on_btn_save_clicked (GtkButton *button,
+static void zak_autho_gui_role_on_btn_save_clicked (GtkButton *button,
gpointer user_data);
-#define AUTOZ_GUI_ROLE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_ROLE, AutozGuiRolePrivate))
+#define ZAK_AUTHO_GUI_ROLE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_ROLE, ZakAuthoGuiRolePrivate))
-typedef struct _AutozGuiRolePrivate AutozGuiRolePrivate;
-struct _AutozGuiRolePrivate
+typedef struct _ZakAuthoGuiRolePrivate ZakAuthoGuiRolePrivate;
+struct _ZakAuthoGuiRolePrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *w;
gint id;
};
-G_DEFINE_TYPE (AutozGuiRole, autoz_gui_role, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiRole, zak_autho_gui_role, G_TYPE_OBJECT)
static void
-autoz_gui_role_class_init (AutozGuiRoleClass *klass)
+zak_autho_gui_role_class_init (ZakAuthoGuiRoleClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiRolePrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiRolePrivate));
- object_class->set_property = autoz_gui_role_set_property;
- object_class->get_property = autoz_gui_role_get_property;
+ object_class->set_property = zak_autho_gui_role_set_property;
+ object_class->get_property = zak_autho_gui_role_get_property;
/**
- * AutozGuiRole::updated:
+ * ZakAuthoGuiRole::updated:
* @role:
*
*/
}
static void
-autoz_gui_role_init (AutozGuiRole *role)
+zak_autho_gui_role_init (ZakAuthoGuiRole *role)
{
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
}
/**
- * autoz_gui_role_new:
+ * zak_autho_gui_role_new:
* @commons:
* @id:
*
- * Returns: the newly created #AutozGuiRole object.
+ * Returns: the newly created #ZakAuthoGuiRole object.
*/
-AutozGuiRole
-*autoz_gui_role_new (AutozGuiCommons *commons, gint id)
+ZakAuthoGuiRole
+*zak_autho_gui_role_new (ZakAuthoGuiCommons *commons, gint id)
{
GError *error;
- AutozGuiRole *a = AUTOZ_GUI_ROLE (g_object_new (autoz_gui_role_get_type (), NULL));
+ ZakAuthoGuiRole *a = ZAK_AUTHO_GUI_ROLE (g_object_new (zak_autho_gui_role_get_type (), NULL));
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (a);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (a);
priv->commons = commons;
priv->w = GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "w_role"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button3"),
- "clicked", G_CALLBACK (autoz_gui_role_on_btn_cancel_clicked), (gpointer *)a);
+ "clicked", G_CALLBACK (zak_autho_gui_role_on_btn_cancel_clicked), (gpointer *)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button4"),
- "clicked", G_CALLBACK (autoz_gui_role_on_btn_save_clicked), (gpointer *)a);
+ "clicked", G_CALLBACK (zak_autho_gui_role_on_btn_save_clicked), (gpointer *)a);
priv->id = id;
if (priv->id == 0)
else
{
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label2")), g_strdup_printf ("%d", priv->id));
- autoz_gui_role_load (a);
+ zak_autho_gui_role_load (a);
}
return a;
}
/**
- * autoz_gui_role_get_widget:
+ * zak_autho_gui_role_get_widget:
* @role:
*
*/
GtkWidget
-*autoz_gui_role_get_widget (AutozGuiRole *role)
+*zak_autho_gui_role_get_widget (ZakAuthoGuiRole *role)
{
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
return priv->w;
}
/* PRIVATE */
static void
-autoz_gui_role_load (AutozGuiRole *role)
+zak_autho_gui_role_load (ZakAuthoGuiRole *role)
{
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
GError *error;
gchar *sql;
}
static void
-autoz_gui_role_save (AutozGuiRole *role)
+zak_autho_gui_role_save (ZakAuthoGuiRole *role)
{
const GdaDsnInfo *info;
GError *error;
GdaDataModel *dm;
GtkWidget *dialog;
- AutozGuiRoleClass *klass = AUTOZ_GUI_ROLE_GET_CLASS (role);
+ ZakAuthoGuiRoleClass *klass = ZAK_AUTHO_GUI_ROLE_GET_CLASS (role);
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (priv->commons->gtkbuilder, "entry1"))), "") == 0)
{
}
static void
-autoz_gui_role_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_role_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiRole *role = AUTOZ_GUI_ROLE (object);
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRole *role = ZAK_AUTHO_GUI_ROLE (object);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
switch (property_id)
{
}
static void
-autoz_gui_role_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_role_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiRole *role = AUTOZ_GUI_ROLE (object);
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRole *role = ZAK_AUTHO_GUI_ROLE (object);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_role_on_btn_cancel_clicked (GtkButton *button,
+zak_autho_gui_role_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiRole *role = (AutozGuiRole *)user_data;
+ ZakAuthoGuiRole *role = (ZakAuthoGuiRole *)user_data;
- AutozGuiRolePrivate *priv = AUTOZ_GUI_ROLE_GET_PRIVATE (role);
+ ZakAuthoGuiRolePrivate *priv = ZAK_AUTHO_GUI_ROLE_GET_PRIVATE (role);
gtk_widget_destroy (priv->w);
}
static void
-autoz_gui_role_on_btn_save_clicked (GtkButton *button,
+zak_autho_gui_role_on_btn_save_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_role_save ((AutozGuiRole *)user_data);
+ zak_autho_gui_role_save ((ZakAuthoGuiRole *)user_data);
}
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_ROLE_H__
-#define __AUTOZ_GUI_ROLE_H__
+#ifndef __ZAK_AUTHO_GUI_ROLE_H__
+#define __ZAK_AUTHO_GUI_ROLE_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_ROLE (autoz_gui_role_get_type ())
-#define AUTOZ_GUI_ROLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_ROLE, AutozGuiRole))
-#define AUTOZ_GUI_ROLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_ROLE, AutozGuiRoleClass))
-#define IS_AUTOZ_GUI_ROLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_ROLE))
-#define IS_AUTOZ_GUI_ROLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_ROLE))
-#define AUTOZ_GUI_ROLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_ROLE, AutozGuiRoleClass))
+#define TYPE_ZAK_AUTHO_GUI_ROLE (zak_autho_gui_role_get_type ())
+#define ZAK_AUTHO_GUI_ROLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_ROLE, ZakAuthoGuiRole))
+#define ZAK_AUTHO_GUI_ROLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_ROLE, ZakAuthoGuiRoleClass))
+#define IS_ZAK_AUTHO_GUI_ROLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_ROLE))
+#define IS_ZAK_AUTHO_GUI_ROLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_ROLE))
+#define ZAK_AUTHO_GUI_ROLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_ROLE, ZakAuthoGuiRoleClass))
-typedef struct _AutozGuiRole AutozGuiRole;
-typedef struct _AutozGuiRoleClass AutozGuiRoleClass;
+typedef struct _ZakAuthoGuiRole ZakAuthoGuiRole;
+typedef struct _ZakAuthoGuiRoleClass ZakAuthoGuiRoleClass;
-struct _AutozGuiRole
+struct _ZakAuthoGuiRole
{
GObject parent;
};
-struct _AutozGuiRoleClass
+struct _ZakAuthoGuiRoleClass
{
GObjectClass parent_class;
guint updated_signal_id;
};
-GType autoz_gui_role_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_role_get_type (void) G_GNUC_CONST;
-AutozGuiRole *autoz_gui_role_new (AutozGuiCommons *commons, gint id);
+ZakAuthoGuiRole *zak_autho_gui_role_new (ZakAuthoGuiCommons *commons, gint id);
-GtkWidget *autoz_gui_role_get_widget (AutozGuiRole *role);
+GtkWidget *zak_autho_gui_role_get_widget (ZakAuthoGuiRole *role);
G_END_DECLS
-#endif /* __AUTOZ_GUI_ROLE_H__ */
+#endif /* __ZAK_AUTHO_GUI_ROLE_H__ */
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
#include "roles.h"
#include "role.h"
-static void autoz_gui_roles_class_init (AutozGuiRolesClass *klass);
-static void autoz_gui_roles_init (AutozGuiRoles *roles);
+static void zak_autho_gui_roles_class_init (ZakAuthoGuiRolesClass *klass);
+static void zak_autho_gui_roles_init (ZakAuthoGuiRoles *roles);
-static void autoz_gui_roles_load (AutozGuiRoles *roles);
-static void autoz_gui_roles_edit (AutozGuiRoles *roles);
+static void zak_autho_gui_roles_load (ZakAuthoGuiRoles *roles);
+static void zak_autho_gui_roles_edit (ZakAuthoGuiRoles *roles);
-static void autoz_gui_roles_selected (AutozGuiRoles *roles);
-static void autoz_gui_roles_on_role_updated (gpointer instance, gpointer user_data);
+static void zak_autho_gui_roles_selected (ZakAuthoGuiRoles *roles);
+static void zak_autho_gui_roles_on_role_updated (gpointer instance, gpointer user_data);
-static void autoz_gui_roles_set_property (GObject *object,
+static void zak_autho_gui_roles_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
-static void autoz_gui_roles_get_property (GObject *object,
+static void zak_autho_gui_roles_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void autoz_gui_roles_on_btn_new_clicked (GtkButton *button,
+static void zak_autho_gui_roles_on_btn_new_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_roles_on_btn_edit_clicked (GtkButton *button,
+static void zak_autho_gui_roles_on_btn_edit_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_roles_on_btn_delete_clicked (GtkButton *button,
+static void zak_autho_gui_roles_on_btn_delete_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_roles_on_trv_autoz_gui_roles_row_activated (GtkTreeView *tree_view,
+static void zak_autho_gui_roles_on_trv_zak_autho_gui_roles_row_activated (GtkTreeView *tree_view,
GtkTreePath *tree_path,
GtkTreeViewColumn *column,
gpointer user_data);
-static void autoz_gui_roles_on_btn_cancel_clicked (GtkButton *button,
+static void zak_autho_gui_roles_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data);
-static void autoz_gui_roles_on_btn_ok_clicked (GtkButton *button,
+static void zak_autho_gui_roles_on_btn_ok_clicked (GtkButton *button,
gpointer user_data);
-#define AUTOZ_GUI_ROLES_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_AUTOZ_GUI_ROLES, AutozGuiRolesPrivate))
+#define ZAK_AUTHO_GUI_ROLES_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_ZAK_AUTHO_GUI_ROLES, ZakAuthoGuiRolesPrivate))
enum
{
COL_NAME
};
-typedef struct _AutozGuiRolesPrivate AutozGuiRolesPrivate;
-struct _AutozGuiRolesPrivate
+typedef struct _ZakAuthoGuiRolesPrivate ZakAuthoGuiRolesPrivate;
+struct _ZakAuthoGuiRolesPrivate
{
- AutozGuiCommons *commons;
+ ZakAuthoGuiCommons *commons;
GtkWidget *widget;
gboolean selection;
};
-G_DEFINE_TYPE (AutozGuiRoles, autoz_gui_roles, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ZakAuthoGuiRoles, zak_autho_gui_roles, G_TYPE_OBJECT)
static void
-autoz_gui_roles_class_init (AutozGuiRolesClass *klass)
+zak_autho_gui_roles_class_init (ZakAuthoGuiRolesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (AutozGuiRolesPrivate));
+ g_type_class_add_private (object_class, sizeof (ZakAuthoGuiRolesPrivate));
- object_class->set_property = autoz_gui_roles_set_property;
- object_class->get_property = autoz_gui_roles_get_property;
+ object_class->set_property = zak_autho_gui_roles_set_property;
+ object_class->get_property = zak_autho_gui_roles_get_property;
/**
* Roles::selected:
}
static void
-autoz_gui_roles_init (AutozGuiRoles *roles)
+zak_autho_gui_roles_init (ZakAuthoGuiRoles *roles)
{
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
}
/**
- * autoz_gui_roles_new:
+ * zak_autho_gui_roles_new:
* @commons:
* @selection:
*
- * Returns: the newly created #AutozGuiRoles object.
+ * Returns: the newly created #ZakAuthoGuiRoles object.
*/
-AutozGuiRoles
-*autoz_gui_roles_new (AutozGuiCommons *commons, gboolean selection)
+ZakAuthoGuiRoles
+*zak_autho_gui_roles_new (ZakAuthoGuiCommons *commons, gboolean selection)
{
GError *error;
- AutozGuiRoles *a = AUTOZ_GUI_ROLES (g_object_new (autoz_gui_roles_get_type (), NULL));
+ ZakAuthoGuiRoles *a = ZAK_AUTHO_GUI_ROLES (g_object_new (zak_autho_gui_roles_get_type (), NULL));
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (a);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (a);
priv->commons = commons;
priv->selection = selection;
priv->lstore_roles = GTK_LIST_STORE (gtk_builder_get_object (priv->commons->gtkbuilder, "lstore_roles"));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button7"),
- "clicked", G_CALLBACK (autoz_gui_roles_on_btn_new_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_roles_on_btn_new_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button9"),
- "clicked", G_CALLBACK (autoz_gui_roles_on_btn_edit_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_roles_on_btn_edit_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button8"),
- "clicked", G_CALLBACK (autoz_gui_roles_on_btn_delete_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_roles_on_btn_delete_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "treeview2"),
- "row-activated", G_CALLBACK (autoz_gui_roles_on_trv_autoz_gui_roles_row_activated), (gpointer)a);
+ "row-activated", G_CALLBACK (zak_autho_gui_roles_on_trv_zak_autho_gui_roles_row_activated), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button10"),
- "clicked", G_CALLBACK (autoz_gui_roles_on_btn_cancel_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_roles_on_btn_cancel_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button13"),
- "clicked", G_CALLBACK (autoz_gui_roles_on_btn_ok_clicked), (gpointer)a);
+ "clicked", G_CALLBACK (zak_autho_gui_roles_on_btn_ok_clicked), (gpointer)a);
if (!selection)
{
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "button13")));
}
- autoz_gui_roles_load (a);
+ zak_autho_gui_roles_load (a);
return a;
}
/**
- * autoz_gui_roles_get_widget:
+ * zak_autho_gui_roles_get_widget:
* @roles:
*
*/
GtkWidget
-*autoz_gui_roles_get_widget (AutozGuiRoles *roles)
+*zak_autho_gui_roles_get_widget (ZakAuthoGuiRoles *roles)
{
- AutozGuiRolesPrivate *priv;
+ ZakAuthoGuiRolesPrivate *priv;
- g_return_val_if_fail (IS_AUTOZ_GUI_ROLES (roles), NULL);
+ g_return_val_if_fail (IS_ZAK_AUTHO_GUI_ROLES (roles), NULL);
- priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
return priv->widget;
}
/* PRIVATE */
static void
-autoz_gui_roles_load (AutozGuiRoles *roles)
+zak_autho_gui_roles_load (ZakAuthoGuiRoles *roles)
{
GtkTreeIter iter;
gint rows;
gint row;
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
gtk_list_store_clear (priv->lstore_roles);
}
static void
-autoz_gui_roles_edit (AutozGuiRoles *roles)
+zak_autho_gui_roles_edit (ZakAuthoGuiRoles *roles)
{
GtkTreeIter iter;
guint id;
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
if (gtk_tree_selection_get_selected (priv->sel_selection, NULL, &iter))
{
COL_ID, &id,
-1);
- AutozGuiRole *c = autoz_gui_role_new (priv->commons, id);
+ ZakAuthoGuiRole *c = zak_autho_gui_role_new (priv->commons, id);
g_signal_connect (G_OBJECT (c), "updated",
- G_CALLBACK (autoz_gui_roles_on_role_updated), (gpointer)roles);
+ G_CALLBACK (zak_autho_gui_roles_on_role_updated), (gpointer)roles);
- w = autoz_gui_role_get_widget (c);
+ w = zak_autho_gui_role_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), priv->selection ? GTK_WINDOW (priv->widget) : GTK_WINDOW (gtk_builder_get_object (priv->commons->gtkbuilder, "w_main")));
gtk_widget_show_all (w);
}
}
static void
-autoz_gui_roles_on_role_updated (gpointer instance, gpointer user_data)
+zak_autho_gui_roles_on_role_updated (gpointer instance, gpointer user_data)
{
- autoz_gui_roles_load ((AutozGuiRoles *)user_data);
+ zak_autho_gui_roles_load ((ZakAuthoGuiRoles *)user_data);
}
static void
-autoz_gui_roles_selected (AutozGuiRoles *roles)
+zak_autho_gui_roles_selected (ZakAuthoGuiRoles *roles)
{
GtkTreeIter iter;
guint id;
- AutozGuiRolesClass *klass = AUTOZ_GUI_ROLES_GET_CLASS (roles);
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRolesClass *klass = ZAK_AUTHO_GUI_ROLES_GET_CLASS (roles);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
if (gtk_tree_selection_get_selected (priv->sel_selection, NULL, &iter))
{
}
static void
-autoz_gui_roles_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+zak_autho_gui_roles_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- AutozGuiRoles *roles = AUTOZ_GUI_ROLES (object);
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRoles *roles = ZAK_AUTHO_GUI_ROLES (object);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
switch (property_id)
{
}
static void
-autoz_gui_roles_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+zak_autho_gui_roles_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- AutozGuiRoles *roles = AUTOZ_GUI_ROLES (object);
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRoles *roles = ZAK_AUTHO_GUI_ROLES (object);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
switch (property_id)
{
/* CALLBACK */
static void
-autoz_gui_roles_on_btn_new_clicked (GtkButton *button,
+zak_autho_gui_roles_on_btn_new_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *w;
- AutozGuiRoles *roles = (AutozGuiRoles *)user_data;
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRoles *roles = (ZakAuthoGuiRoles *)user_data;
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
- AutozGuiRole *c = autoz_gui_role_new (priv->commons, 0);
+ ZakAuthoGuiRole *c = zak_autho_gui_role_new (priv->commons, 0);
g_signal_connect (G_OBJECT (c), "updated",
- G_CALLBACK (autoz_gui_roles_on_role_updated), (gpointer)roles);
+ G_CALLBACK (zak_autho_gui_roles_on_role_updated), (gpointer)roles);
- w = autoz_gui_role_get_widget (c);
+ w = zak_autho_gui_role_get_widget (c);
gtk_window_set_transient_for (GTK_WINDOW (w), priv->selection ? GTK_WINDOW (priv->widget) : GTK_WINDOW (gtk_builder_get_object (priv->commons->gtkbuilder, "w_main")));
gtk_widget_show_all (w);
}
static void
-autoz_gui_roles_on_btn_edit_clicked (GtkButton *button,
+zak_autho_gui_roles_on_btn_edit_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_roles_edit ((AutozGuiRoles *)user_data);
+ zak_autho_gui_roles_edit ((ZakAuthoGuiRoles *)user_data);
}
static void
-autoz_gui_roles_on_btn_delete_clicked (GtkButton *button,
+zak_autho_gui_roles_on_btn_delete_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dialog;
GtkTreeIter iter;
guint id;
- AutozGuiRoles *roles = (AutozGuiRoles *)user_data;
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE (roles);
+ ZakAuthoGuiRoles *roles = (ZakAuthoGuiRoles *)user_data;
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE (roles);
if (gtk_tree_selection_get_selected (priv->sel_selection, NULL, &iter))
{
gtk_widget_destroy (dialog);
}
- autoz_gui_roles_load (roles);
+ zak_autho_gui_roles_load (roles);
}
}
else
}
static void
-autoz_gui_roles_on_trv_autoz_gui_roles_row_activated (GtkTreeView *tree_view,
+zak_autho_gui_roles_on_trv_zak_autho_gui_roles_row_activated (GtkTreeView *tree_view,
GtkTreePath *tree_path,
GtkTreeViewColumn *column,
gpointer user_data)
{
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE ((AutozGuiRoles *)user_data);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE ((ZakAuthoGuiRoles *)user_data);
if (priv->selection)
{
- autoz_gui_roles_selected ((AutozGuiRoles *)user_data);
+ zak_autho_gui_roles_selected ((ZakAuthoGuiRoles *)user_data);
}
else
{
- autoz_gui_roles_edit ((AutozGuiRoles *)user_data);
+ zak_autho_gui_roles_edit ((ZakAuthoGuiRoles *)user_data);
}
}
static void
-autoz_gui_roles_on_btn_cancel_clicked (GtkButton *button,
+zak_autho_gui_roles_on_btn_cancel_clicked (GtkButton *button,
gpointer user_data)
{
- AutozGuiRolesPrivate *priv = AUTOZ_GUI_ROLES_GET_PRIVATE ((AutozGuiRoles *)user_data);
+ ZakAuthoGuiRolesPrivate *priv = ZAK_AUTHO_GUI_ROLES_GET_PRIVATE ((ZakAuthoGuiRoles *)user_data);
gtk_widget_destroy (priv->widget);
g_object_unref (G_OBJECT (user_data));
}
static void
-autoz_gui_roles_on_btn_ok_clicked (GtkButton *button,
+zak_autho_gui_roles_on_btn_ok_clicked (GtkButton *button,
gpointer user_data)
{
- autoz_gui_roles_selected ((AutozGuiRoles *)user_data);
+ zak_autho_gui_roles_selected ((ZakAuthoGuiRoles *)user_data);
}
-/*
+/*
* Copyright (C) 2011-2012 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
*
*/
-#ifndef __AUTOZ_GUI_ROLES_H__
-#define __AUTOZ_GUI_ROLES_H__
+#ifndef __ZAK_AUTHO_GUI_ROLES_H__
+#define __ZAK_AUTHO_GUI_ROLES_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define TYPE_AUTOZ_GUI_ROLES (autoz_gui_roles_get_type ())
-#define AUTOZ_GUI_ROLES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOZ_GUI_ROLES, AutozGuiRoles))
-#define AUTOZ_GUI_ROLES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOZ_GUI_ROLES, AutozGuiRolesClass))
-#define IS_AUTOZ_GUI_ROLES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOZ_GUI_ROLES))
-#define IS_AUTOZ_GUI_ROLES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOZ_GUI_ROLES))
-#define AUTOZ_GUI_ROLES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOZ_GUI_ROLES, AutozGuiRolesClass))
+#define TYPE_ZAK_AUTHO_GUI_ROLES (zak_autho_gui_roles_get_type ())
+#define ZAK_AUTHO_GUI_ROLES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAK_AUTHO_GUI_ROLES, ZakAuthoGuiRoles))
+#define ZAK_AUTHO_GUI_ROLES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZAK_AUTHO_GUI_ROLES, ZakAuthoGuiRolesClass))
+#define IS_ZAK_AUTHO_GUI_ROLES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAK_AUTHO_GUI_ROLES))
+#define IS_ZAK_AUTHO_GUI_ROLES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAK_AUTHO_GUI_ROLES))
+#define ZAK_AUTHO_GUI_ROLES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZAK_AUTHO_GUI_ROLES, ZakAuthoGuiRolesClass))
-typedef struct _AutozGuiRoles AutozGuiRoles;
-typedef struct _AutozGuiRolesClass AutozGuiRolesClass;
+typedef struct _ZakAuthoGuiRoles ZakAuthoGuiRoles;
+typedef struct _ZakAuthoGuiRolesClass ZakAuthoGuiRolesClass;
-struct _AutozGuiRoles
+struct _ZakAuthoGuiRoles
{
GObject parent;
};
-struct _AutozGuiRolesClass
+struct _ZakAuthoGuiRolesClass
{
GObjectClass parent_class;
guint selected_signal_id;
};
-GType autoz_gui_roles_get_type (void) G_GNUC_CONST;
+GType zak_autho_gui_roles_get_type (void) G_GNUC_CONST;
-AutozGuiRoles *autoz_gui_roles_new (AutozGuiCommons *commons, gboolean selection);
+ZakAuthoGuiRoles *zak_autho_gui_roles_new (ZakAuthoGuiCommons *commons, gboolean selection);
-GtkWidget *autoz_gui_roles_get_widget (AutozGuiRoles *roles);
+GtkWidget *zak_autho_gui_roles_get_widget (ZakAuthoGuiRoles *roles);
G_END_DECLS
-#endif /* __AUTOZ_GUI_ROLES_H__ */
+#endif /* __ZAK_AUTHO_GUI_ROLES_H__ */