aboutsummaryrefslogtreecommitdiffstats
path: root/src/eom-detail-window.c
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade license to GPLv3Gravatar Tom Willemse2013-05-031-0/+16
|
* Add "Delete" button to detail windowGravatar Tom Willemsen2012-10-261-7/+52
| | | | | | | | | | | | | | | | * src/data.c (data_delete_manga): New function, deletes a manga and its associated volumes. (data_update_manga): Extra free. * src/eom-detail-window.c (add_menu): Add a "Delete" button to the menu. (on_delete): New function. Shows a confirmation dialog and if the user pressed "Ok" tries to delete the manga and close the window. * src/eom-main-window.c (on_row_activated): Connect to the `hide' signal instead of the `delete-event' signal. I couldn't find how te emit my own `delete-event' signal, then I found that hide works both when I close a window and when the window manager does it.
* Correctly show changes when total goes downGravatar Tom Willemsen2012-10-251-8/+13
| | | | | | | | | | | | | | | | | | | * 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.
* Show an "infinite" list when total is unknownGravatar Tom Willemsen2012-10-251-2/+11
| | | | | | | | * src/eom-detail-window.c (eom_detail_window_load): If the currently selected manga's `total_qty' is `0', take, for viewing/editing purposes, the manga's `current_qty' + `1' instead. (on_volume_toggled): If the current manga's `total_qty' is `0' reload the screen after toggling a manga as collected.
* Show read and collected side-by-sideGravatar Tom Willemsen2012-10-241-6/+13
| | | | | * src/eom-detail-window.c (COLUMNS): Change the number of columns per table from 8 to 4 since they now have to share space.
* Add updating of data for mangaGravatar Tom Willemsen2012-10-241-56/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't expand or fill the volumes tablesGravatar Tom Willemsen2012-10-231-4/+2
| | | | | | | | | | Makes it look ugly. * src/eom-detail-window.c (on_volume_toggled): Remove unused variable `txt'. (set_manga_id): Remove unused variable `bbox'. Change the `expand' and `fill' arguments to `gtk_box_pack_start' to `FALSE' for both tables.
* Don't show editable fields in detail windowGravatar Tom Willemsen2012-10-231-59/+3
|
* Rename edit window to detail windowGravatar Tom Willemsen2012-10-231-0/+299
It won't function as an edit window much longer.