Skip to content

Commit

Permalink
adds shortcuts dialog for the edit action function. Let;s user choose…
Browse files Browse the repository at this point in the history
… action from the list or enter action manually.

adds shortcuts dialog for the edit action function. Let;s user choose action from the list or enter action manually.

adjust custom action to change action and display previous action in keyboard dialog

resolve merge conflicts

small fixes to the change action method

Merge branch 'master' of https://github.com/marcelveldt/script.skinshortcuts

adds shortcuts dialog for the edit action function. Let;s user choose action from the list or enter action manually.

adds shortcuts dialog for the edit action function. Let;s user choose action from the list or enter action manually.

adjust custom action to change action and display previous action in keyboard dialog

resolve merge conflicts

small fixes to the change action method

Merge branch 'master' of https://github.com/marcelveldt/script.skinshortcuts

Merge branch 'master' of https://github.com/marcelveldt/script.skinshortcuts
  • Loading branch information
marcelveldt committed Aug 8, 2015
1 parent 1b4ffef commit c2073d2
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 42 deletions.
2 changes: 1 addition & 1 deletion resources/language/Bulgarian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ msgid "Set thumbail"
msgstr "Задай миниатюра"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Персонално действие"

msgctxt "#32030"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Chinese (Simple)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "设置缩略图"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "自定义动作"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Croatian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Postavi minijaturu"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Prilagođena radnja"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Dutch/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Stel miniatuur in"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Aangepaste actie"

msgctxt "#32028"
Expand Down
4 changes: 2 additions & 2 deletions resources/language/English (New Zealand)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ msgid "Set label"
msgstr "Set label"

msgctxt "#32027"
msgid "Custom action"
msgstr "Custom action"
msgid "Change action"
msgstr "Change action"

msgctxt "#32028"
msgid "Reset shortcuts"
Expand Down
4 changes: 2 additions & 2 deletions resources/language/English (US)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ msgid "Set thumbail"
msgstr "Set thumbail"

msgctxt "#32027"
msgid "Custom action"
msgstr "Custom action"
msgid "Change action"
msgstr "Change action"

msgctxt "#32028"
msgid "Reset shortcuts"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr ""

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr ""

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/French (Canada)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Définir l'imagette"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Action personnalisée"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Galician/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Estabelecer miniatura"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Acción Personalizada"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/German/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Miniaturansicht festlegen"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Benutzerdefinierte Aktion"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Greek/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Ορισμός μικρογραφίας"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Προσαρμοσμένη ενέργεια"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Hungarian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Bélyegkép beállítás"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Egyéni parancs"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Icelandic/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Setja smámynd"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Sérsniðið verk"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Italian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Imposta miniatura"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Azione personalizzata"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Korean/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ msgid "Set thumbail"
msgstr "썸네일 설정"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "사용자 설정 동작"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Lithuanian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Nustatyti miniatiūrą"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Individualus veiksmas"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Norwegian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Sett minityr"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Egendefinert handling"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Polish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Zmień miniaturę"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Niestandardowa akcja"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Portuguese (Brazil)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Setar miniatura"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Ação customizada"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Portuguese/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Definir miniatura"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Acção personalizada"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Russian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Выбрать эскиз"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Пользовательское действие"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Spanish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Establecer miniatura"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Acción personalizada"

msgctxt "#32028"
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Swedish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Set thumbail"
msgstr "Ange miniatyr"

msgctxt "#32027"
msgid "Custom action"
msgid "Change action"
msgstr "Egen åtgärd"

msgctxt "#32028"
Expand Down
22 changes: 7 additions & 15 deletions resources/lib/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def _save_shortcuts_function( self ):
icon = listitem.getProperty( "original-icon" )
else:
icon = listitem.getProperty( "icon" )

xmltree.SubElement( shortcut, "icon" ).text = try_decode( icon )
xmltree.SubElement( shortcut, "thumb" ).text = try_decode( listitem.getProperty( "thumbnail" ) )

Expand Down Expand Up @@ -1002,21 +1002,13 @@ def onClick(self, controlID):
action = listitem.getProperty( "path" )
if action == "noop":
action = ""

# Get new action from keyboard dialog
keyboard = xbmc.Keyboard( action, xbmc.getLocalizedString(528), False )
keyboard.doModal()

if ( keyboard.isConfirmed() ):
action = try_decode( keyboard.getText() )

if action == "":
action = "noop"

# Check that a change was really made
if action == try_decode( listitem.getProperty( "path" ) ):
return
else:
selectedShortcut = LIBRARY.selectShortcut(custom = True, currentAction = listitem.getProperty("path"))
if selectedShortcut:
if selectedShortcut.getProperty( "path" ):
action = try_decode(selectedShortcut.getProperty( "path" ))

if listitem.getProperty( "path" ) == action:
return

self.changeMade = True
Expand Down
4 changes: 2 additions & 2 deletions resources/lib/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ def _rename_playlist( self, target, newLabel ):
# === COMMON SELECT SHORTCUT METHOD ===
# =====================================

def selectShortcut( self, group = "", custom = False, availableShortcuts = None, windowTitle = None, showNone = False ):
def selectShortcut( self, group = "", custom = False, availableShortcuts = None, windowTitle = None, showNone = False, currentAction = "" ):
# This function allows the user to select a shortcut

# If group is empty, start background loading of shortcuts
Expand Down Expand Up @@ -1731,7 +1731,7 @@ def selectShortcut( self, group = "", custom = False, availableShortcuts = None,

elif path == "||CUSTOM||":
# Let the user type a command
keyboard = xbmc.Keyboard( "", __language__(32027), False )
keyboard = xbmc.Keyboard( currentAction, __language__(32027), False )
keyboard.doModal()

if ( keyboard.isConfirmed() ):
Expand Down

0 comments on commit c2073d2

Please sign in to comment.