]> git.0d.be Git - empathy.git/commitdiff
Don't use gtk_progress_bar_set_orientation() when building with GTK+ 3
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 7 Sep 2010 09:58:23 +0000 (10:58 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 7 Sep 2010 09:58:23 +0000 (10:58 +0100)
GtkProgressBar now implements GtkOrientable, but this hasn't been backported
to GTK+ 2, so we need to use some #ifdef magic.

src/empathy-call-window.c

index 0e23863ef7cb9b7f2600340732a979e2e629b451..81c7d54a9c54903cd3000da03ae88a635f0a8fdc 100644 (file)
@@ -602,9 +602,19 @@ empathy_call_window_create_audio_input (EmpathyCallWindow *self)
   gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 3);
 
   priv->volume_progress_bar = gtk_progress_bar_new ();
+
+  /* FIXME: Once we unconditionally depend on GTK+ 3, we can remove the fallback
+   * for GTK+ 2 here. GtkProgressBar doesn't implement GtkOrientable in GTK+ 2,
+   * unfortunately. */
+#ifndef HAVE_GTK3
   gtk_progress_bar_set_orientation (
       GTK_PROGRESS_BAR (priv->volume_progress_bar),
       GTK_PROGRESS_BOTTOM_TO_TOP);
+#else
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->volume_progress_bar),
+      GTK_ORIENTATION_VERTICAL);
+#endif
+
   gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->volume_progress_bar),
       0);