summaryrefslogtreecommitdiff
path: root/mate-volume-control/src/gvc-channel-bar.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-20 16:16:24 +0100
committerStefano Karapetsas <[email protected]>2014-01-20 16:16:24 +0100
commit89df05d618d097c98d0586c67e9d8fb9ae402cb6 (patch)
treed9551e69ecf73ee078f25dd30d977c64ea144676 /mate-volume-control/src/gvc-channel-bar.c
parent6bab762efb1b6a9f609650d3934bec09527360f8 (diff)
downloadmate-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.c6
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);