diff options
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.h | 2 | ||||
| -rw-r--r-- | src/widgets/font-selector.h | 2 | ||||
| -rw-r--r-- | src/widgets/gradient-image.cpp | 24 | ||||
| -rw-r--r-- | src/widgets/gradient-image.h | 2 | ||||
| -rw-r--r-- | src/widgets/paint-selector.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/paint-selector.h | 2 | ||||
| -rw-r--r-- | src/widgets/ruler.cpp | 54 | ||||
| -rw-r--r-- | src/widgets/ruler.h | 4 | ||||
| -rw-r--r-- | src/widgets/sp-attribute-widget.cpp | 4 | ||||
| -rw-r--r-- | src/widgets/sp-attribute-widget.h | 4 | ||||
| -rw-r--r-- | src/widgets/sp-color-notebook.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/sp-color-slider.cpp | 24 | ||||
| -rw-r--r-- | src/widgets/sp-color-slider.h | 2 | ||||
| -rw-r--r-- | src/widgets/sp-widget.cpp | 27 | ||||
| -rw-r--r-- | src/widgets/sp-widget.h | 2 | ||||
| -rw-r--r-- | src/widgets/sp-xmlview-attr-list.h | 2 | ||||
| -rw-r--r-- | src/widgets/sp-xmlview-content.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/sp-xmlview-content.h | 2 | ||||
| -rw-r--r-- | src/widgets/sp-xmlview-tree.cpp | 24 | ||||
| -rw-r--r-- | src/widgets/sp-xmlview-tree.h | 2 |
21 files changed, 88 insertions, 103 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 0d890fa86..3c2d60638 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -254,7 +254,7 @@ static GTimer *overallTimer = 0; */ GType SPDesktopWidget::getType(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { GTypeInfo info = { sizeof(SPDesktopWidgetClass), diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index 6c5af0aac..fdf651287 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -238,7 +238,7 @@ struct SPDesktopWidget { Inkscape::UI::Widget::Dock* getDock(); - static GtkType getType(); + static GType getType(); static SPDesktopWidget* createInstance(SPNamedView *namedview); void updateNamedview(); diff --git a/src/widgets/font-selector.h b/src/widgets/font-selector.h index febd4a34a..3fc425f65 100644 --- a/src/widgets/font-selector.h +++ b/src/widgets/font-selector.h @@ -27,7 +27,7 @@ struct SPFontSelector; /* SPFontSelector */ -GtkType sp_font_selector_get_type (void); +GType sp_font_selector_get_type (void); GtkWidget *sp_font_selector_new (void); diff --git a/src/widgets/gradient-image.cpp b/src/widgets/gradient-image.cpp index 115935f50..eb4ab789d 100644 --- a/src/widgets/gradient-image.cpp +++ b/src/widgets/gradient-image.cpp @@ -36,24 +36,22 @@ static void sp_gradient_image_update (SPGradientImage *img); static GtkWidgetClass *parent_class; -GtkType +GType sp_gradient_image_get_type (void) { - //TODO: switch to GObject - // GtkType and such calls were deprecated a while back with the - // introduction of GObject as a separate layer, with GType instead. --JonCruz - - static GtkType type = 0; + static GType type = 0; if (!type) { - GtkTypeInfo info = { - (gchar*) "SPGradientImage", - sizeof (SPGradientImage), + GTypeInfo info = { sizeof (SPGradientImageClass), - (GtkClassInitFunc) sp_gradient_image_class_init, - (GtkObjectInitFunc) sp_gradient_image_init, - NULL, NULL, NULL + NULL, NULL, + (GClassInitFunc) sp_gradient_image_class_init, + NULL, NULL, + sizeof (SPGradientImage), + 0, + (GInstanceInitFunc) sp_gradient_image_init, + NULL }; - type = gtk_type_unique (GTK_TYPE_WIDGET, &info); + type = g_type_register_static (GTK_TYPE_WIDGET, "SPGradientImage", &info, (GTypeFlags)0); } return type; } diff --git a/src/widgets/gradient-image.h b/src/widgets/gradient-image.h index ae5d40f56..0fbed879f 100644 --- a/src/widgets/gradient-image.h +++ b/src/widgets/gradient-image.h @@ -40,7 +40,7 @@ struct SPGradientImageClass { GtkWidgetClass parent_class; }; -GtkType sp_gradient_image_get_type (void); +GType sp_gradient_image_get_type (void); GtkWidget *sp_gradient_image_new (SPGradient *gradient); void sp_gradient_image_set_gradient (SPGradientImage *gi, SPGradient *gr); diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index f9ec4208f..6b3e0c4b5 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -134,7 +134,7 @@ static SPGradientSelector *getGradientFromData(SPPaintSelector const *psel) GType sp_paint_selector_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { GTypeInfo info = { sizeof(SPPaintSelectorClass), diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h index c0e44683b..ebcac380f 100644 --- a/src/widgets/paint-selector.h +++ b/src/widgets/paint-selector.h @@ -114,7 +114,7 @@ struct SPPaintSelectorClass { void (* fillrule_changed) (SPPaintSelector *psel, SPPaintSelector::FillRule fillrule); }; -GtkType sp_paint_selector_get_type (void); +GType sp_paint_selector_get_type (void); SPPaintSelector *sp_paint_selector_new(FillOrStroke kind); diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index 704d395f7..f3f4164a5 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -37,30 +37,25 @@ static gint sp_hruler_motion_notify (GtkWidget *widget, GdkEventMotion *eve static GtkWidgetClass *hruler_parent_class; -GtkType +GType sp_hruler_get_type (void) { - //TODO: switch to GObject - // GtkType and such calls were deprecated a while back with the - // introduction of GObject as a separate layer, with GType instead. --JonCruz - - static GtkType hruler_type = 0; + static GType hruler_type = 0; if (!hruler_type) { - static const GtkTypeInfo hruler_info = - { - (gchar*) "SPHRuler", - sizeof (SPHRuler), + static const GTypeInfo hruler_info = { sizeof (SPHRulerClass), - (GtkClassInitFunc) sp_hruler_class_init, - (GtkObjectInitFunc) sp_hruler_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, + NULL, NULL, + (GClassInitFunc) sp_hruler_class_init, + NULL, NULL, + sizeof (SPHRuler), + 0, + (GInstanceInitFunc) sp_hruler_init, + NULL }; - hruler_type = gtk_type_unique (gtk_ruler_get_type (), &hruler_info); + hruler_type = g_type_register_static (gtk_ruler_get_type (), "SPHRuler", &hruler_info, (GTypeFlags)0); } return hruler_type; @@ -128,30 +123,25 @@ static void sp_vruler_size_request (GtkWidget *widget, GtkRequisition *requisiti static GtkWidgetClass *vruler_parent_class; -GtkType +GType sp_vruler_get_type (void) { - //TODO: switch to GObject - // GtkType and such calls were deprecated a while back with the - // introduction of GObject as a separate layer, with GType instead. --JonCruz - - static GtkType vruler_type = 0; + static GType vruler_type = 0; if (!vruler_type) { - static const GtkTypeInfo vruler_info = - { - (gchar*) "SPVRuler", - sizeof (SPVRuler), + static const GTypeInfo vruler_info = { sizeof (SPVRulerClass), - (GtkClassInitFunc) sp_vruler_class_init, - (GtkObjectInitFunc) sp_vruler_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, + NULL, NULL, + (GClassInitFunc) sp_vruler_class_init, + NULL, NULL, + sizeof (SPVRuler), + 0, + (GInstanceInitFunc) sp_vruler_init, + NULL }; - vruler_type = gtk_type_unique (gtk_ruler_get_type (), &vruler_info); + vruler_type = g_type_register_static (gtk_ruler_get_type (), "SPVRuler", &vruler_info, (GTypeFlags)0); } return vruler_type; diff --git a/src/widgets/ruler.h b/src/widgets/ruler.h index 3c55b39c4..a774f12ef 100644 --- a/src/widgets/ruler.h +++ b/src/widgets/ruler.h @@ -38,7 +38,7 @@ struct SPHRulerClass }; -GtkType sp_hruler_get_type (void); +GType sp_hruler_get_type (void); GtkWidget* sp_hruler_new (void); @@ -63,7 +63,7 @@ struct SPVRulerClass }; -GtkType sp_vruler_get_type (void); +GType sp_vruler_get_type (void); GtkWidget* sp_vruler_new (void); diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp index 66ccb27f2..61863f31b 100644 --- a/src/widgets/sp-attribute-widget.cpp +++ b/src/widgets/sp-attribute-widget.cpp @@ -42,7 +42,7 @@ static GtkEntryClass *parent_class; GType sp_attribute_widget_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { GTypeInfo info = { sizeof(SPAttributeWidgetClass), @@ -361,7 +361,7 @@ static GtkVBoxClass *table_parent_class; GType sp_attribute_table_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { GTypeInfo info = { sizeof(SPAttributeTableClass), diff --git a/src/widgets/sp-attribute-widget.h b/src/widgets/sp-attribute-widget.h index 5d23e6754..d5445c8bb 100644 --- a/src/widgets/sp-attribute-widget.h +++ b/src/widgets/sp-attribute-widget.h @@ -64,7 +64,7 @@ struct SPAttributeWidgetClass { GtkEntryClass entry_class; }; -GtkType sp_attribute_widget_get_type (void); +GType sp_attribute_widget_get_type (void); GtkWidget *sp_attribute_widget_new (SPObject *object, const gchar *attribute); GtkWidget *sp_attribute_widget_new_repr (Inkscape::XML::Node *repr, const gchar *attribute); @@ -99,7 +99,7 @@ struct SPAttributeTableClass { GtkEntryClass entry_class; }; -GtkType sp_attribute_table_get_type (void); +GType sp_attribute_table_get_type (void); GtkWidget *sp_attribute_table_new ( SPObject *object, gint num_attr, const gchar **labels, diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index 06e990dfb..e3e28979d 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -62,7 +62,7 @@ static SPColorSelectorClass *parent_class; GType sp_color_notebook_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { GTypeInfo info = { sizeof(SPColorNotebookClass), diff --git a/src/widgets/sp-color-slider.cpp b/src/widgets/sp-color-slider.cpp index 7b365bc73..152f81324 100644 --- a/src/widgets/sp-color-slider.cpp +++ b/src/widgets/sp-color-slider.cpp @@ -54,24 +54,22 @@ static const guchar *sp_color_slider_render_map (gint x0, gint y0, gint width, g static GtkWidgetClass *parent_class; static guint slider_signals[LAST_SIGNAL] = {0}; -GtkType +GType sp_color_slider_get_type (void) { - //TODO: switch to GObject - // GtkType and such calls were deprecated a while back with the - // introduction of GObject as a separate layer, with GType instead. --JonCruz - - static GtkType type = 0; + static GType type = 0; if (!type) { - GtkTypeInfo info = { - (gchar*) "SPColorSlider", - sizeof (SPColorSlider), + GTypeInfo info = { sizeof (SPColorSliderClass), - (GtkClassInitFunc) sp_color_slider_class_init, - (GtkObjectInitFunc) sp_color_slider_init, - NULL, NULL, NULL + NULL, NULL, + (GClassInitFunc) sp_color_slider_class_init, + NULL, NULL, + sizeof (SPColorSlider), + 0, + (GInstanceInitFunc) sp_color_slider_init, + NULL }; - type = gtk_type_unique (GTK_TYPE_WIDGET, &info); + type = g_type_register_static (GTK_TYPE_WIDGET, "SPColorSlider", &info, (GTypeFlags)0); } return type; } diff --git a/src/widgets/sp-color-slider.h b/src/widgets/sp-color-slider.h index b8cfaf869..591d8368a 100644 --- a/src/widgets/sp-color-slider.h +++ b/src/widgets/sp-color-slider.h @@ -53,7 +53,7 @@ struct SPColorSliderClass { void (* changed) (SPColorSlider *slider); }; -GtkType sp_color_slider_get_type (void); +GType sp_color_slider_get_type (void); GtkWidget *sp_color_slider_new (GtkAdjustment *adjustment); diff --git a/src/widgets/sp-widget.cpp b/src/widgets/sp-widget.cpp index d5877db99..141f4afc1 100644 --- a/src/widgets/sp-widget.cpp +++ b/src/widgets/sp-widget.cpp @@ -43,24 +43,25 @@ static void sp_widget_set_selection (Inkscape::Application *inkscape, Inkscape:: static GtkBinClass *parent_class; static guint signals[LAST_SIGNAL] = {0}; -GtkType +GType sp_widget_get_type (void) { - //TODO: switch to GObject - // GtkType and such calls were deprecated a while back with the - // introduction of GObject as a separate layer, with GType instead. --JonCruz - - static GtkType type = 0; + static GType type = 0; if (!type) { - static const GtkTypeInfo info = { - (gchar*) "SPWidget", - sizeof (SPWidget), + static const GTypeInfo info = { sizeof (SPWidgetClass), - (GtkClassInitFunc) sp_widget_class_init, - (GtkObjectInitFunc) sp_widget_init, - NULL, NULL, NULL + NULL, NULL, + (GClassInitFunc) sp_widget_class_init, + NULL, NULL, + sizeof (SPWidget), + 0, + (GInstanceInitFunc) sp_widget_init, + NULL }; - type = gtk_type_unique (GTK_TYPE_BIN, &info); + type = g_type_register_static (GTK_TYPE_BIN, + "SPWidget", + &info, + (GTypeFlags)0); } return type; } diff --git a/src/widgets/sp-widget.h b/src/widgets/sp-widget.h index decd9c056..66320cd4d 100644 --- a/src/widgets/sp-widget.h +++ b/src/widgets/sp-widget.h @@ -42,7 +42,7 @@ struct SPWidgetClass { void (* set_selection) (SPWidget *spw, Inkscape::Selection *selection); }; -GtkType sp_widget_get_type (void); +GType sp_widget_get_type (void); /* fixme: Think (Lauris) */ /* Generic constructor for global widget */ diff --git a/src/widgets/sp-xmlview-attr-list.h b/src/widgets/sp-xmlview-attr-list.h index de79c7a37..9479dd77a 100644 --- a/src/widgets/sp-xmlview-attr-list.h +++ b/src/widgets/sp-xmlview-attr-list.h @@ -38,7 +38,7 @@ struct SPXMLViewAttrListClass void (* row_changed) (SPXMLViewAttrList *list, gint row); }; -GtkType sp_xmlview_attr_list_get_type (void); +GType sp_xmlview_attr_list_get_type (void); GtkWidget * sp_xmlview_attr_list_new (Inkscape::XML::Node * repr); #define SP_XMLVIEW_ATTR_LIST_GET_REPR(list) (SP_XMLVIEW_ATTR_LIST (list)->repr) diff --git a/src/widgets/sp-xmlview-content.cpp b/src/widgets/sp-xmlview-content.cpp index 75d68d25c..804bc1737 100644 --- a/src/widgets/sp-xmlview-content.cpp +++ b/src/widgets/sp-xmlview-content.cpp @@ -80,7 +80,7 @@ sp_xmlview_content_set_repr (SPXMLViewContent * text, Inkscape::XML::Node * repr GType sp_xmlview_content_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { GTypeInfo info = { diff --git a/src/widgets/sp-xmlview-content.h b/src/widgets/sp-xmlview-content.h index fe26891d0..941ef0be1 100644 --- a/src/widgets/sp-xmlview-content.h +++ b/src/widgets/sp-xmlview-content.h @@ -41,7 +41,7 @@ struct SPXMLViewContentClass GtkTextViewClass parent_class; }; -GtkType sp_xmlview_content_get_type (void); +GType sp_xmlview_content_get_type (void); GtkWidget * sp_xmlview_content_new (Inkscape::XML::Node * repr); #define SP_XMLVIEW_CONTENT_GET_REPR(text) (SP_XMLVIEW_CONTENT (text)->repr) diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp index b757123b5..e1779b620 100644 --- a/src/widgets/sp-xmlview-tree.cpp +++ b/src/widgets/sp-xmlview-tree.cpp @@ -125,25 +125,23 @@ sp_xmlview_tree_set_repr (SPXMLViewTree * tree, Inkscape::XML::Node * repr) gtk_clist_thaw (GTK_CLIST (tree)); } -GtkType +GType sp_xmlview_tree_get_type (void) { - //TODO: switch to GObject - // GtkType and such calls were deprecated a while back with the - // introduction of GObject as a separate layer, with GType instead. --JonCruz - - static GtkType type = 0; + static GType type = 0; if (!type) { - static const GtkTypeInfo info = { - (gchar*) "SPXMLViewTree", - sizeof (SPXMLViewTree), + static const GTypeInfo info = { sizeof (SPXMLViewTreeClass), - (GtkClassInitFunc) sp_xmlview_tree_class_init, - (GtkObjectInitFunc) sp_xmlview_tree_init, - NULL, NULL, NULL + NULL, NULL, + (GClassInitFunc) sp_xmlview_tree_class_init, + NULL, NULL, + sizeof (SPXMLViewTree), + 0, + (GInstanceInitFunc) sp_xmlview_tree_init, + NULL }; - type = gtk_type_unique (GTK_TYPE_CTREE, &info); + type = g_type_register_static (GTK_TYPE_CTREE, "SPXMLViewTree", &info, (GTypeFlags)0); } return type; diff --git a/src/widgets/sp-xmlview-tree.h b/src/widgets/sp-xmlview-tree.h index 2b04e79eb..5d228f982 100644 --- a/src/widgets/sp-xmlview-tree.h +++ b/src/widgets/sp-xmlview-tree.h @@ -40,7 +40,7 @@ struct SPXMLViewTreeClass GtkCTreeClass parent_class; }; -GtkType sp_xmlview_tree_get_type (void); +GType sp_xmlview_tree_get_type (void); GtkWidget * sp_xmlview_tree_new (Inkscape::XML::Node * repr, void * factory, void * data); #define SP_XMLVIEW_TREE_REPR(tree) (SP_XMLVIEW_TREE (tree)->repr) |
