diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-20 16:16:24 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-20 16:16:24 +0100 |
commit | 89df05d618d097c98d0586c67e9d8fb9ae402cb6 (patch) | |
tree | d9551e69ecf73ee078f25dd30d977c64ea144676 /mate-volume-control/src/gvc-channel-bar.c | |
parent | 6bab762efb1b6a9f609650d3934bec09527360f8 (diff) | |
download | mate-media-89df05d618d097c98d0586c67e9d8fb9ae402cb6.tar.bz2 mate-media-89df05d618d097c98d0586c67e9d8fb9ae402cb6.tar.xz |
mate-volume-control: Add GTK3 support
Diffstat (limited to 'mate-volume-control/src/gvc-channel-bar.c')
-rw-r--r-- | mate-volume-control/src/gvc-channel-bar.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mate-volume-control/src/gvc-channel-bar.c b/mate-volume-control/src/gvc-channel-bar.c index 1e75f51..3d21119 100644 --- a/mate-volume-control/src/gvc-channel-bar.c +++ b/mate-volume-control/src/gvc-channel-bar.c @@ -97,7 +97,11 @@ static gboolean on_scale_scroll_event (GtkWidget *widget, GdkEventScroll *event, GvcChannelBar *bar); +#if GTK_CHECK_VERSION (3, 0, 0) +G_DEFINE_TYPE (GvcChannelBar, gvc_channel_bar, GTK_TYPE_BOX) +#else G_DEFINE_TYPE (GvcChannelBar, gvc_channel_bar, GTK_TYPE_HBOX) +#endif static GtkWidget * _scale_box_new (GvcChannelBar *bar) @@ -157,7 +161,9 @@ _scale_box_new (GvcChannelBar *bar) gtk_box_pack_start (GTK_BOX (ebox), priv->mute_box, FALSE, FALSE, 0); } +#if !GTK_CHECK_VERSION (3, 0, 0) gtk_range_set_update_policy (GTK_RANGE (priv->scale), GTK_UPDATE_CONTINUOUS); +#endif ca_gtk_widget_disable_sounds (bar->priv->scale, FALSE); gtk_widget_add_events (bar->priv->scale, GDK_SCROLL_MASK); |