Commit graph

1814 commits

Author SHA1 Message Date
Peng Liu
d3459aabf9 Moved the button from the paths section to be below the "Download high-quality card pictures" checkbox. Button now reads "Reset/Clear Downloaded Pictures". Removed "Path to"s from card/token database, hand/stack/table/player info background, and card back labels. 2014-08-07 14:35:18 -04:00
Peng Liu
ae80752497 Added notification messages informing users of the success or failure of clearing downloaded images. 2014-08-07 14:00:59 -04:00
Peng Liu
3375d45571 Logically inverted the if... else statement by removing the logical not (!). Cleaned up a ;;. 2014-08-07 12:58:03 -04:00
Waleed Khan
ffc5b59fec Fix #258: Dashes to spaces. 2014-08-07 12:29:20 -04:00
Peng Liu
674005383b Added a button and the functionality to clear all downloaded images (all images within subfolders at picsPath/downloadedPics) under Settings. 2014-08-07 12:09:42 -04:00
Gavin Bisesi
ab7d70a9c8 Merge pull request #263 from ctrlaltca/oracle_icon
Add icon to oracle
2014-08-07 12:00:46 -04:00
Gavin Bisesi
1a4abc3d63 Merge pull request #264 from arxanas/style-guide
Added style guide.
2014-08-07 11:58:37 -04:00
Waleed Khan
da9592f0d8 Added style guide. 2014-08-07 11:52:40 -04:00
Mawu3n4
10ab53c4ac fix: find by prefix if card not found only 2014-08-07 17:43:14 +02:00
Fabio Bas
40e9735678 Add icon to oracle 2014-08-07 17:27:15 +02:00
Waleed Khan
c0d4669088 Merge remote-tracking branch 'upstream/master' into no-overwrite-tokens-xml
Conflicts:
	cockatrice/src/carddatabase.cpp
2014-08-07 11:06:41 -04:00
Gavin Bisesi
af4d662c54 Merge pull request #262 from ctrlaltca/fix_134
add success notification to oracle; fixes #134
2014-08-07 10:39:13 -04:00
Fabio Bas
2e051c3fd7 add success notification to oracle 2014-08-07 16:10:57 +02:00
Dibe Zackaria
9092f2298b fix: remove auto 2014-08-06 20:27:04 +02:00
Dibe Zackaria
e8abd6eb63 fix: typo 2014-08-06 20:13:59 +02:00
Mawu3n4
7d190ddaf7 fix: pushed old version 2014-08-06 18:01:47 +02:00
Mawu3n4
621a47de9c add: find token cards by prefix 2014-08-06 17:54:47 +02:00
Gavin Bisesi
ef1fbc0db9 Merge pull request #256 from pliu037/handle-PNGs-2
Handle PNGs (and other image formats)
2014-08-06 10:42:15 -04:00
Peng Liu
8b588c6fd3 Merge branch 'ctrlaltca-pr256' into handle-PNGs-2 2014-08-06 04:55:27 -04:00
Fabio Bas
6502a182e8 Support loading of files with wrong extension
Like M15’s .png that cockatrice wrongly saved as .jpg
Additionally, move the QImageReader declaration outside of the inner
loop
2014-08-06 09:31:22 +02:00
Peng Liu
4bb1d28ae7 Removed the QLists for determining image format. Instead, using QImageReader, both when downloading/saving and when loading, to determine the correct format (Cockatrice now supports all QImageReader-supported formats).
Image loading still uses one for loop to iterate through the QList of paths to folders in which to search for images.
2014-08-05 14:54:40 -04:00
Peng Liu
605479694d Removed some redundant code. Factored out translations. 2014-08-05 08:50:42 -04:00
Peng Liu
8587b8c349 Refactored the magic bytes into two QLists: one containing a list of QStrings representing the supported extensions, the other containing a list of QByteArrays representing the magic bytes in hex.
Refactored the image loading loop to be two nested for loops: the outer loop iterating through the QList of paths to folders in which to search for images and the inner loop iterating through the QList of supported extensions.
2014-08-05 03:48:30 -04:00
Peng Liu
75122c3c9d Switched back to using QFile instead of QImage for saving as QImage's save function adds overhead to the file size, leaving me unsure whether the original image is affected. 2014-08-04 17:01:58 -04:00
Peng Liu
387086cb4c Added support for PNG images (both for downloading/saving and loading). 2014-08-04 16:43:57 -04:00
Gavin Bisesi
9837f8bb18 Merge pull request #254 from ctrlaltca/compilation_warning_246
Fix compilation warning introduced in #246
2014-08-04 14:37:06 -04:00
Fabio Bas
3667ab504c Fix compilation warning introduced in #246
/cockatrice/src/main.cpp:162:16: warning: format string is not a string
literal (potentially insecure) [-Wformat-security]
        qDebug("Could not create " +
settingsCache->getPicsPath().toUtf8() + "/CUSTOM. Will fall back on
default card images.");
2014-08-04 20:09:53 +02:00
Gavin Bisesi
9ba2ae71a8 Merge pull request #244 from ctrlaltca/cards_xsd
Added schema for cards.xml and tokens.xml in xsd format
2014-08-04 10:51:11 -04:00
Gavin Bisesi
8d482245ff Merge pull request #251 from arxanas/case-insensitive-tokens
Fix #248: the token dialog generates cards irrespective of their case and punctuation
2014-08-04 10:50:25 -04:00
Gavin Bisesi
6f45bbc82c Merge pull request #246 from pliu037/create-CUSTOM-folder
Picture path/CUSTOM folder creation
2014-08-04 10:49:39 -04:00
Peng Liu
a9eaf65a82 Changed .toLatin1() to .toUtf8(). 2014-08-02 23:44:31 -04:00
Waleed Khan
309494111c Fix #248: the token dialog generates cards irrespective of their case and punctation. 2014-08-02 19:32:24 -04:00
Peng Liu
b3fa99ef36 I was too hasty and forgot a + and to toLatin1() a QString in the qDebug arg. 2014-07-31 23:24:25 -04:00
Peng Liu
077d9f2745 Checks if CUSTOM folder was successfully created. If not, prints qDebug message and proceeds as normal except uses default card images instead of custom ones. 2014-07-31 22:42:13 -04:00
Peng Liu
8be4a14fcc Before: If default is checked, Oracle will always save to the AppData path.
If a path to cards.xml is set, Oracle will update that cards.xml.
If Oracle is run before a path to cards.xml is set, if default is checked, cards.xml will be saved on the AppData path. Furthermore, this path will be set as the cards.xml path for both Oracle and Cockatrice.
If Oracle is run before a path to cards.xml is set, if default is NOT checked, cards.xml will be saved at the selected path and this path will be set as the cards.xml path for both Oracle and Cockatrice.
If a path to cards.xml is set, if default is NOT checked, cards.xml will be saved at the selected path but this path will NOT be set as the cards.xml path for either Oracle or Cockatrice. This allows people who already have a cards.xml (which may be customized), to still obtain clean copies of cards.xml through Oracle without overwriting their own
2014-07-31 15:33:11 -04:00
Gavin Bisesi
ffed0e00fe Merge pull request #214 from pliu037/master
Added better support for custom card images
2014-07-31 13:42:57 -04:00
Fabio Bas
b2e1855af7 Fix: <color> can appear more than once 2014-07-31 18:40:10 +02:00
Fabio Bas
c1b7d71dca Added schema for cards.xml 2014-07-31 17:53:39 +02:00
Gavin Bisesi
ca6bd669ce Merge pull request #233 from ctrlaltca/regression_card_picurl
Add back support for custom picture urls in cards.xml
2014-07-31 11:30:26 -04:00
Gavin Bisesi
7d5ce6f0ef Merge pull request #235 from ctrlaltca/offline_users_menu
Disable some usercontextmenu actions if the user is offline; fix #234
2014-07-30 15:49:43 -04:00
Gavin Bisesi
951e43b166 Update cmake build flags in README 2014-07-30 15:47:57 -04:00
Gavin Bisesi
1e5a00d100 Merge pull request #228 from ctrlaltca/error_suppression
Fix building with debug
2014-07-30 15:44:08 -04:00
Gavin Bisesi
14d6b011d7 Merge pull request #236 from arxanas/remove-price-column
Fix #110: Price column is removed when the setting is disabled.
2014-07-30 09:55:25 -04:00
Waleed Khan
9ba5d7968e Stop clobbering tokens.xml tokens; don't let Oracle read tokens into cards.xml. 2014-07-29 23:46:04 -04:00
Waleed Khan
8df7e9f164 Fix #231: tokens.xml no longer overwritten by cards.xml. 2014-07-27 20:55:47 -04:00
Fabio Bas
9e12c5b2d4 Use custom picUrl if picUrlHq is not defined 2014-07-27 22:06:35 +02:00
Fabio Bas
6b9daf3d15 Enable Show this user's games" for offline users 2014-07-27 21:29:27 +02:00
pliu037
c3a68fcbd3 Cleaned up some lines of code 2014-07-27 12:47:05 -04:00
Waleed Khan
689acc1e32 Fix #110: Price column is removed when the setting is disabled. 2014-07-26 21:13:30 -04:00
Fabio Bas
fe12f71b93 Disable some usercontextmenu actions if the user is offline; fix #234 2014-07-27 00:29:23 +02:00