Commit Graph

63 Commits

Author SHA1 Message Date
Jordan Petridis
9a5cc1595d
ShowWidget: re-arrange the show's cover/desc/buttons widgets. 2018-04-20 10:20:09 +03:00
Jordan Petridis
5336981154
h-gtk: Change the signature of utils::set_image_from_path to not require a Podcast.
It was only used to call the podcast.id() method. This allows EpisodeViewWidget
to be created whithout the need for a call to the database to get a Podcst
Object for each widget.
2018-04-19 07:15:12 +03:00
Jordan Petridis
7c03266d16
Inline a bunch of stuff. 2018-04-17 09:04:18 +03:00
Jordan Petridis
54641fc3c5
ShowWidget: Try to retain scrollbar adjustment. 2018-04-17 06:00:06 +03:00
Jordan Petridis
b8995d838a
ShowWidget: Move listbox population to widgets/show.rs 2018-04-17 04:44:55 +03:00
Jordan Petridis
7a17b3df4b
ShowWidget: Restore sensitivite of the unsub button.
If you clicked unsub, then undo and then the same show widget you
would navigated to the previous ShowWidget and the unsub button
would still be insensitive.
2018-04-16 07:43:30 +03:00
Jordan Petridis
0589f2fe2a
h-gtk: Move show notification creation into widgets/show.rs 2018-04-16 05:45:58 +03:00
Jordan Petridis
bc6eeec663
Replace if Let Err(_) with .map_err().ok() patterns.
I dislike the indentation and the noise if let adds.
2018-04-16 04:03:44 +03:00
Jordan Petridis
3132856efe
h-gtk/utils: Remove expects and unwraps on senders 2018-04-16 01:27:59 +03:00
Jordan Petridis
7b71f59d3e
ShowWidget: Make unsub button insensitive instead of hidding it. 2018-04-15 23:53:28 +03:00
Jordan Petridis
87421ce74d
Cargo fmt 2018-04-13 04:35:50 +03:00
Jordan Petridis
f94ccb9947
InAppNotification: Remove the need to pass a sender. 2018-04-13 03:46:32 +03:00
Jordan Petridis
9cb2782ef9 ShowWidget: Initial Lazier evaluation of the widgets. 2018-04-10 16:57:08 +00:00
Jordan Petridis
3d98600126 h-data: Sanitize html during Podcast/Episode parsing. 2018-04-03 19:42:13 +00:00
Jordan Petridis
7a3a148359 Remove more dead code. 2018-04-03 19:42:11 +00:00
Jordan Petridis
a946ddfab1 html_to_pango: Switch to use the new library spawn from this.
Thanks to @danigm for spinning that part of fractal to a shared library.
2018-04-03 19:42:09 +00:00
Jordan Petridis
af1cb43bd6 NewPodcast: Prefer the rss.description attribute.
Since we can handle rendering html stuff by converting it to pango
we no longer need the text-only itunes summary attribure.
2018-04-03 19:42:09 +00:00
Jordan Petridis
935d61324f ShowWidget: Convert html to pango markup and render it.
Instead of stipping all the html tags and just using the text
in the label we could *try* converting it to pango markup
which is a bit more flexible than plain text.

The code was copied from Fractal.
2018-04-03 19:42:08 +00:00
Jordan Petridis
badcbc32c6
Implement async loading of the Show covers. 2018-03-28 22:41:45 +03:00
Jordan Petridis
daa8f15ce9
hammond-gtk::utils: change the signature of get_pixbug_from_path and rename it
Requires a gtk::Image as argument now, it sets the pixbuf to the
img directly instead of returning it.
New name is set_image_from_path.

This is ground work so we can later keep the image reference, and
use it to set the image with a callback.
2018-03-28 21:47:10 +03:00
Jordan Petridis
f7a7510322
Implement the shared HashSet with the ignored Shows ids 2018-03-26 13:25:39 +03:00
Jordan Petridis
b2c95e5a73
ShowWidget: display a notification before removing the show. 2018-03-26 10:57:44 +03:00
Jordan Petridis
82988b6011
Implement in-app notifications as App wide actions.
At first I tried creating custom InAppNotifications and send
them to the main loop to be added. That does not work sicne gtk
widgets are not thread safe. For now we can try having Action messages
that create them on demand. As oppose to create first then pass them.
2018-03-09 14:53:13 +02:00
Jordan Petridis
d1821163c2
Factor out the In-app notification into something generic. 2018-03-09 01:21:54 +02:00
Jordan Petridis
7de118adeb
Minor style changes. 2018-03-08 23:14:48 +02:00
Jordan Petridis
7b064e63b9
ShowWidget: Fix undo notif. 2018-03-08 16:21:42 +02:00
Jordan Petridis
f6890c709f
ShowWidget: Instantly dim episode titles when mark_all is clicked.
This is would have been way prettier, easier and safer if we could
have custom widgets. But till then I am not sure how to do it better.
2018-03-07 23:04:02 +02:00
Jordan Petridis
e4814dbfbc
ShowWidget: Initial prototype of an undo notification. 2018-03-07 16:37:10 +02:00
Jordan Petridis
10db4f7210
ShowWidget: Initial implementation of a menu popup.
Re implement mark_all_episodes_as_watched functionality too.
2018-03-05 20:14:06 +02:00
Jordan Petridis
ae25dd65bf
Cargo clippy and fmt. 2018-02-19 09:58:47 +00:00
Jordan Petridis
e2a1762af4
EpisodeWidget: Use refference counting intead of unnecessary clones.
Pass owenership of EpisodeWidgetQuery and use Atomic Ref counting
to pass to the callbacks. This should avoid extra allocations.
2018-02-07 18:40:22 +02:00
Jordan Petridis
67af85e347
Hammond-gtk: Use Atomic Refference counting to reduce cloning of Podcast. 2018-02-07 06:28:16 +02:00
Jordan Petridis
7ed1cd8b26
hammond-gtk: Change utils::get_pixbuf_from_path function to return a Result. 2018-02-06 20:56:55 +02:00
Jordan Petridis
d3f279374a
ShowWidget: Refactor to return Result<T, Error> wherever possible. 2018-02-06 02:47:39 +02:00
Jordan Petridis
574cfae5c6
rustfmt: enable reorder imports. 2018-01-17 08:57:02 +02:00
Jordan Petridis
e4d77a6ba4
Cleanup the id() method mess of the diesel models. 2018-01-13 07:46:56 +02:00
Jordan Petridis
95ff3715a3
Migrate StackSwitch actions to use the AppAction channel. 2018-01-11 01:14:54 +02:00
Jordan Petridis
955845110b
Merge branch 'master' into 33-downloader-re-work 2018-01-09 12:06:38 +02:00
Jordan Petridis
0ba5e14d7f
EpisodeWidget: Only update if it's visible. 2018-01-09 10:10:54 +02:00
Jordan Petridis
87a259e1a4
Minor cleanup. 2018-01-09 07:21:38 +02:00
Jordan Petridis
eef83fc98c
EpisodeWidget: Implement API to update the progress bar. 2018-01-08 05:11:37 +02:00
Jordan Petridis
074284d286
Move unsub show logic and get_download_folder func to hammond-data::utils. 2018-01-07 08:26:38 +02:00
Jordan Petridis
65a2d666a3
ShowWidget: Upon unsubing spawn IO heavy tasks into a seperate thread. 2018-01-05 00:35:18 +02:00
Jordan Petridis
8ad5bf6f09
ShowWidget: Retain vertical scrolling adjustment upon view refresh. 2018-01-04 23:43:31 +02:00
Jordan Petridis
29837ad39a
Default to using Arc instead of Rc with composite structs of GtkWidgets. 2018-01-04 17:05:05 +02:00
Jordan Petridis
c33b493dcd
Migrate Headerbar transitions into Channel actions. 2018-01-03 08:02:06 +02:00
Jordan Petridis
33cd6e69ff
EpisodeWidget: Migrate to use a Channel Action instead of simple Action. 2018-01-03 06:53:19 +02:00
Jordan Petridis
84da6aac8c
ShowWidget: Replace the unsub simple action with a Channel Action. 2018-01-03 06:23:12 +02:00
Jordan Petridis
a0476fedec
ShowWidget: Split init into smaller functions and add comments. 2018-01-03 03:33:33 +02:00
Jordan Petridis
15b3eb115c
ShowWidget: Add tooltip to the website button. 2018-01-01 19:46:27 +02:00