Tweaked the OptionalMessageDialog usage

git-svn-id: http://comictagger.googlecode.com/svn/trunk@80 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2012-11-23 22:05:56 +00:00
parent a60410c887
commit 2b29f9f57b
5 changed files with 28 additions and 18 deletions

View File

@ -24,6 +24,7 @@ import struct
import sys
import tempfile
import subprocess
import _subprocess
import platform
import time
@ -174,7 +175,7 @@ class RarArchiver:
# windows only, keeps the cmd.exe from popping up
if platform.system() == "Windows":
self.startupinfo = subprocess.STARTUPINFO()
self.startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
self.startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
else:
self.startupinfo = None

View File

@ -46,8 +46,15 @@ class OptionalMessageDialog(QDialog):
self.was_accepted = False
l = QVBoxLayout( self )
self.theLabel = QLabel( msg )
self.theLabel.setWordWrap(True)
self.theLabel.setWordWrap(True)
self.theLabel.setTextFormat( Qt.RichText )
self.theLabel.setTextInteractionFlags( Qt.LinksAccessibleByMouse | Qt.LinksAccessibleByKeyboard )
l.addWidget( self.theLabel )
l.insertSpacing ( -1, 10 )
if check_text is None:
if style == StyleQuestion:

View File

@ -38,7 +38,7 @@ class ComicTaggerSettings:
# automatic settings
last_selected_data_style = 0
last_opened_folder = None
last_opened_folder = ""
last_main_window_width = 0
last_main_window_height = 0
last_main_window_x = 0
@ -116,8 +116,10 @@ class ComicTaggerSettings:
self.rar_exe_path = self.config.get( 'settings', 'rar_exe_path' )
self.unrar_exe_path = self.config.get( 'settings', 'unrar_exe_path' )
self.last_selected_data_style = self.config.getint( 'auto', 'last_selected_data_style' )
self.last_opened_folder = self.config.get( 'auto', 'last_opened_folder' )
if self.config.has_option('auto', 'last_selected_data_style'):
self.last_selected_data_style = self.config.getint( 'auto', 'last_selected_data_style' )
if self.config.has_option('auto', 'last_opened_folder'):
self.last_opened_folder = self.config.get( 'auto', 'last_opened_folder' )
if self.config.has_option('auto', 'last_main_window_width'):
self.last_main_window_width = self.config.getint( 'auto', 'last_main_window_width' )
if self.config.has_option('auto', 'last_main_window_height'):

View File

@ -136,11 +136,11 @@ class TaggerWindow( QtGui.QMainWindow):
if self.settings.show_disclaimer:
checked = OptionalMessageDialog.msg( self, "Disclaimer",
"Thanks for trying Comic Tagger!\n\n" +
"Be aware that is beta-level software, and the developers\n" +
"of this program can take no responsibility for any loss of data due\n" +
"to its use.\n\n" +
"That said, have fun!\n",
"Thanks for trying Comic Tagger!<br><br>" +
"Be aware that this is beta-level software, and the developers " +
"of this program can take no responsibility for any loss of data due " +
"to its use.<br><br>" +
"That said, have fun!",
)
self.settings.show_disclaimer = not checked
@ -771,12 +771,13 @@ class TaggerWindow( QtGui.QMainWindow):
if self.comic_archive.isRar() and self.data_style == MetaDataStyle.CBI:
if self.settings.ask_about_cbi_in_rar:
answered_yes, checked = OptionalMessageDialog.question( self, "RAR and ComicBookLover",
"You are about to write a CBL tag block to a RAR archive!\n\n" +
"While technically possible, no known reader can read those tags from RAR\n" +
"yet. If you would like this feature from ComicBookLover, please go their\n" +
"forums and add a feature request!\n\n" +
"http://forums.comicbooklover.com/categories/ipad-features\n\n" +
"Do you want to continue with the save?\n",
"You are about to write a CBL tag block to a RAR archive!<br><br>" +
"While technically possible, no known reader can read those tags from RAR " +
"yet. If you would like this feature from ComicBookLover, please go their " +
"forums and add a feature request!<br><br>" +
"<a href=http://forums.comicbooklover.com/categories/ipad-features>" +
"http://forums.comicbooklover.com/categories/ipad-features/</a><br><br>" +
"Do you want to continue with the save?",
)
self.settings.ask_about_cbi_in_rar = not checked
if not answered_yes:

View File

@ -5,10 +5,9 @@ General Setting Tab:
Add Settings Reset - may require restart
Add setting to dis-allow writing CBI to RAR
Use QT Config Dialog??
Optional dialog
maybe move to a UI file
add wordwrap, maybe some spacing in there, maybe center?
Make URL clickable
Fix about graphics