summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b65096)
raw | patch | inline | side by side (parent: 0b65096)
author | joncruz <joncruz@users.sourceforge.net> | |
Thu, 4 Dec 2008 09:19:00 +0000 (09:19 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Thu, 4 Dec 2008 09:19:00 +0000 (09:19 +0000) |
index a1bdc61b435f0cab99adcacd25c9f2c6d048309e..f24a6781b134509b05ebf494edff50d73ebee6a2 100644 (file)
@@ -53,20 +53,27 @@ static void sp_gradient_selector_spread_activate (GtkWidget *widget, SPGradientS
static GtkVBoxClass *parent_class;
static guint signals[LAST_SIGNAL] = {0};
-GtkType
-sp_gradient_selector_get_type (void)
+GType sp_gradient_selector_get_type(void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (!type) {
- GtkTypeInfo info = {
- "SPGradientSelector",
- sizeof (SPGradientSelector),
- sizeof (SPGradientSelectorClass),
- (GtkClassInitFunc) sp_gradient_selector_class_init,
- (GtkObjectInitFunc) sp_gradient_selector_init,
- NULL, NULL, NULL
+ static const GTypeInfo info = {
+ sizeof(SPGradientSelectorClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) sp_gradient_selector_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof(SPGradientSelector),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) sp_gradient_selector_init,
+ 0, /* value_table */
};
- type = gtk_type_unique (GTK_TYPE_VBOX, &info);
+
+ type = g_type_register_static( GTK_TYPE_VBOX,
+ "SPGradientSelector",
+ &info,
+ static_cast< GTypeFlags > (0) );
}
return type;
}
index 879e7ccfd2b32549f120273ad1e1a922f94b0203..e68dfecfcbbe406ff6ecd9f943645c83e2e7950d 100644 (file)
void (* changed) (SPGradientSelector *sel);
};
-GtkType sp_gradient_selector_get_type (void);
+GType sp_gradient_selector_get_type(void);
GtkWidget *sp_gradient_selector_new (void);
index 319ef4be191d7fc44c3649649791a7f3d550f0a8..1ab8fe435d7fb918448d829cc6df88e21b08ae8b 100644 (file)
}
static void
-gr_tb_selection_modified (Inkscape::Selection *selection, guint flags, gpointer data)
+gr_tb_selection_modified (Inkscape::Selection *selection, guint /*flags*/, gpointer data)
{
gr_tb_selection_changed (selection, data);
}
static void
-gr_drag_selection_changed (gpointer dragger, gpointer data)
+gr_drag_selection_changed (gpointer /*dragger*/, gpointer data)
{
gr_tb_selection_changed (NULL, data);
}
static void
-gr_defs_release (SPObject *defs, GtkWidget *widget)
+gr_defs_release (SPObject */*defs*/, GtkWidget *widget)
{
gr_tb_selection_changed (NULL, (gpointer) widget);
}
static void
-gr_defs_modified (SPObject *defs, guint flags, GtkWidget *widget)
+gr_defs_modified (SPObject */*defs*/, guint /*flags*/, GtkWidget *widget)
{
gr_tb_selection_changed (NULL, (gpointer) widget);
}
-static void gr_disconnect_sigc (GObject *obj, sigc::connection *connection) {
+static void gr_disconnect_sigc (GObject */*obj*/, sigc::connection *connection) {
connection->disconnect();
delete connection;
}
static void
-gr_edit (GtkWidget *button, GtkWidget *widget)
+gr_edit (GtkWidget */*button*/, GtkWidget *widget)
{
GtkWidget *om = (GtkWidget *) g_object_get_data (G_OBJECT(widget), "menu");
index b1ff7868997798a80a8420a2008fe9307f48c156..1f0c077546bc6aa409e3e8a1a140cfddaa68fbb2 100644 (file)
static GtkVBoxClass *parent_class;
static guint signals[LAST_SIGNAL] = {0};
+// TODO FIXME kill these globals!!!
static GtkWidget *dlg = NULL;
static win_data wd;
static gint x = -1000, y = -1000, w = 0, h = 0; // impossible original values to make sure they are read from prefs
static Glib::ustring const prefs_path = "/dialogs/gradienteditor/";
-GtkType
-sp_gradient_vector_selector_get_type (void)
+GType sp_gradient_vector_selector_get_type(void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (!type) {
- GtkTypeInfo info = {
- "SPGradientVectorSelector",
- sizeof (SPGradientVectorSelector),
- sizeof (SPGradientVectorSelectorClass),
- (GtkClassInitFunc) sp_gradient_vector_selector_class_init,
- (GtkObjectInitFunc) sp_gradient_vector_selector_init,
- NULL, NULL, NULL
+ static const GTypeInfo info = {
+ sizeof(SPGradientVectorSelectorClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) sp_gradient_vector_selector_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof(SPGradientVectorSelector),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) sp_gradient_vector_selector_init,
+ 0, /* value_table */
};
- type = gtk_type_unique (GTK_TYPE_VBOX, &info);
+
+ type = g_type_register_static( GTK_TYPE_VBOX,
+ "SPGradientVectorSelector",
+ &info,
+ static_cast< GTypeFlags > (0) );
}
return type;
}
}
static void
-sp_gvs_gradient_release (SPObject *obj, SPGradientVectorSelector *gvs)
+sp_gvs_gradient_release (SPObject */*obj*/, SPGradientVectorSelector *gvs)
{
/* Disconnect gradient */
if (gvs->gr) {
}
static void
-sp_gvs_defs_release (SPObject *defs, SPGradientVectorSelector *gvs)
+sp_gvs_defs_release (SPObject */*defs*/, SPGradientVectorSelector *gvs)
{
gvs->doc = NULL;
}
static void
-sp_gvs_defs_modified (SPObject *defs, guint flags, SPGradientVectorSelector *gvs)
+sp_gvs_defs_modified (SPObject */*defs*/, guint /*flags*/, SPGradientVectorSelector *gvs)
{
/* fixme: We probably have to check some flags here (Lauris) */
@@ -429,7 +437,7 @@ static void update_stop_list( GtkWidget *mnu, SPGradient *gradient, SPStop *new_
static gboolean blocked = FALSE;
-static void grad_edit_dia_stop_added_or_removed (Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, gpointer data)
+static void grad_edit_dia_stop_added_or_removed (Inkscape::XML::Node */*repr*/, Inkscape::XML::Node */*child*/, Inkscape::XML::Node */*ref*/, gpointer data)
{
GtkWidget *vb = GTK_WIDGET(data);
GtkWidget *mnu = (GtkWidget *)g_object_get_data (G_OBJECT(vb), "stopmenu");
static void
-sp_grd_ed_add_stop (GtkWidget *widget, GtkWidget *vb)
+sp_grd_ed_add_stop (GtkWidget */*widget*/, GtkWidget *vb)
{
SPGradient *gradient = (SPGradient *) g_object_get_data (G_OBJECT(vb), "gradient");
verify_grad (gradient);
GtkWidget *offslide =GTK_WIDGET (g_object_get_data (G_OBJECT (vb), "offslide"));
gtk_widget_set_sensitive (offslide, TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (offspin), TRUE);
- sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT,
+ sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT,
_("Add gradient stop"));
}
static void
-sp_grd_ed_del_stop (GtkWidget *widget, GtkWidget *vb)
+sp_grd_ed_del_stop (GtkWidget */*widget*/, GtkWidget *vb)
{
SPGradient *gradient = (SPGradient *)g_object_get_data (G_OBJECT(vb), "gradient");
SP_OBJECT_REPR(gradient)->removeChild(SP_OBJECT_REPR(stop));
sp_gradient_vector_widget_load_gradient (vb, gradient);
update_stop_list(GTK_WIDGET(mnu), gradient, NULL);
- sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT,
+ sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT,
_("Delete gradient stop"));
}
/* Signals */
- gtk_signal_connect (GTK_OBJECT (Offset_adj), "value_changed",
+ gtk_signal_connect (GTK_OBJECT (Offset_adj), "value_changed",
GTK_SIGNAL_FUNC (offadjustmentChanged), vb);
// gtk_signal_connect (GTK_OBJECT (slider), "changed", GTK_SIGNAL_FUNC (offsliderChanged), vb);
@@ -1040,7 +1048,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient
}
static void
-sp_gradient_vector_dialog_destroy (GtkObject *object, gpointer data)
+sp_gradient_vector_dialog_destroy (GtkObject */*object*/, gpointer /*data*/)
{
sp_signal_disconnect_by_data (INKSCAPE, dlg);
wd.win = dlg = NULL;
}
static gboolean
-sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget *dialog)
+sp_gradient_vector_dialog_delete (GtkWidget */*widget*/, GdkEvent */*event*/, GtkWidget */*dialog*/)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
gtk_window_get_size ((GtkWindow *) dlg, &w, &h);
@@ -1068,7 +1076,7 @@ sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget
/* Widget destroy handler */
static void
-sp_gradient_vector_widget_destroy (GtkObject *object, gpointer data)
+sp_gradient_vector_widget_destroy (GtkObject *object, gpointer /*data*/)
{
GObject *gradient;
}
static void
-sp_gradient_vector_gradient_release (SPObject *object, GtkWidget *widget)
+sp_gradient_vector_gradient_release (SPObject */*object*/, GtkWidget *widget)
{
sp_gradient_vector_widget_load_gradient (widget, NULL);
}
static void
-sp_gradient_vector_gradient_modified (SPObject *object, guint flags, GtkWidget *widget)
+sp_gradient_vector_gradient_modified (SPObject *object, guint /*flags*/, GtkWidget *widget)
{
SPGradient *gradient=SP_GRADIENT(object);
if (!blocked) {
index bac85177700fdfd0c7658d471443f60c909f95b9..ea1f5159fee1390b4c224c87bafe2e24218a1d9d 100644 (file)
void (* vector_set) (SPGradientVectorSelector *gvs, SPGradient *gr);
};
-GtkType sp_gradient_vector_selector_get_type (void);
+GType sp_gradient_vector_selector_get_type(void);
GtkWidget *sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gradient);