[pitivi] Fix get_tooltip_context usage
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix get_tooltip_context usage
- Date: Sun, 2 Sep 2012 03:59:39 +0000 (UTC)
commit a92af90fc0726df32314e6bcfa284942bd9c2932
Author: Renà Stadler <mail renestadler de>
Date: Sat Aug 4 02:31:14 2012 +0200
Fix get_tooltip_context usage
pitivi/clipproperties.py | 8 ++++----
pitivi/transitions.py | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 0538011..e6eaf77 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -404,14 +404,14 @@ class EffectProperties(gtk.Expander, gtk.HBox):
def _expandedCb(self, expander, params):
self.updateAll()
- def _treeViewQueryTooltipCb(self, treeview, x, y, keyboard_mode, tooltip):
- context = treeview.get_tooltip_context(x, y, keyboard_mode)
+ def _treeViewQueryTooltipCb(self, view, x, y, keyboard_mode, tooltip):
+ is_row, x, y, model, path, iter_ = view.get_tooltip_context(x, y, keyboard_mode)
- if context is None:
+ if not is_row:
return False
# FIXME GObject Introspection, make sure forth is the path
- #treeview.set_tooltip_row(tooltip, context[1])
+ #view.set_tooltip_row(tooltip, path)
return True
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index e83a092..32eb945 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -347,20 +347,20 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
return icon
def _queryTooltipCb(self, view, x, y, keyboard_mode, tooltip):
- context = view.get_tooltip_context(x, y, keyboard_mode)
- if context is None:
+ is_row, x, y, model, path, iter_ = view.get_tooltip_context(x, y, keyboard_mode)
+ if not is_row:
return False
- view.set_tooltip_item(tooltip, context[1][0])
+ view.set_tooltip_item(tooltip, path)
- name = self.modelFilter.get_value(context[2], COL_TRANSITION_ID)
+ name = model.get_value(iter_, COL_TRANSITION_ID)
if self._current_transition_name != name:
self._current_transition_name = name
- icon = self.modelFilter.get_value(context[2], COL_ICON)
+ icon = model.get_value(iter_, COL_ICON)
self._current_tooltip_icon = icon
- longname = self.modelFilter.get_value(context[2], COL_NAME_TEXT).strip()
- description = self.modelFilter.get_value(context[2], COL_DESC_TEXT)
+ longname = model.get_value(iter_, COL_NAME_TEXT).strip()
+ description = model.get_value(iter_, COL_DESC_TEXT)
txt = "<b>%s:</b>\n%s" % (glib.markup_escape_text(longname),
glib.markup_escape_text(description),)
tooltip.set_markup(txt)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]