summaryrefslogtreecommitdiffstats
path: root/src/ui/view
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-06 01:59:32 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-06 01:59:32 +0000
commite65a02ed32b78534739aba24929ece7c44dd967f (patch)
tree13cf022f18f6b5bae46aad4bc339e512f069a514 /src/ui/view
parentPull 2Geom revision 2013 (extra constructors for Rect). (diff)
parentText edit dialog: Apply button should grab default only after adding to window (diff)
downloadinkscape-e65a02ed32b78534739aba24929ece7c44dd967f.tar.gz
inkscape-e65a02ed32b78534739aba24929ece7c44dd967f.zip
Merge from trunk
(bzr r10347.1.5)
Diffstat (limited to 'src/ui/view')
-rw-r--r--src/ui/view/view-widget.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/ui/view/view-widget.cpp b/src/ui/view/view-widget.cpp
index cf0f55f2c..d43877569 100644
--- a/src/ui/view/view-widget.cpp
+++ b/src/ui/view/view-widget.cpp
@@ -27,22 +27,21 @@ static GtkEventBoxClass *widget_parent_class;
/**
* Registers the SPViewWidget class with Glib and returns its type number.
*/
-GtkType sp_view_widget_get_type(void)
+GType sp_view_widget_get_type(void)
{
- static GtkType type = 0;
- //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 GType type = 0;
if (!type) {
- GtkTypeInfo info = {
- (gchar*) "SPViewWidget",
- sizeof(SPViewWidget),
+ GTypeInfo info = {
sizeof(SPViewWidgetClass),
- (GtkClassInitFunc) sp_view_widget_class_init,
- (GtkObjectInitFunc) sp_view_widget_init,
- NULL, NULL, NULL
- };
- type = gtk_type_unique(GTK_TYPE_EVENT_BOX, &info);
+ NULL, NULL,
+ (GClassInitFunc) sp_view_widget_class_init,
+ NULL, NULL,
+ sizeof(SPViewWidget),
+ 0,
+ (GInstanceInitFunc) sp_view_widget_init,
+ NULL
+ };
+ type = g_type_register_static (GTK_TYPE_EVENT_BOX, "SPViewWidget", &info, (GTypeFlags)0);
}
return type;
@@ -55,7 +54,7 @@ static void sp_view_widget_class_init(SPViewWidgetClass *vwc)
{
GtkObjectClass *object_class = GTK_OBJECT_CLASS(vwc);
- widget_parent_class = (GtkEventBoxClass*) gtk_type_class(GTK_TYPE_EVENT_BOX);
+ widget_parent_class = (GtkEventBoxClass*) g_type_class_peek_parent(vwc);
object_class->destroy = sp_view_widget_destroy;
}