From 209e483dd66f312aeb43afca46a3297cffbf491d Mon Sep 17 00:00:00 2001 From: Evan Leybourn Date: Sun, 23 Jan 2011 15:08:30 +1100 Subject: [PATCH] Merged files and fixes --- AndroidManifest.xml | 2 +- res/values/strings.xml | 20 ++++---- .../AdministrationFunctions.java | 2 +- .../bookcatalogue/BookCatalogue.java | 14 ++++-- .../bookcatalogue/BookEditFields.java | 10 ++-- .../bookcatalogue/BookISBNSearch.java | 4 ++ .../bookcatalogue/CatalogueDBAdapter.java | 20 ++++---- strings-book.xml | 10 ++-- strings-cd.xml | 42 ++++++++--------- strings-dvd.xml | 47 ++++++++++--------- 10 files changed, 91 insertions(+), 80 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 7d8b1fa..bff9cd7 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionName="3.3" android:versionCode="46"> diff --git a/res/values/strings.xml b/res/values/strings.xml index 91ad0e6..9ac4f78 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -116,10 +116,13 @@ Add Add Thumbnail from Camera Cover Thumbnail -Rotate Thumbnail...Rotate ClockwiseRotate Anti-ClockwiseRotate 180 degZoom Thumbnail +Rotate Thumbnail... +Rotate Clockwise +Rotate Anti-Clockwise +Rotate 180 deg +Zoom Thumbnail In a Nutshell Has this book been signed -Audiobook Date started reading Date finished reading Location of the book @@ -133,10 +136,11 @@ Select bookshelves for this book Select Bookshelves Format -Paperback -Hard Cover -eBook -Guide / Companion +Paperback +Hard Cover +eBook +Audiobook +Guide / Companion Description Genre Would you like to automatically update the following fields now \n* Genre \n* Description \n* Thumbnails\n\n If you select Cancel you can always run this again from the Administration page @@ -144,8 +148,4 @@ Search Books Add by Name Adding books by ISBN is much more accurate than adding by author and title and is generally preferred. Please remember you can sometimes find the correct barcode on the inside front cover. \n\n - - - - diff --git a/src/com/eleybourn/bookcatalogue/AdministrationFunctions.java b/src/com/eleybourn/bookcatalogue/AdministrationFunctions.java index ef4339c..de0d0e8 100644 --- a/src/com/eleybourn/bookcatalogue/AdministrationFunctions.java +++ b/src/com/eleybourn/bookcatalogue/AdministrationFunctions.java @@ -62,7 +62,7 @@ public class AdministrationFunctions extends Activity { private CatalogueDBAdapter mDbHelper; private int importUpdated = 0; private int importCreated = 0; - public static String filePath = Environment.getExternalStorageDirectory() + "/" + CatalogueDBAdapter.LOCATION; + public static String filePath = Environment.getExternalStorageDirectory() + "/" + BookCatalogue.LOCATION; public static String fileName = filePath + "/export.csv"; public static String UTF8 = "utf8"; public static int BUFFER_SIZE = 8192; diff --git a/src/com/eleybourn/bookcatalogue/BookCatalogue.java b/src/com/eleybourn/bookcatalogue/BookCatalogue.java index 29aea0b..82aa179 100644 --- a/src/com/eleybourn/bookcatalogue/BookCatalogue.java +++ b/src/com/eleybourn/bookcatalogue/BookCatalogue.java @@ -38,7 +38,6 @@ import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.util.Log; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.KeyEvent; @@ -67,7 +66,18 @@ import android.widget.Toast; * A book catalogue application that integrates with Google Books. */ public class BookCatalogue extends ExpandableListActivity { + /* + public static final String APP_NAME = "DVD Catalogue"; + public static final String LOCATION = "dvdCatalogue"; + public static final String DATABASE_NAME = "dvd_catalogue"; + public static final String APP_NAME = "CD Catalogue"; + public static final String LOCATION = "cdCatalogue"; + public static final String DATABASE_NAME = "cd_catalogue"; + */ public static final String APP_NAME = "Book Catalogue"; + public static final String LOCATION = "bookCatalogue"; + public static final String DATABASE_NAME = "book_catalogue"; + // Target size of a thumbnail in a list (bbox dim) private static final int LIST_THUMBNAIL_SIZE=60; @@ -129,8 +139,6 @@ public class BookCatalogue extends ExpandableListActivity { public void onCreate(Bundle savedInstanceState) { //check which strings.xml file is currently active if (!getString(R.string.app_name).equals(APP_NAME)) { - Log.e("BC", getString(R.string.app_name)); - Log.e("BC", APP_NAME); throw new NullPointerException(); } diff --git a/src/com/eleybourn/bookcatalogue/BookEditFields.java b/src/com/eleybourn/bookcatalogue/BookEditFields.java index 98a587c..0116ddd 100644 --- a/src/com/eleybourn/bookcatalogue/BookEditFields.java +++ b/src/com/eleybourn/bookcatalogue/BookEditFields.java @@ -286,11 +286,11 @@ public class BookEditFields extends Activity { spinnerAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item); spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mFormatText.setAdapter(spinnerAdapter); - formats.add(getString(R.string.paperback)); - formats.add(getString(R.string.hardcover)); - formats.add(getString(R.string.ebook)); - formats.add(getString(R.string.audiobook)); - formats.add(getString(R.string.guide)); + formats.add(getString(R.string.format1)); + formats.add(getString(R.string.format2)); + formats.add(getString(R.string.format3)); + formats.add(getString(R.string.format4)); + formats.add(getString(R.string.format5)); for (int i=0; iRotate Anti-Clockwise In a Nutshell Has this book been signed -Audiobook Date started reading Date finished reading Location of the book @@ -134,10 +133,11 @@ Select bookshelves for this book Select Bookshelves Format -Paperback -Hard Cover -eBook -Guide / Companion +Paperback +Hard Cover +eBook +Audiobook +Guide / Companion Description Genre Would you like to automatically update the following fields now \n* Genre \n* Description \n* Thumbnails\n\n If you select Cancel you can always run this again from the Administration page diff --git a/strings-cd.xml b/strings-cd.xml index ab0f083..7ed7691 100644 --- a/strings-cd.xml +++ b/strings-cd.xml @@ -7,15 +7,15 @@ Artist Title UPC -???Publisher +Publisher Date Produced Rating -Bookshelf +Shelf Have you heard this album? Series Length Add CD -There are no CD's in this Bookshelf. Please add some using the menu at the bottom of this screen. +There are no CDs in this Shelf. Please add some using the menu at the bottom of this screen. Expand All Sort By Collapse All @@ -26,26 +26,26 @@ Search Cancel Save CD -You have not created any bookshelves yet. Please add some using the menu at the bottom of this screen. -Create Bookshelf -Add Bookshelf -Manage Bookshelves -Save Bookshelf -Delete Bookshelf -Cannot Delete the 1st Bookshelf -Bookshelf: -All CD's +You have not created any shelves yet. Please add some using the menu at the bottom of this screen. +Create Shelf +Add Shelf +Manage Shelves +Save Shelf +Delete Shelf +Cannot Delete the 1st Shelf +Shelf: +All CDs UPC Scanned. Searching Internet. CD Catalogue: ISBN Search -CD Catalogue: Manage Bookshelves -CD Catalogue: Edit Bookshelf +CD Catalogue: Manage Shelves +CD Catalogue: Edit Shelf The CD you are trying to add already exists. Skipping. -Search for CD's +Search for CDs Search Artist or Title The scanned CD was not found. Please enter the details manually. # Unable to Connect to Google Books -Export CD's +Export CDs Export (to SDCard) of data complete. Import Books Warning. Importing data may update existing CD records with new information if the id in the import file is the same as an existing id. This is usually fine if you changed a field in an exported file. If you created a new CD record, ensure the id field is blank. @@ -56,7 +56,7 @@ Administration CD Catalogue: Administration Admin -To scan your CD's via the ISBN barcode, you must install the zxing barcode scanner application. Press OK to install, or Cancel to skip. +To scan your CDs via the ISBN barcode, you must install the zxing barcode scanner application. Press OK to install, or Cancel to skip. Install Barcode Scanner Version Number If you would like to support the development of this application, please donate using a my Amazon Wishlist or the paypal button below. Being in Australia means I cannot publish a "paid" version. :-) @@ -129,8 +129,8 @@ Backup? Searching Google Books Searching Amazon -Select bookshelves for this CD -Select Bookshelves +Select shelves for this CD +Select shelves Format CD MP3 @@ -140,7 +140,7 @@ Genre Would you like to automatically update the following fields now \n* Genre \n* Description \n* Thumbnails\n\n If you select Cancel you can always run this again from the Administration page Not Set -Search CD's +Search CDs Add by Name -Adding CD's by UPC is much more accurate than adding by artist and title and is generally preferred. \n\n +Adding CDs by UPC is much more accurate than adding by artist and title and is generally preferred. \n\n diff --git a/strings-dvd.xml b/strings-dvd.xml index 8a70cca..6030889 100644 --- a/strings-dvd.xml +++ b/strings-dvd.xml @@ -7,15 +7,15 @@ Director Title UPC -???Publisher +Publisher Date Published Rating -Bookshelf +Shelf Have you watched this DVD? Series Length Add DVD -There are no DVD's in this Bookshelf. Please add some using the menu at the bottom of this screen. +There are no DVDs in this shelf. Please add some using the menu at the bottom of this screen. Expand All Sort By Collapse All @@ -26,28 +26,28 @@ Search Cancel Save DVD -You have not created any bookshelves yet. Please add some using the menu at the bottom of this screen. -Create Bookshelf -Add Bookshelf -Manage Bookshelves -Save Bookshelf -Delete Bookshelf -Cannot Delete the 1st Bookshelf -Bookshelf: -All DVD's +You have not created any shelves yet. Please add some using the menu at the bottom of this screen. +Create Shelf +Add Shelf +Manage Shelves +Save Shelf +Delete Shelf +Cannot Delete the 1st Shelf +Shelf: +All DVDs UPC Scanned. Searching Internet. DVD Catalogue: ISBN Search -DVD Catalogue: Manage Bookshelves -DVD Catalogue: Edit Bookshelf +DVD Catalogue: Manage Shelves +DVD Catalogue: Edit Shelf The DVD you are trying to add already exists. Skipping. -Search for DVD's +Search for DVDs Search Director or Title The scanned DVD was not found. Please enter the details manually. # Unable to Connect to Google Books -Export DVD's +Export DVDs Export (to SDCard) of data complete. -Import DVD's +Import DVDs Warning. Importing data may update existing DVD records with new information if the id in the import file is the same as an existing id. This is usually fine if you changed a field in an exported file. If you created a new DVD record, ensure the id field is blank. ERROR: Export (to SDCard) of data failed. ERROR: Import of data (from SDCard) failed. Is the file in the correct place? @@ -56,7 +56,7 @@ Administration DVD Catalogue: Administration Admin -To scan your DVD's via the UPC barcode, you must install the zxing barcode scanner application. Press OK to install, or Cancel to skip. +To scan your DVDs via the UPC barcode, you must install the zxing barcode scanner application. Press OK to install, or Cancel to skip. Install Barcode Scanner Version Number If you would like to support the development of this application, please donate using a my Amazon Wishlist or the paypal button below. Being in Australia means I cannot publish a "paid" version. :-) @@ -129,18 +129,19 @@ Backup? Searching Google Books Searching Amazon -Select bookshelves for this DVD -Select Bookshelves +Select shelves for this DVD +Select shelves Format DVD BluRay HD DVD -AVI/MPG/Online +VCD +AVI/MPG/Online Description Genre Would you like to automatically update the following fields now \n* Genre \n* Description \n* Thumbnails\n\n If you select Cancel you can always run this again from the Administration page Not Set -Search Books +Search DVDs Add by Name -Adding DVD's by UPC is much more accurate than adding by director and title and is generally preferred. \n\n +Adding DVDs by UPC is much more accurate than adding by director and title and is generally preferred. \n\n