[game-data-packager] 05/06: add long level name in tooltip
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Thu Jun 30 06:49:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch doom2-launcher
in repository game-data-packager.
commit 574ef7543705c7c359927fce1d0b471d7a2209b4
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Wed Feb 4 14:55:40 2015 +0100
add long level name in tooltip
---
game_data_packager/doom2-masterlevels.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/game_data_packager/doom2-masterlevels.py b/game_data_packager/doom2-masterlevels.py
index 520d290..044e219 100755
--- a/game_data_packager/doom2-masterlevels.py
+++ b/game_data_packager/doom2-masterlevels.py
@@ -86,6 +86,19 @@ cellrenderertext = Gtk.CellRendererText()
treeviewcolumn.pack_start(cellrenderertext, True)
treeviewcolumn.add_attribute(cellrenderertext, "text", 1)
+def tooltip_query(treeview, x, y, mode, tooltip):
+ path = treeview.get_path_at_pos(x, y - 30) # BAD
+ if path:
+ treepath, column = path[:2]
+ model = treeview.get_model()
+ iter = model.get_iter(treepath)
+ tooltip.set_text(levels[ model[iter][0] + '.wad' ][1])
+ return True
+
+treeview.connect("query-tooltip", tooltip_query)
+treeview.set_tooltip_column(0)
+
+
# header
label = Gtk.Label()
label.set_markup("<span size='xx-large'>Doom II Master Levels</span>")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list