diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2014-08-23 19:23:04 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2014-08-23 19:23:04 +0000 |
| commit | 04e446028fadd0c810cc92b26cdcdf12d2ad15e4 (patch) | |
| tree | 1f355020fe30204f514025b180430794c6bc8620 /src | |
| parent | Fix gdk_display_get_n_screens deprecation (diff) | |
| download | inkscape-04e446028fadd0c810cc92b26cdcdf12d2ad15e4.tar.gz inkscape-04e446028fadd0c810cc92b26cdcdf12d2ad15e4.zip | |
icon: gtk_widget_get_state deprecation fix
(bzr r13341.1.162)
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets/icon.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index a96f47124..a6e53d638 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -247,7 +247,11 @@ gboolean IconImpl::draw(GtkWidget *widget, cairo_t* cr) bool unref_image = false; /* copied from the expose function of GtkImage */ +#if GTK_CHECK_VERSION(3,0,0) + if (gtk_widget_get_state_flags (GTK_WIDGET(icon)) != GTK_STATE_FLAG_NORMAL && image) { +#else if (gtk_widget_get_state (GTK_WIDGET(icon)) != GTK_STATE_NORMAL && image) { +#endif 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 |
