diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-01-06 19:53:50 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.marker.es> | 2013-01-06 19:53:50 +0000 |
| commit | 38cba87ca97f83927c94519eda2c326c8bde16cd (patch) | |
| tree | 0390c36513eaf3ab61ff9b182000e63bfc592ffe /src/widgets/icon.cpp | |
| parent | Fixed StartAnchor continue errors with bspline (diff) | |
| parent | visual bbox minimum width (Bug 1094802) (diff) | |
| download | inkscape-38cba87ca97f83927c94519eda2c326c8bde16cd.tar.gz inkscape-38cba87ca97f83927c94519eda2c326c8bde16cd.zip | |
Update to trunk
(bzr r11950.1.14)
Diffstat (limited to 'src/widgets/icon.cpp')
| -rw-r--r-- | src/widgets/icon.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index d3b7e2dbb..ff443504d 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -164,13 +164,10 @@ GType SPIcon::getType() void IconImpl::classInit(SPIconClass *klass) { - GObjectClass *object_class; - GtkWidgetClass *widget_class; + GObjectClass *object_class = G_OBJECT_CLASS(klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); - object_class = (GObjectClass *) klass; - widget_class = (GtkWidgetClass *) klass; - - parent_class = (GtkWidgetClass*)g_type_class_peek_parent(klass); + parent_class = GTK_WIDGET_CLASS(g_type_class_peek_parent(klass)); object_class->dispose = IconImpl::dispose; @@ -205,7 +202,7 @@ void IconImpl::dispose(GObject *object) icon->name = 0; } - ((GObjectClass *) (parent_class))->dispose(object); + (G_OBJECT_CLASS(parent_class))->dispose(object); } void IconImpl::reset( SPIcon *icon ) @@ -865,7 +862,7 @@ GtkWidget *IconImpl::newFull( Inkscape::IconSize lsize, gchar const *name ) if ( dump ) { g_message( "skipped gtk '%s' %d (not GTK_IMAGE_STOCK)", name, lsize ); } - //g_object_unref( (GObject *)img ); + //g_object_unref(G_OBJECT(img)); img = 0; } } @@ -1022,7 +1019,7 @@ int IconImpl::getPhysSize(int size) "inkscape-decoration" }; - GtkWidget *icon = (GtkWidget *)g_object_new(SP_TYPE_ICON, NULL); + GtkWidget *icon = GTK_WIDGET(g_object_new(SP_TYPE_ICON, NULL)); for (unsigned i = 0; i < G_N_ELEMENTS(gtkSizes); ++i) { guint const val_ix = (gtkSizes[i] <= GTK_ICON_SIZE_DIALOG) ? (guint)gtkSizes[i] : (guint)Inkscape::ICON_SIZE_DECORATION; @@ -1075,7 +1072,7 @@ int IconImpl::getPhysSize(int size) GdkPixbuf *IconImpl::loadPixmap(gchar const *name, unsigned /*lsize*/, unsigned psize) { - gchar *path = (gchar *) g_strdup_printf("%s/%s.png", INKSCAPE_PIXMAPDIR, name); + gchar *path = g_strdup_printf("%s/%s.png", INKSCAPE_PIXMAPDIR, name); // TODO: bulia, please look over gsize bytesRead = 0; gsize bytesWritten = 0; @@ -1089,7 +1086,7 @@ GdkPixbuf *IconImpl::loadPixmap(gchar const *name, unsigned /*lsize*/, unsigned g_free(localFilename); g_free(path); if (!pb) { - path = (gchar *) g_strdup_printf("%s/%s.xpm", INKSCAPE_PIXMAPDIR, name); + path = g_strdup_printf("%s/%s.xpm", INKSCAPE_PIXMAPDIR, name); // TODO: bulia, please look over gsize bytesRead = 0; gsize bytesWritten = 0; |
