diff options
author | Conor Curran <conor.curran@canonical.com> | 2012-01-13 13:36:11 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2012-01-13 13:36:11 +0000 |
commit | e090ca7ce8c5d46962e9085ed96c55baa23cae65 (patch) | |
tree | ff1f2939bd8c901c844f0a55521a9ebb99b5033c /src | |
parent | 275f2ee62bc5d7387a4d66522b42f6fbc871dd51 (diff) | |
parent | 7808685f2462be4ff882f1390275968824b02fc6 (diff) | |
download | ayatana-indicator-sound-e090ca7ce8c5d46962e9085ed96c55baa23cae65.tar.gz ayatana-indicator-sound-e090ca7ce8c5d46962e9085ed96c55baa23cae65.tar.bz2 ayatana-indicator-sound-e090ca7ce8c5d46962e9085ed96c55baa23cae65.zip |
fix the gtk3 deprecations
Diffstat (limited to 'src')
-rw-r--r-- | src/metadata-widget.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c index 96d55ab..8d816de 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -127,9 +127,19 @@ metadata_widget_init (MetadataWidget *self) GtkWidget *hbox; GtkWidget *outer_v_box; priv->icon_buf = NULL; - - outer_v_box = gtk_vbox_new (FALSE, 0); + + #if GTK_CHECK_VERSION(3, 0, 0) + outer_v_box = gtk_box_new (FALSE, 0); + #else + outer_v_box = gtk_vbox_new (FALSE, 0); + #endif + + #if GTK_CHECK_VERSION(3, 0, 0) + hbox = gtk_box_new(FALSE, 0); + #else hbox = gtk_hbox_new(FALSE, 0); + #endif + priv->meta_data_h_box = hbox; priv->current_height = 1; @@ -162,7 +172,13 @@ metadata_widget_init (MetadataWidget *self) FALSE, 1); priv->theme_change_occured = FALSE; + + #if GTK_CHECK_VERSION(3, 0, 0) + GtkWidget* vbox = gtk_box_new(FALSE, 0); + #else GtkWidget* vbox = gtk_vbox_new(FALSE, 0); + #endif + // artist GtkWidget* artist; @@ -235,7 +251,11 @@ metadata_widget_dispose (GObject *object) MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(METADATA_WIDGET(object)); if (priv->icon_buf != NULL){ - gdk_pixbuf_unref(priv->icon_buf); + #if GTK_CHECK_VERSION(3, 0, 0) + g_object_unref(priv->icon_buf); + #else + gdk_pixbuf_unref(priv->icon_buf); + #endif } G_OBJECT_CLASS (metadata_widget_parent_class)->dispose (object); } @@ -756,7 +776,11 @@ metadata_widget_set_icon (MetadataWidget *self) MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(self); if (priv->icon_buf != NULL){ - gdk_pixbuf_unref(priv->icon_buf); + #if GTK_CHECK_VERSION(3, 0, 0) + g_object_unref(priv->icon_buf); + #else + gdk_pixbuf_unref(priv->icon_buf); + #endif priv->icon_buf = NULL; } |