Skip to content
Browse files

"Update DB" action in browser.

  • Loading branch information...
1 parent 33c04a4 commit 60d0a9ad3baeced42df6c6379aec15eae65ec3a2 @tsufeki committed Jul 8, 2013
Showing with 43 additions and 30 deletions.
  1. +3 −1 qygmy/browser.py
  2. +34 −29 qygmy/translations/qygmy_pl.ts
  3. +6 −0 qygmy/ui/browser.ui
View
4 qygmy/browser.py
@@ -25,6 +25,7 @@ def setup_ui(self):
self.ui.search_results.setup(self.srv.search)
self.ui.search_button.setDefaultAction(self.ui.search)
self.srv.state.changed.connect(self.on_state_changed)
+ self.ui.updatedb.triggered.connect(self.srv.updatedb)
self.ui.close.triggered.connect(self.close)
try:
@@ -44,6 +45,7 @@ def setup_icons(self):
('close', 'window-close'),
('search', 'edit-find'),
('copy', 'edit-copy'),
+ ('updatedb', 'view-refresh'),
):
getattr(self.ui, action).setIcon(QIcon.fromTheme(icon))
for i, icon in enumerate(['folder-sound', 'document-multiple', 'edit-find']):
@@ -75,7 +77,7 @@ def contextMenuEvent(self, e):
def on_state_changed(self, state):
c = state != 'disconnect'
for act in ('search', 'add', 'addplay', 'replace', 'replaceplay',
- 'remove', 'rename', 'copy', 'details'):
+ 'remove', 'rename', 'copy', 'details', 'updatedb'):
getattr(self.ui, act).setEnabled(c)
self.ui.dbpath.setEnabled(c)
self.ui.plpath.setEnabled(c)
View
63 qygmy/translations/qygmy_pl.ts
@@ -3,7 +3,7 @@
<context>
<name>Browser</name>
<message>
- <location filename="../browser.py" line="120"/>
+ <location filename="../browser.py" line="122"/>
<source>Details</source>
<translation>Szczegóły</translation>
</message>
@@ -291,145 +291,150 @@
<context>
<name>browser</name>
<message>
- <location filename="../ui/browser.py" line="242"/>
+ <location filename="../ui/browser.py" line="245"/>
<source>Music database</source>
<translation>Baza muzyki</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="243"/>
+ <location filename="../ui/browser.py" line="246"/>
<source>&amp;Database</source>
<translation>&amp;Baza</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="244"/>
+ <location filename="../ui/browser.py" line="247"/>
<source>&amp;Playlists</source>
<translation>&amp;Listy</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="245"/>
+ <location filename="../ui/browser.py" line="248"/>
<source>Tag to search</source>
<translation>Szukany tag</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="246"/>
+ <location filename="../ui/browser.py" line="249"/>
<source>Any</source>
<translation>Wszystko</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="247"/>
+ <location filename="../ui/browser.py" line="250"/>
<source>Title</source>
<translation>Tytuł</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="248"/>
+ <location filename="../ui/browser.py" line="251"/>
<source>Artist</source>
<translation>Artysta</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="249"/>
+ <location filename="../ui/browser.py" line="252"/>
<source>Album</source>
<translation>Album</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="250"/>
+ <location filename="../ui/browser.py" line="253"/>
<source>Comment</source>
<translation>Komentarz</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="251"/>
+ <location filename="../ui/browser.py" line="254"/>
<source>File name</source>
<translation>Nazwa pliku</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="252"/>
+ <location filename="../ui/browser.py" line="255"/>
<source>&amp;Search</source>
<translation>&amp;Szukaj</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="253"/>
+ <location filename="../ui/browser.py" line="256"/>
<source>&amp;Add selected</source>
<translation>&amp;Dodaj zaznaczone</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="254"/>
+ <location filename="../ui/browser.py" line="257"/>
<source>Add selected songs to the current playlist</source>
<translation>Dodaj zaznaczone utwory do głównej listy</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="255"/>
+ <location filename="../ui/browser.py" line="258"/>
<source>&amp;Close</source>
<translation>&amp;Zamknij</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="256"/>
+ <location filename="../ui/browser.py" line="259"/>
<source>Close this window</source>
<translation>Zamknij to okno</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="257"/>
+ <location filename="../ui/browser.py" line="260"/>
<source>Ctrl+W</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/browser.py" line="258"/>
+ <location filename="../ui/browser.py" line="261"/>
<source>Search</source>
<translation>Szukaj</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="259"/>
+ <location filename="../ui/browser.py" line="262"/>
<source>&amp;Remove selected</source>
<translation>&amp;Usuń zaznaczone</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="260"/>
+ <location filename="../ui/browser.py" line="263"/>
<source>Del</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/browser.py" line="261"/>
+ <location filename="../ui/browser.py" line="264"/>
<source>Add selected and &amp;play</source>
<translation>Dodaj zaznaczone i &amp;odtwarzaj</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="262"/>
+ <location filename="../ui/browser.py" line="265"/>
<source>Shift+Return</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/browser.py" line="263"/>
+ <location filename="../ui/browser.py" line="266"/>
<source>Song &amp;details...</source>
<translation>&amp;Szczegóły...</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="264"/>
+ <location filename="../ui/browser.py" line="267"/>
<source>Ctrl+I</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/browser.py" line="265"/>
+ <location filename="../ui/browser.py" line="268"/>
<source>Re&amp;name</source>
<translation>Zmień &amp;nazwę</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="266"/>
+ <location filename="../ui/browser.py" line="269"/>
<source>F2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/browser.py" line="267"/>
+ <location filename="../ui/browser.py" line="270"/>
<source>R&amp;eplace the current playlist</source>
<translation>Za&amp;stąp główną listę</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="268"/>
+ <location filename="../ui/browser.py" line="271"/>
<source>Rep&amp;lace and play</source>
<translation>Zas&amp;tąp i odtwarzaj</translation>
</message>
<message>
- <location filename="../ui/browser.py" line="269"/>
+ <location filename="../ui/browser.py" line="272"/>
<source>C&amp;opy selected</source>
<translation>&amp;Kopiuj zaznaczone</translation>
</message>
+ <message>
+ <location filename="../ui/browser.py" line="273"/>
+ <source>&amp;Update the database</source>
+ <translation>Odśwież &amp;bazę</translation>
+ </message>
</context>
<context>
<name>infodialog</name>
View
6 qygmy/ui/browser.ui
@@ -413,6 +413,7 @@
<addaction name="copy"/>
<addaction name="details"/>
<addaction name="separator"/>
+ <addaction name="updatedb"/>
<addaction name="close"/>
</widget>
<addaction name="context_menu"/>
@@ -536,6 +537,11 @@
<bool>false</bool>
</property>
</action>
+ <action name="updatedb">
+ <property name="text">
+ <string>&amp;Update the database</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>

0 comments on commit 60d0a9a

Please sign in to comment.
Something went wrong with that request. Please try again.