projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implémentation du double clic sur la sélection de la chanson.
[minwii.git]
/
src
/
minwii
/
widgets
/
songfilebrowser.py
diff --git
a/src/minwii/widgets/songfilebrowser.py
b/src/minwii/widgets/songfilebrowser.py
index
f976ce6
..
6117218
100755
(executable)
--- a/
src/minwii/widgets/songfilebrowser.py
+++ b/
src/minwii/widgets/songfilebrowser.py
@@
-6,6
+6,7
@@
$Id$
$URL$
"""
$URL$
"""
+import pygame
from pgu.gui import FileDialog
import pgu.gui.basic as basic
import pgu.gui.input as input
from pgu.gui import FileDialog
import pgu.gui.basic as basic
import pgu.gui.input as input
@@
-57,6
+58,8
@@
class FileOpenDialog(FileDialog):
self.body.tr()
self.body.td(self.list, colspan=4, style=td_style)
self.list.connect(CHANGE, self._item_select_changed_, None)
self.body.tr()
self.body.td(self.list, colspan=4, style=td_style)
self.list.connect(CHANGE, self._item_select_changed_, None)
+ self.list.connect(CLICK, self._check_dbl_click_, None)
+ self._last_time_click = pygame.time.get_ticks()
self.button_ok.connect(CLICK, self._button_okay_clicked_, None)
self.body.tr()
self.body.td(basic.Label("Fichier"), style=td_style, align=-1)
self.button_ok.connect(CLICK, self._button_okay_clicked_, None)
self.body.tr()
self.body.td(basic.Label("Fichier"), style=td_style, align=-1)
@@
-256,6
+259,13
@@
class FileOpenDialog(FileDialog):
self._current_sort = arg
self.list.clear()
self._list_dir_()
self._current_sort = arg
self.list.clear()
self._list_dir_()
+
+ def _check_dbl_click_(self, arg) :
+ if pygame.time.get_ticks() - self._last_time_click < 300 :
+ self._button_okay_clicked_(None)
+ else :
+ self._last_time_click = pygame.time.get_ticks()
+
# utils
from unicodedata import decomposition
# utils
from unicodedata import decomposition