[totem] Only use Gtk.Allocation properties if they're available
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Only use Gtk.Allocation properties if they're available
- Date: Sun, 1 Aug 2010 12:42:28 +0000 (UTC)
commit 13d45d3a09be162bd24c12d407fc1e71f1839966
Author: Philip Withnall <philip withnall collabora co uk>
Date: Fri Jul 30 14:30:03 2010 +0200
Only use Gtk.Allocation properties if they're available
The bindings for Gtk.Allocation are broken with GTK+ 3, so abort the column
wrapping hack if we're using GTK+ 3.
src/plugins/jamendo/jamendo.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/jamendo/jamendo.py b/src/plugins/jamendo/jamendo.py
index d17d9ee..9c06583 100644
--- a/src/plugins/jamendo/jamendo.py
+++ b/src/plugins/jamendo/jamendo.py
@@ -516,6 +516,11 @@ class JamendoPlugin(gobject.GObject, Peas.Activatable, PeasUI.Configurable):
"""
Hack to autowrap text of the title colum.
"""
+ # Further hack to run away if we're using GTK+ 3, where GtkAllocation
+ # disappeared.
+ if not hasattr(allocation, 'width'):
+ return
+
cols = (c for c in tv.get_columns() if c != col)
w = allocation.width - sum(c.get_width() for c in cols)
if cell.props.wrap_width == w or w <= 0:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]