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-balance-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-balance-bar.c')
-rw-r--r-- | mate-volume-control/src/gvc-balance-bar.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mate-volume-control/src/gvc-balance-bar.c b/mate-volume-control/src/gvc-balance-bar.c index 0e2e4f4..b4bedf9 100644 --- a/mate-volume-control/src/gvc-balance-bar.c +++ b/mate-volume-control/src/gvc-balance-bar.c @@ -74,7 +74,11 @@ static gboolean on_scale_scroll_event (GtkWidget *widget, static void on_adjustment_value_changed (GtkAdjustment *adjustment, GvcBalanceBar *bar); +#if GTK_CHECK_VERSION (3, 0, 0) +G_DEFINE_TYPE (GvcBalanceBar, gvc_balance_bar, GTK_TYPE_BOX) +#else G_DEFINE_TYPE (GvcBalanceBar, gvc_balance_bar, GTK_TYPE_HBOX) +#endif static GtkWidget * _scale_box_new (GvcBalanceBar *bar) @@ -139,7 +143,9 @@ _scale_box_new (GvcBalanceBar *bar) bar->priv->end_box = ebox = gtk_hbox_new (FALSE, 6); gtk_box_pack_start (GTK_BOX (box), ebox, 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); |