diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2011-06-15 00:16:48 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2011-06-15 00:16:48 +0000 |
| commit | 901027a9b2ef18744d9fef25723018226c80809d (patch) | |
| tree | 1e3b3e1334421c6db927ad01f27ae9528fd80f7e /src/widgets/icon.cpp | |
| parent | Remove deprecated glib macro wrappers (diff) | |
| parent | Clean up deprecated GTK_WIDGET API (diff) | |
| download | inkscape-901027a9b2ef18744d9fef25723018226c80809d.tar.gz inkscape-901027a9b2ef18744d9fef25723018226c80809d.zip | |
Clean up deprecated GTK_WIDGET API
(bzr r10305)
Diffstat (limited to 'src/widgets/icon.cpp')
| -rw-r--r-- | src/widgets/icon.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index c2634f6a1..b1d5c73bb 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -176,7 +176,7 @@ void IconImpl::classInit(SPIconClass *klass) void IconImpl::init(SPIcon *icon) { - GTK_WIDGET_FLAGS(icon) |= GTK_NO_WINDOW; + gtk_widget_set_has_window (GTK_WIDGET (icon), FALSE); icon->lsize = Inkscape::ICON_SIZE_BUTTON; icon->psize = 0; icon->name = 0; @@ -224,14 +224,14 @@ void IconImpl::sizeAllocate(GtkWidget *widget, GtkAllocation *allocation) { widget->allocation = *allocation; - if (GTK_WIDGET_DRAWABLE(widget)) { + if (gtk_widget_is_drawable(widget)) { gtk_widget_queue_draw(widget); } } int IconImpl::expose(GtkWidget *widget, GdkEventExpose *event) { - if ( GTK_WIDGET_DRAWABLE(widget) ) { + if ( gtk_widget_is_drawable(widget) ) { SPIcon *icon = SP_ICON(widget); if ( !icon->pb ) { fetchPixbuf( icon ); @@ -995,13 +995,13 @@ void IconImpl::paint(SPIcon *icon, GdkRectangle const */*area*/) bool unref_image = false; /* copied from the expose function of GtkImage */ - if (GTK_WIDGET_STATE (icon) != GTK_STATE_NORMAL && image) { + if (gtk_widget_get_state (GTK_WIDGET(icon)) != GTK_STATE_NORMAL && image) { GtkIconSource *source = gtk_icon_source_new(); gtk_icon_source_set_pixbuf(source, icon->pb); gtk_icon_source_set_size(source, GTK_ICON_SIZE_SMALL_TOOLBAR); // note: this is boilerplate and not used gtk_icon_source_set_size_wildcarded(source, FALSE); image = gtk_style_render_icon (widget.style, source, gtk_widget_get_direction(&widget), - (GtkStateType) GTK_WIDGET_STATE(&widget), (GtkIconSize)-1, &widget, "gtk-image"); + (GtkStateType) gtk_widget_get_state(&widget), (GtkIconSize)-1, &widget, "gtk-image"); gtk_icon_source_free(source); unref_image = true; } |
