Added menu options to rename and apply CBL transform

git-svn-id: http://comictagger.googlecode.com/svn/trunk@271 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville 2012-12-18 23:14:00 +00:00
parent 0017903a4f
commit ff74b3e5bc
2 changed files with 35 additions and 2 deletions

View File

@ -239,6 +239,10 @@ class TaggerWindow( QtGui.QMainWindow):
self.actionRepackage.setShortcut( 'Ctrl+E' )
self.actionRepackage.setStatusTip( 'Re-create archive as CBZ' )
self.actionRepackage.triggered.connect( self.repackageArchive )
self.actionRename.setShortcut( 'Ctrl+N' )
self.actionRename.setStatusTip( 'Rename archive based on tags' )
self.actionRename.triggered.connect( self.renameArchive )
self.actionSettings.setStatusTip( 'Configure ComicTagger' )
self.actionSettings.triggered.connect( self.showSettings )
@ -255,6 +259,10 @@ class TaggerWindow( QtGui.QMainWindow):
self.actionAutoSearch.setShortcut( 'Ctrl+A' )
self.actionAutoSearch.triggered.connect( self.autoSelectSearch )
self.actionApplyCBLTransform.setShortcut( 'Ctrl+L' )
self.actionApplyCBLTransform.setStatusTip( 'Modify tags specifically for CBL format' )
self.actionApplyCBLTransform.triggered.connect( self.applyCBLTransform )
#self.actionClearEntryForm.setShortcut( 'Ctrl+C' )
self.actionClearEntryForm.setStatusTip( 'Clear all the data on the screen' )
self.actionClearEntryForm.triggered.connect( self.clearForm )
@ -466,6 +474,8 @@ class TaggerWindow( QtGui.QMainWindow):
self.actionReloadAuto.setEnabled( False )
self.actionParse_Filename.setEnabled( False )
self.actionAutoSearch.setEnabled( False )
self.actionRename.setEnabled( False )
self.actionApplyCBLTransform.setEnabled( False )
# now, selectively re-enable
if self.comic_archive is not None :
@ -474,6 +484,8 @@ class TaggerWindow( QtGui.QMainWindow):
self.actionParse_Filename.setEnabled( True )
self.actionAutoSearch.setEnabled( True )
self.actionRename.setEnabled( True )
self.actionApplyCBLTransform.setEnabled( True )
if not self.comic_archive.isZip():
self.actionRepackage.setEnabled(True)
@ -1360,4 +1372,12 @@ class TaggerWindow( QtGui.QMainWindow):
def pageListOrderChanged( self ):
self.metadata.pages = self.pageListEditor.getPageList()
def applyCBLTransform(self):
self.formToMetadata()
self.metadata = CBLTransformer( self.metadata, self.settings ).apply()
self.metadataToForm()
def renameArchive(self):
pass

View File

@ -1047,7 +1047,7 @@
<x>0</x>
<y>0</y>
<width>959</width>
<height>28</height>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuComicTagger">
@ -1083,6 +1083,7 @@
<addaction name="menuRemove"/>
<addaction name="menuViewRawTags"/>
<addaction name="actionRepackage"/>
<addaction name="actionRename"/>
<addaction name="actionSettings"/>
<addaction name="actionExit"/>
</widget>
@ -1104,6 +1105,8 @@
<addaction name="actionParse_Filename"/>
<addaction name="actionSearchOnline"/>
<addaction name="actionAutoSearch"/>
<addaction name="separator"/>
<addaction name="actionApplyCBLTransform"/>
</widget>
<widget class="QMenu" name="menuWindow">
<property name="title">
@ -1268,6 +1271,16 @@
<string>Remove Selected Tag Style</string>
</property>
</action>
<action name="actionRename">
<property name="text">
<string>Rename</string>
</property>
</action>
<action name="actionApplyCBLTransform">
<property name="text">
<string>Apply CBL Transform</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>