Code

Replaced deprecated GtkType creation with GType
authorjoncruz <joncruz@users.sourceforge.net>
Sun, 3 Aug 2008 05:08:35 +0000 (05:08 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Sun, 3 Aug 2008 05:08:35 +0000 (05:08 +0000)
src/display/sp-ctrlline.cpp
src/display/sp-ctrlline.h
src/display/sp-ctrlquadr.cpp
src/display/sp-ctrlquadr.h

index 95dd98f11ec9007100f0723edd99540ef349a46e..8f71a0cc0b130d2bb758f31d4a90e7d88c5a6cb7 100644 (file)
@@ -39,21 +39,22 @@ static void sp_ctrlline_render (SPCanvasItem *item, SPCanvasBuf *buf);
 
 static SPCanvasItemClass *parent_class;
 
-GtkType
+GType
 sp_ctrlline_get_type (void)
 {
-    static GtkType type = 0;
-
+    static GType type = 0;
     if (!type) {
-        GtkTypeInfo info = {
-            "SPCtrlLine",
-            sizeof (SPCtrlLine),
-            sizeof (SPCtrlLineClass),
-            (GtkClassInitFunc) sp_ctrlline_class_init,
-            (GtkObjectInitFunc) sp_ctrlline_init,
-            NULL, NULL, NULL
+        GTypeInfo info = {
+            sizeof(SPCtrlLineClass),
+            NULL, NULL,
+            (GClassInitFunc) sp_ctrlline_class_init,
+            NULL, NULL,
+            sizeof(SPCtrlLine),
+            0,
+            (GInstanceInitFunc) sp_ctrlline_init,
+            NULL
         };
-        type = gtk_type_unique (SP_TYPE_CANVAS_ITEM, &info);
+        type = g_type_register_static(SP_TYPE_CANVAS_ITEM, "SPCtrlLine", &info, (GTypeFlags)0);
     }
     return type;
 }
index 53d0d6ba0160e2962298cf0ce0f2a52a7756b3e7..88bebe601b3105f978ef2ca15d365abdf68bdff6 100644 (file)
@@ -30,7 +30,7 @@ struct SPCtrlLine : public SPCanvasItem{
 };
 struct SPCtrlLineClass : public SPCanvasItemClass{};
 
-GtkType sp_ctrlline_get_type (void);
+GType sp_ctrlline_get_type (void);
 
 void sp_ctrlline_set_rgba32 (SPCtrlLine *cl, guint32 rgba);
 void sp_ctrlline_set_coords (SPCtrlLine *cl, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
index 6c271b2de30a92115a6eb34b227d5a2eba1e5c65..c8a71512dda99319371ea50d21d7e6bbb316c887 100644 (file)
@@ -38,21 +38,22 @@ static void sp_ctrlquadr_render (SPCanvasItem *item, SPCanvasBuf *buf);
 
 static SPCanvasItemClass *parent_class;
 
-GtkType
+GType
 sp_ctrlquadr_get_type (void)
 {
-    static GtkType type = 0;
-
+    static GType type = 0;
     if (!type) {
-        GtkTypeInfo info = {
-            "SPCtrlQuadr",
-            sizeof (SPCtrlQuadr),
-            sizeof (SPCtrlQuadrClass),
-            (GtkClassInitFunc) sp_ctrlquadr_class_init,
-            (GtkObjectInitFunc) sp_ctrlquadr_init,
-            NULL, NULL, NULL
+        GTypeInfo info = {
+            sizeof(SPCtrlQuadrClass),
+            NULL, NULL,
+            (GClassInitFunc) sp_ctrlquadr_class_init,
+            NULL, NULL,
+            sizeof(SPCtrlQuadr),
+            0,
+            (GInstanceInitFunc) sp_ctrlquadr_init,
+            NULL
         };
-        type = gtk_type_unique (SP_TYPE_CANVAS_ITEM, &info);
+        type = g_type_register_static(SP_TYPE_CANVAS_ITEM, "SPCtrlQuadr", &info, (GTypeFlags)0);
     }
     return type;
 }
index 38951448c55de6d41ac857fbefa8121a67a5c012..c32d2c376e8a51b812aecd4b03a5a3829eaf1f42 100644 (file)
@@ -23,7 +23,7 @@
 struct SPCtrlQuadr;
 struct SPCtrlQuadrClass;
 
-GtkType sp_ctrlquadr_get_type (void);
+GType sp_ctrlquadr_get_type (void);
 
 void sp_ctrlquadr_set_rgba32 (SPCtrlQuadr *cl, guint32 rgba);
 void sp_ctrlquadr_set_coords (SPCtrlQuadr *cl, const NR::Point p1, const NR::Point p2, const NR::Point p3, const NR::Point p4);