aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
Commit message (Collapse)AuthorAgeFilesLines
* Correctly show changes when total goes downGravatar Tom Willemsen2012-10-251-2/+14
| | | | | | | | | | | | | | | | | | | * src/data.c (data_update_manga): When updating, set `current_qty' to the lesser of `current_qty' and `total_qty' so that current will never exceed total. If the update went well remove any volumes that have numbers greater than the `total_qty'. * src/eom-detail-window.c (eom_detail_window_load): Get to upper bound of rows, if I need 1.5 rows I actually need 2 rows, what was I thinking? Clear both tables of children before filling them up again. (cb_destroy): New function. Just calls destroy in `widget', but `gtk_widget_destroy' doesn't seem like a valid `GtkCallback'. (on_volume_toggled): When adding a volume fails, revert one from `current_qty'. Don't mess with `self->manga->current_qty', just reset the manga id, otherwise we will know that there should be one more or less volume, but won't show it in the manga's volumes collection.
* Add "Read" filter to main windowGravatar Tom Willemsen2012-10-251-1/+19
| | | | | | | | | | | | | * src/data.c (data_get_unread_manga): New function. Gets any manga that have unread volumes. (data_get_volumes_for_manga): Default `volumes' to `NULL' to make sure we don't get garbage by mistake. * src/eom-main-window.c: Add new enum. The filter states that the main screen has. (eom_main_window_load): Get a list of unread manga if the window's state indecates we're looking for them. (add_menu): Add read filter button, shows only unread manga.
* Add updating of data for mangaGravatar Tom Willemsen2012-10-241-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The title and total numbers can now be changed. * src/data.c (data_add_manga): Change `name' to `const gchar*', we're not changing it. (data_update_manga): New function, updates a manga's information. * src/eom-detail-window.c (eom_detail_window_load): New function, prepares the tables to show the right data. (add_menu): New function, adds a menu to the window. (eom_detail_window_init): Call `add_menu' and prepare the other widgets for showing. (on_edit): New function, opens an edit dialog and reloads the screen afterwards. (set_manga_id): Move data filling to `eom_detail_window_load' and widget preparation to `eom_detail_window_init' and call `eom_detail_window_load'. * src/eom-detail-window.h (EomDetailWindow): Add `ctable' and `rtable' members, these are the tables that show the data. * src/eom-main-window.c (on_new): No need to save and copy the name of a manga, just destroy the widget later and destroy it always. * src/eom-new-item-dialog.c (eom_new_item_dialog_class_init): Add write-only `manga-id' property. (EOM_NEW_PROP_MID): New enum. (finalize): New function. Free the associated manga. (get_property): New function. Get a property, has no properties to get for now. (set_manga_id): New function. Show a manga's information in the entries. (set_property): New function. Set a property. Calls `set_manga_id' for the `manga-id' property. * src/eom-new-item-dialog.h (EomNewItemDialog): Add a `Manga' as member.
* Restyle, reindent, refactor (a little)Gravatar Tom Willemsen2012-10-211-381/+298
|
* Add Collect filterGravatar Tom Willemsen2012-10-201-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This filter, in the main window, shows only the manga that still need to be collected, not the completed ones. * src/data.c (data_get_manga): Use `data_get_manga_for_query'. (data_get_incomplete_manga): New function, get all manga that arent' completely collected yet. (data_get_manga_for_query): New function, fetches all the manga as `query' specifies. * src/data.h: Add `data_get_incomplete_manga'. * src/eom-main-window.c (filter_args): New struct. Contains arguments needed by the filter callback. (eom_main_window_load): Accept a list of manga, this list will be used to show the manga, if it's NULL, a list of all manga is used. (eom_main_window_add_menu): Add `All' and `Collect' filter buttons. (eom_main_window_on_filter): Callback for the filter buttons, reloads the list with the correct manga. * src/eom-main-window.h: Add manga parameter to `eom_main_window_load'. * src/interface.c (interface_show_main_window): Pass `NULL' to `eom_main_window_load' to show all manga.
* Manga volumes can be marked 'read'Gravatar Tom Willemsen2011-01-301-22/+75
| | | | In the eom-edit-window a list is shown with all the available manga which indicated which ones have been read
* Segfault FS#2Gravatar Tom Willemsen2010-11-031-0/+1
| | | | Forgot to calloc the collection of collected manga
* Added little bit of memory management, removed a lot of ↵Gravatar Tom Willemsen2010-11-031-4/+10
| | | | g_print
* Edit which volumes you haveGravatar Tom Willemsen2010-10-221-13/+101
|
* Changed name from Collections to Eye on MangaGravatar Tom Willemsen2010-10-211-91/+91
|
* Edit screenGravatar Tom Willemsen2010-10-211-18/+113
|
* Change qty and add itemsGravatar Tom Willemsen2010-10-191-10/+44
| | | | | Current quantity can be changed by clicking add or remove Add new series
* DataGravatar Tom Willemsen2010-10-191-0/+153
Data is gotten from an sqlite3 database New series can be added to the database