Skip to content

Commit

Permalink
Note double click to switch in file tooltip (r5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h committed Aug 15, 2015
1 parent 10427d2 commit c66ae60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion syncplay/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = '1.3.2'
milestone = 'Chami'
release_number = '14'
release_number = '15'
projectURL = 'http://syncplay.pl/'
3 changes: 3 additions & 0 deletions syncplay/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
"seektime-msgbox-label" : "Jump to specified time (in seconds / min:sec). Use +/- for relative seek.",
"ready-tooltip" : "Indicates whether you are ready to watch.",
"autoplay-tooltip" : "Auto-play when all users who have readiness indicator are ready and minimum user threshold met.",
"switch-to-file-tooltip" : "Double click to switch to {}", # Filename

# In-userlist notes (GUI)
"differentsize-note" : "Different size!",
Expand Down Expand Up @@ -684,6 +685,7 @@
"seektime-msgbox-label" : u"Перемотать к определенному моменту времени (указывать в секундах или мин:сек). Используйте +/-, чтобы перемотать вперед/назад относительно настоящего момента.",
"ready-tooltip" : u"Показывает, готовы ли Вы к просмотру или нет.",
"autoplay-tooltip" : u"Автоматическое воспроизведение, когда все пользователи с индикаторами готовности будут готовы и присутствует достаточное число пользователей.",
"switch-to-file-tooltip" : u"Double click to switch to {}", # Filename # TODO: Translate to Russian

# In-userlist notes (GUI)
"differentsize-note" : u"Размер файла не совпадает!",
Expand Down Expand Up @@ -1045,6 +1047,7 @@
"seektime-msgbox-label" : u"Springe zur angegebenen Zeit (in Sekunden oder min:sek). Verwende +/- zum relativen Springen.",
"ready-tooltip" : u"Zeigt an, ob du bereit zum anschauen bist",
"autoplay-tooltip" : u"Automatisch abspielen, wenn alle Nutzer bereit sind und die minimale Nutzerzahl erreicht ist.",
"switch-to-file-tooltip" : u"Double click to switch to {}", # Filename # TODO: Translate to German

# In-userlist notes (GUI)
"differentsize-note" : u"Verschiedene Größe!",
Expand Down
7 changes: 5 additions & 2 deletions syncplay/ui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def getFileSwitchState(self, filename):
currentPath = self._syncplayClient.userlist.currentUser.file["path"] if self._syncplayClient.userlist.currentUser.file else None
if utils.findFilenameInDirectories(filename, self.config["mediaSearchDirectories"]):
return constants.FILEITEM_SWITCH_FILE_SWITCH

elif currentPath:
currentDirectory = os.path.dirname(currentPath)
newPath = os.path.join(currentDirectory, filename)
Expand Down Expand Up @@ -208,8 +207,12 @@ def showUserList(self, currentUser, rooms):
if isURL(filename):
filename = urllib.unquote(filename)
filenameitem = QtGui.QStandardItem(filename)
filenameitem.setToolTip(filename)
fileSwitchState = self.getFileSwitchState(user.file['name']) if room == currentUser.room else None
if fileSwitchState != constants.FILEITEM_SWITCH_NO_SWITCH:
filenameTooltip = getMessage("switch-to-file-tooltip").format(filename)
else:
filenameTooltip = filename
filenameitem.setToolTip(filenameTooltip)
filenameitem.setData(fileSwitchState, Qt.UserRole + constants.FILEITEM_SWITCH_ROLE)
if currentUser.file:
sameName = sameFilename(user.file['name'], currentUser.file['name'])
Expand Down

0 comments on commit c66ae60

Please sign in to comment.