[empathy] Don't use gtk_progress_bar_set_orientation() when building with GTK+ 3
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Don't use gtk_progress_bar_set_orientation() when building with GTK+ 3
- Date: Tue, 7 Sep 2010 10:22:48 +0000 (UTC)
commit 31fec20a7f2d38235902608d1122b55f5096e7e0
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Sep 7 10:58:23 2010 +0100
Don't use gtk_progress_bar_set_orientation() when building with GTK+ 3
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 | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 0e23863..81c7d54 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]