Jordan Petridis
e07e35110d
Use pretty assertions!
2018-04-03 19:42:10 +00:00
Jordan Petridis
a463753c84
NewEpidode: Use parse rss.description instead of itunes.summary.
...
We can deal with(sort of) html now, so we should start indexing
the proper rss description. Also cleanup commented out code.
2018-04-03 19:42:10 +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
10e016f2ea
update appdata.xml
2018-04-03 21:41:53 +03:00
Jordan Petridis
491cd8f01c
cargo fmt
2018-03-30 17:24:38 +03:00
Jordan Petridis
07eadd2364
h-gtk/utils: Improve itunes resolver and add extra test cases.
2018-03-30 16:38:59 +03:00
Jordan Petridis
7086afe73d
h-gtk/utils: More refactor to improve formatting.
2018-03-30 15:33:19 +03:00
Jordan Petridis
f21398357b
h-gtk/utils: Refactor some mutex locks, improve formatting.
2018-03-30 14:39:30 +03:00
Jordan Petridis
c338802329
Update deps.
2018-03-30 11:49:54 +03:00
Jordan Petridis
c3076e748e
cargo fmt
2018-03-30 10:22:34 +03:00
Jordan Petridis
1595256c86
Use rayon to manage all the threads.
2018-03-30 09:31:25 +03:00
Jordan Petridis
f2444f151c
h-gtk/utils: Re-work format_err! calls and improve formatting
2018-03-29 15:26:44 +03:00
Jordan Petridis
710a3f2552
Use SendCell::try_get instead of SendCell::into_inner
2018-03-29 15:19:13 +03:00
Jordan Petridis
e203815f4f
hammond-gtk/utils.rs: Use a hashset to keep track of cover downloads.
...
Use a HashSet to check if a download of a cover is already active. If
it is, schedule a callback that will try to set the image from the
cached pixbuf later.
2018-03-29 13:07:46 +03:00
Jordan Petridis
c3658080d3
Comment out a test.
2018-03-29 11:37:31 +03:00
Jordan Petridis
8703470010
h-gtk/utils: Use a threadpool to avoid spawning a million threads
2018-03-29 10:24:02 +03:00
Jordan Petridis
88cc7e6fec
Fix set_image_from_path test
2018-03-29 09:21:49 +03: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
89ee174ded
Version bump.
2018-03-28 14:48:43 +03:00
Jordan Petridis
f693c986ec
Add an empty_show if Show has no episodes.
2018-03-28 13:24:26 +03:00
Jordan Petridis
ef3809ed25
Update about dialog.
2018-03-27 16:53:12 +03:00
Rowan Lewis
c458b27573
Handle window geometry with a new struct.
2018-03-27 11:54:36 +00:00
Rowan Lewis
524e0bb0a8
Persist window geometry including maximized state for issue #50 .
2018-03-27 11:54:36 +00:00
Jordan Petridis
d525d1fe59
InAppNofitication: Make revealer field private, change show signature
...
Accept an overlay widget that the revealer will be attached to into
the show method. Thus revealer field no longer need to be public.
2018-03-27 12:01:53 +03:00
Jordan Petridis
bdc6264701
app.rs: Minor formatting improvments.
2018-03-27 11:50:31 +03:00
Jordan Petridis
7e2640e2d0
ShowWidget: When unsub notification expires, remove show from the ignore list.
...
This should not make any difference regarding the behaviour since
the Show id is eq to the sqlite rowid which means that even
if the same show was removed and readded it would have diff id.
2018-03-27 11:09:53 +03:00
Rowan Lewis
2497cb31d0
Remove shadow_type from the show widget.
2018-03-26 18:53:48 +00:00
Rowan Lewis
446a0ede54
Fix #52 by removing the specified shadow_type from the episodes and shows scrolled windows.
2018-03-26 18:53:47 +00:00
Jordan Petridis
69e87d129a
ShowWidget: Hide shows from the Views when unsub is hit.
2018-03-26 14:34:54 +03:00
Jordan Petridis
f7a7510322
Implement the shared HashSet with the ignored Shows ids
2018-03-26 13:25:39 +03:00
Jordan Petridis
e9f2ba47f2
dbquerries: Add get_episodes and get_podcasts querries that can filters.
2018-03-26 12:46:13 +03:00
Jordan Petridis
b2c95e5a73
ShowWidget: display a notification before removing the show.
2018-03-26 10:57:44 +03:00
Jordan Petridis
1af06f2e0d
Neaw gtk-rs release, yay!
2018-03-19 06:34:28 +02:00
Rowan Lewis
f182d441d1
Allow the Copy trait to do the work for us.
2018-03-18 00:29:52 +01:00
Rowan Lewis
e14f215793
Allow cleanup to be blocking on startup and remove cleanup from automatic content refreshes.
2018-03-17 23:50:59 +01:00
Rowan Lewis
34536f4e21
Set dark theme at application startup based on settings.
2018-03-17 23:46:37 +01:00
Rowan Lewis
afdedc7575
Use crono types instead of unsigned integers for time periods.
2018-03-17 01:10:10 +01:00
Rowan Lewis
69a7a9b180
Renamed the 'auto-refresh' settings to 'refresh-interval' so that they represent the internal behaviour better.
2018-03-16 23:31:12 +01:00
Rowan Lewis
a7540583d6
Connect settings for auto refresh and cleanup.
2018-03-16 23:23:06 +01:00
Jordan Petridis
a253d7ebf5
Merge branch 'feature/gsettings-schema' into 'master'
...
Added initial settings schema.
See merge request alatiera/Hammond!22
2018-03-16 20:05:19 +00:00
Rowan Lewis
3886402f8e
Spelling correction.
2018-03-16 20:45:40 +01:00
Rowan Lewis
97e402b980
Added initial settings schema.
2018-03-16 20:38:37 +01:00
Jordan Petridis
93e15af209
Compress gresource ui files.
2018-03-16 21:29:54 +02:00
Jordan Petridis
9f3a5a13b3
EpisodeWidget: Some RefCell are not really necessary.
2018-03-16 20:11:17 +02:00
Jordan Petridis
3a0fb4bdec
Upgrade dependancies.
2018-03-14 04:07:44 +02:00
Jordan Petridis
a11c4c9bd2
InAppNotification: Twek the margins around the text label.
2018-03-14 00:43:17 +02:00
Jordan Petridis
d4b98b5cb2
I hate everything that has to do with centering stuff.
2018-03-14 00:40:29 +02:00
Jordan Petridis
030fed6d12
EpisodeWidget: Just in case there was a deadlock.
2018-03-13 04:57:11 +02:00
Jordan Petridis
fc9579cd51
EpisodeWidget: Replace some Mutexs with RefCells.
...
The state machines are not send and the code is sequnecial.
We only need `&mut machine` refference to pass to `take_mut::take`
to change the state of the machine. In 2/3 cases we can even use
`.get_mut()` method and even avoid the dynamic borrow checks at
runtime. For the `TitleMachine` The only thing that will hold
a refference to it after initialization will be the play_button
callback. So it's justifiable to use `RefCell` insetead of a `Mutex`.
2018-03-13 04:44:06 +02:00
Jordan Petridis
74712b5410
EpisodeWidget: Remove unnecessary Arcs.
...
`DateMachine` and `DurationMachine` are only mutated during initialization
and thus do not need shared ownership.
`TitleMachine` is only mutated during initialization and after that only
the callback will keep holding a referrence to it. The `EpisodeWidget`s
get dropped after initialization. So it's justifiable to use `Rc<Mutex<T>>`
instead of `Arc`.
2018-03-13 03:47:46 +02:00
Jordan Petridis
05628a2529
Update changelog.
2018-03-12 22:32:52 +02:00
Jordan Petridis
1bdd2f2f5b
Merge branch 'master' into state-machines-experiements
2018-03-12 22:10:14 +02:00
Jordan Petridis
8a18630ae5
Initial integration of the itunes resolver with the Add button.
2018-03-12 20:49:02 +02:00
Jordan Petridis
b87c331b12
Make the itunes_resolver functions inlined.
2018-03-12 07:28:09 +02:00
Jordan Petridis
9da2414e8b
Initial implementation of an itunes_to_rss url resolver. #49
2018-03-12 06:48:05 +02:00
Jordan Petridis
285291b2ed
Ignore tests that need access to the host system.
2018-03-12 03:35:07 +02:00
Jordan Petridis
dbbb4e589e
InAppNotification: Fix autohiding after the callback is executed.
2018-03-09 20:24:28 +02:00
Jordan Petridis
064879c4ce
InAppNotification: Remove reduntant Overlay.
2018-03-09 19:46:46 +02:00
Jordan Petridis
8614922213
InAppNotification: Change box margins.
2018-03-09 19:36:43 +02:00
Jordan Petridis
99bc80c15b
ShowWidget: Add a 6px margin to the settings popup.
2018-03-09 17:04:11 +02:00
Jordan Petridis
3423d854e1
ShowWidget: Change the mark_all notif wording.
2018-03-09 16:43:13 +02:00
Jordan Petridis
483fd090f1
InAppNotification: Add close button.
2018-03-09 15:25:53 +02: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
94f6fdcbe7
Clippy.
2018-03-03 18:52:38 +02:00
Jordan Petridis
bb467b7aba
Rustfmt.
2018-03-03 16:45:37 +02:00
Jordan Petridis
b062f0a19f
EpisodeWidget Machine: Remove unused From impls.
2018-02-22 13:16:33 +00:00
Jordan Petridis
2a6e0b0e07
Merge branch 'master' into state-machines-experiements
2018-02-22 12:14:55 +00:00
Jordan Petridis
1558ee2177
EpisodeWidget: Fix Date states.
2018-02-22 12:01:07 +00:00
Jordan Petridis
c61938ba62
Update dependancies.
2018-02-20 06:19:05 +00:00
Jordan Petridis
c856b88008
EpisodeWidget: Add a Date state machine.
2018-02-19 18:14:34 +00:00
Jordan Petridis
ae25dd65bf
Cargo clippy and fmt.
2018-02-19 09:58:47 +00:00
Jordan Petridis
a88a1c5f1f
MediaMachine: Expose an interface to update the ProgressBar and local_size.
2018-02-17 19:49:43 +02:00
Jordan Petridis
0cd678cc1d
MediaMachine: Expose an interface to update total_size label.
2018-02-16 17:18:02 +02:00
Jordan Petridis
c9bf58af66
EpisodeWidget: Expose cancel button from the state machine.
2018-02-16 16:05:48 +02:00
Jordan Petridis
ed87a00225
EpisodeWidget: Cleanup parts of the state machine.
2018-02-16 14:43:16 +02:00
Jordan Petridis
bcc3608c04
EpisodeWidget: Split ButtonState enum from the MediaMachine.
...
Add a ButtonState Machine which represents the state of total_size
label, play button, and download button. Also implemented the
update/determine_state function for ButtonState.
Also implemented required generic functions for MediaMachine<X,Y,Z>
that convert it to the desired state.
2018-02-16 13:32:13 +02:00
Jordan Petridis
038d28779c
ShowWidget: Limit description to 100 chars width.
2018-02-16 07:45:29 +02:00
Jordan Petridis
973d47ee05
EpisodeWidget: Expose the connect_clicked callbacks from the statemachine enum.
2018-02-15 18:07:21 +02:00
Jordan Petridis
e803e11c81
Fix EpisodeWidget Vertical alignment.
2018-02-15 11:56:56 +02:00
Jordan Petridis
f50c990d93
Yay, finally something that works.
2018-02-15 11:33:56 +02:00
Jordan Petridis
72eef6f104
Running in circles.
2018-02-15 11:08:21 +02:00
Jordan Petridis
5ccdb5d100
Minor cleanup.
2018-02-15 05:31:36 +02:00
Jordan Petridis
4b8fceaa7d
Nothing makes sense.
2018-02-15 05:15:25 +02:00
Jordan Petridis
a24c9b1350
EpisodesView: Fix EpisodeWidget spacing.
2018-02-14 12:44:30 +02:00
Jordan Petridis
8913b7aedb
SHowWidet: Experiement with dynamic size. Relevant to #35 .
2018-02-14 08:44:02 +02:00
Jordan Petridis
978edfc11f
EpisodeWidget: Allow the title to ellipsize. Releavnt to #35 .
2018-02-14 08:04:59 +02:00
Jordan Petridis
f4b41d0fd3
ShowWidget: Restrict horizontal scrolling. Relevant to #35 .
2018-02-14 07:56:27 +02:00
Jordan Petridis
20162a16a8
EpisodesView: Re-work box/frame layout
...
Restrict horizontal scrolling,
Allow the episode widget to expand along when more space becomes available.
2018-02-14 07:03:26 +02:00
Jordan Petridis
73f7bfa64b
I dont even know what I am doing at this point.
2018-02-14 04:18:05 +02:00
Jordan Petridis
159b0d92dd
EpisodeWidget: Merge Size and Progress machines, Split total_size to it's own machine.
2018-02-13 07:51:00 +02:00
Jordan Petridis
02de2059db
EpisodeWidget: Shrink the Size state Machine.
2018-02-13 05:03:16 +02:00
Jordan Petridis
bdf8901dd8
This compiles.
...
Instead of having a Wrapper of StateMachinesWrappers, use only the desired
possible states in A new struct with only 1 Wrapper that covers all 3 of
the embeded state machines.
I don't even know if the comment makes any sense. Sorry.
2018-02-13 02:23:32 +02:00
Jordan Petridis
b6a71688c0
Version bump to 0.3
2018-02-11 22:57:37 +02:00
Jordan Petridis
48071c28a7
AboutDialog: Add a temporary icon, and update contributors list.
2018-02-10 09:26:08 +02:00
Jordan Petridis
2fbc833ebe
EpisodeWidget: Add a state machine that will manager progress_bar and cancel bttn.
2018-02-10 09:11:31 +02:00
Jordan Petridis
f7b5b35374
EpisodeWidget: change DownloadPlayMachine default constructor to a hidden state.
2018-02-10 08:13:07 +02:00
Jordan Petridis
46bd23cf66
EpisodeWidget: Add a StateMachine that manages Play and Download Buttons.
2018-02-10 08:00:12 +02:00
Jordan Petridis
138cfdb68c
EpisodeWidget: use debug! instead of error! to avoid spamming stderr with *not actuall* errors.
2018-02-10 05:45:50 +02:00
Jordan Petridis
6d9dfe6fe1
EpisodeWidget: Add a StateMachine for the size labels.
2018-02-10 05:41:25 +02:00
Jordan Petridis
fc48ce9c47
EpisodeWidget: Migrate Duration Machine to use take mut too, and revert the api to require just &mut self.
2018-02-10 03:33:39 +02:00
Jordan Petridis
3a9a2f4033
EpisdoeWidget: Use take_mut crate to allow for a better api.
...
Currently it's required that you take mut self in order to manipulate
the internal state machines. This would not allow passing an Arc/Rc to
a callback since A/Rc<T> only derefs to &T and not T.
The take_mut crate allows the retrieval of ownership if you have a &mut refference
and as long you return T again. So Arc<Mutex<Machine> could work with
callbacks and embed Nested state machies without copying.
2018-02-10 03:15:12 +02:00
Jordan Petridis
f0ce0eb653
EpisodeWidget: Implement a state machine for duration label.
2018-02-09 10:12:37 +02:00
Jordan Petridis
23979b8f22
EpisodeWidget: Move state machine implementations into a separate module.
2018-02-09 09:13:41 +02:00
Jordan Petridis
e22a78fac6
EpisodeWidget: Re-enable on_play_bttn_clicked callback.
...
Before we were avoiding reloading the widget in view by
directly dimming the title label. Now instead we reload
the whole widget since I can't figure out a way to have
multiple Owneded refferences of the same state machine.
2018-02-09 08:59:50 +02:00
Jordan Petridis
7690cb1356
Remove code duplication using generics.
2018-02-09 08:43:47 +02:00
Jordan Petridis
a96f4c57c9
Probably the worst state machine implementation that was ever written.
2018-02-09 08:43:43 +02:00
Jordan Petridis
1135d77147
EpisodeWidget: Remove unwrap on that could occur if an invalid path was passed.
2018-02-08 21:10:36 +02:00
Jordan Petridis
9dfb18a487
EpisodeWidget: Minor refactor of set_total_size method.
2018-02-08 21:02:16 +02:00
Jordan Petridis
fbfa0de17e
EpisodeWidget: Fix minutes label parsing.
...
Before if a feed had reported a number between 1 and 60, a label 0 min
would be set.
This fixes that, while also using chrono::Duration for parsing minutes.
2018-02-08 20:39:37 +02:00
Jordan Petridis
c5e0bf34cb
Headerbar: Use the Application Action instead of relying directly on Content.
2018-02-08 05:40:40 +02:00
Jordan Petridis
4ba82c1515
EpisodeWidget: Set title alignment from glade.
2018-02-08 05:29:47 +02:00
Jordan Petridis
b172aa7aa3
Remove forgotten unwrap().
2018-02-08 04:39:51 +02:00
Jordan Petridis
c6f5a4200d
EpisodeWidget: Fix progressbar alignment.
2018-02-07 22:08:52 +02: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
07c1a9a0e9
Fix private field visibility of stacks.
2018-02-07 07:11:40 +02:00
Jordan Petridis
31bd75ae45
Minor Arc changes.
2018-02-07 07:02:24 +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
df02054b29
Hammond-gtk: Change the privacy of the widgets module.
2018-02-07 05:47:58 +02:00
Jordan Petridis
0cdd48ac1e
Hammond-gtk: Change the privacy of the views module.
2018-02-07 05:37:07 +02:00
Jordan Petridis
bdda596806
Hammond-gtk: Inital split of content.rs into stacks module.
2018-02-07 05:33:29 +02:00
Jordan Petridis
d3696fc5ec
Minor Error messages wording changes.
2018-02-07 03:52:21 +02:00
Jordan Petridis
2d33606251
Hammond-gtk: Stack, Content constructors return Results now.
...
Constructors now proxy underlying errors that migth occur during initialazation.
I think that's about the last unwraps in the main thread.
2018-02-07 03:17:37 +02:00
Jordan Petridis
89564996df
ShowStack: Convert rest methods to return Result<T, Error>.
2018-02-07 01:19:07 +02:00
Jordan Petridis
e196a6c905
ShowStack: update_widget methods now return Result<T, Error>.
2018-02-07 00:55:43 +02:00
Jordan Petridis
7eb038b899
EpisodesStack: Refactor update method to return a Result<T, Error>.
2018-02-07 00:31:04 +02:00
Jordan Petridis
1c84f0d721
hammond-gtk::manager: Switch the add function to return a Result<(), Error>.
2018-02-06 22:03:17 +02:00
Jordan Petridis
ab519a54d3
Headerbar: Use Result<T, failure::Error> wherever possible.
2018-02-06 21:32:21 +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
c6e426cbac
Downloader: Change cache_image function to return Result<T, DownlaoderError> instead of Option<T>.
2018-02-06 20:14:03 +02:00
Jordan Petridis
d3f279374a
ShowWidget: Refactor to return Result<T, Error> wherever possible.
2018-02-06 02:47:39 +02:00
Jordan Petridis
0dc16dab9a
EpisodeWidget: Refactor to return Result<T, Error> wherever possible.
2018-02-06 02:31:53 +02:00
Jordan Petridis
de43cae015
Switch rest stuff of data/downloader to Failure Crate.
2018-02-04 17:36:27 +02:00
Jordan Petridis
f9f015a211
Hammond-data: switch database module to use Failure.
2018-02-04 16:33:10 +02:00
Jordan Petridis
1888539a97
Rename assets folder to screenshots, and improve the build system.
2018-02-04 01:34:34 +02:00
Jordan Petridis
97c65c8bd1
Add a download test for Steal the Stars podcast to spot #10 reggressions.
2018-02-03 15:43:00 +02:00
Jordan Petridis
e8ae0b0251
Thats a hack, a terrible one, but without it the user
...
would have to manually click refresh if the user that was added
happen to redirect somewhere else.
The problem is in the hammond-data/src/models/source.rs
fn request_constructor. It has to do with futures and lifetimes
and I am not sure how to tackle it yet.
2018-02-03 00:06:02 +02:00
Jordan Petridis
2f062afb07
Clippy suggestions
2018-01-29 19:09:53 +02:00
Jordan Petridis
a2cf2357c6
Add about a basic about dialog.
2018-01-29 18:02:24 +02:00
Jordan Petridis
a4660a0700
Headerbar: Do not allow insertion of duplicate urls.
2018-01-27 14:40:51 +02:00
Jordan Petridis
18e55e23ee
Headerbar: Do not allow insertion of invalid urls.
2018-01-27 14:11:02 +02:00
Jordan Petridis
8c0e3221cb
refresh_feed: remove code duplication.
2018-01-26 19:29:45 +02:00
Jordan Petridis
5e1d1e557f
GtkApplication: Add an action for showing the headerbar_update_indicator.
2018-01-26 19:15:07 +02:00
Jordan Petridis
a7e3b1b99e
GtkApplication: Headbar and Content constructors now return Self instead of Arc<Self>.
2018-01-26 19:05:19 +02:00
Jordan Petridis
39aa86157b
Switch rest of the tests to point to the internet archive urls.
2018-01-26 17:25:35 +02:00
Jordan Petridis
2912bad110
Pipeline: Split the pipeline from the cpu-pool and the tokio-core.
2018-01-26 13:34:04 +02:00
Jordan Petridis
7bd361fbbb
Upgrade dependancies.
2018-01-22 11:47:17 +02:00
Jordan Petridis
20f36a67a0
Upgrade log and loggerv.
2018-01-21 15:22:13 +02:00
Jordan Petridis
b3c4de320b
Remove dead dependancies.
2018-01-20 07:41:09 +02:00
Jordan Petridis
46b6c0d27e
hammond-data: Remove leftover synchronous code.
2018-01-19 15:41:37 +02:00
Jordan Petridis
e6b0cfccb5
Apply clippy suggestions.
2018-01-19 10:32:25 +02:00
Jordan Petridis
5c5faafc72
Source: Move around code and change some methods signature.
...
request_constructor is now a Source method.
update_etags now takes &mut self instead of mut self.
update_etags now uses source setters methods instead of raw fields.
changed the naming of into_feed to to_feed according to rust convention.
2018-01-19 07:51:55 +02:00
Jordan Petridis
93372a30d0
1.21 Gigawatts. Remove non-future indexing loop.
...
Tried to have a seperate futures loop but it's too confusign having
too write a Trait2, functon2, etc version of everything and keep it together.
Futures are functional sort of, so the synchronous versioun can be removed.
It still needs a ton of work though to be ready, or even get near the perf
of of the sync+rayon version.
2018-01-18 11:38:24 +02:00
Jordan Petridis
574cfae5c6
rustfmt: enable reorder imports.
2018-01-17 08:57:02 +02:00
Jordan Petridis
3358fcd0b3
hammond_data::Feed: general cleanup of no longer needed stuff.
2018-01-15 11:03:40 +02:00
Jordan Petridis
2f7a22355f
Minor cleanup of the mess.
2018-01-14 08:27:50 +02:00
Jordan Petridis
1031315cdd
Getting somewhere?
2018-01-14 06:37:47 +02:00
Jordan Petridis
e4d77a6ba4
Cleanup the id() method mess of the diesel models.
2018-01-13 07:46:56 +02:00
Jordan Petridis
ee9cede921
hammond_data: Remove Source dependancy from Feed struct.
2018-01-13 06:08:51 +02:00
Jordan Petridis
8e367b7e86
Dont ask me how this is working.
2018-01-12 08:50:16 +02:00
Jordan Petridis
01fe5c4730
Revert to using light theme.
2018-01-12 01:48:52 +02:00
Jordan Petridis
e192cf6618
Headerbar: Use application action channel instead of GAction.
2018-01-12 01:41:36 +02:00
Jordan Petridis
95ff3715a3
Migrate StackSwitch actions to use the AppAction channel.
2018-01-11 01:14:54 +02:00
Jordan Petridis
8a90de3c0e
Implement download cancel action. #24
2018-01-10 09:43:38 +02:00
Jordan Petridis
a63a6e168c
Added BrokenFeed Issue template.
2018-01-10 08:27:13 +02:00
Jordan Petridis
3899e8ed39
Add GPL notices to the glade ui files.
2018-01-10 02:59:47 +02:00
Jordan Petridis
7f8544373f
EpisodesView: Show 50 episodes instead of 100.
2018-01-10 02:14:49 +02:00
Jordan Petridis
955845110b
Merge branch 'master' into 33-downloader-re-work
2018-01-09 12:06:38 +02:00
Jordan Petridis
d4e3bf696b
EpisodeWidget: Fix updating.
2018-01-09 10:52:52 +02:00
Jordan Petridis
0ba5e14d7f
EpisodeWidget: Only update if it's visible.
2018-01-09 10:10:54 +02:00
Jordan Petridis
ea70addbc6
Removed some unwrap()s.
2018-01-09 09:21:07 +02:00
Jordan Petridis
87a259e1a4
Minor cleanup.
2018-01-09 07:21:38 +02:00
Jordan Petridis
68d7c621d3
EpisodeWidget: Update the local_size label.
2018-01-09 06:15:41 +02:00
Jordan Petridis
c54f29e82a
EpisodeWidget: Modulate callbacks.
2018-01-09 04:20:38 +02:00
Jordan Petridis
9dafb0ae9e
EpisodeWidget: Add local_size label that shows the amount of bytes downloaded.
2018-01-09 03:58:13 +02:00
Jordan Petridis
193117f579
Downloader: Update the progress index of downloads.
2018-01-08 12:29:47 +02:00
Jordan Petridis
eef83fc98c
EpisodeWidget: Implement API to update the progress bar.
2018-01-08 05:11:37 +02:00
Jordan Petridis
81b1ec810c
Apply clippy suggestions.
2018-01-07 08:36:02 +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
e290ae223e
Pixbuf cache: use rwlock where possible.
2018-01-07 07:49:16 +02:00
Jordan Petridis
6bd391d89e
I hate global mutable state..
2018-01-07 05:51:29 +02:00
Jordan Petridis
4a6a9517f1
ShowStack: Copy the scrollbar position only if both widget represent the same podcast.
2018-01-06 05:38:31 +02:00
Jordan Petridis
e961d5f8b0
Use lazystatic to cache the current chrono date. This will backfire on every new year's eve.
2018-01-06 03:49:26 +02:00
Jordan Petridis
5fed283ff4
EpisodeWidget: Hide duration label if its equal to 0.
2018-01-06 03:18:28 +02:00
Jordan Petridis
da459707be
Wire up the callbacks to the client.
2018-01-05 23:57:48 +02:00
Jordan Petridis
13ba2762ad
Move the download manager to the gtk crate.
2018-01-05 22:02:06 +02:00
Jordan Petridis
e9dd297bf3
Merge branch 'master' into 33-downloader-re-work
2018-01-05 21:43:41 +02:00
Jordan Petridis
eafad35860
Upgrade diesel to 1.0.0 and update rest dependancies.
2018-01-05 19:57:11 +02:00
Jordan Petridis
d8d4b08252
EpisodeWidget: Trim date label to avoid date/title miss alignment on single digit dates.
2018-01-05 18:46:22 +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
299d2e8db1
ShowsView: Retain vertical scrolling adjustment upon view refresh.
2018-01-05 00:09:09 +02:00
Jordan Petridis
8ad5bf6f09
ShowWidget: Retain vertical scrolling adjustment upon view refresh.
2018-01-04 23:43:31 +02:00
Jordan Petridis
112b61d39e
EpisodesView: Retain vertical scrolling adjustment upon view refresh.
2018-01-04 23:19:15 +02:00
Jordan Petridis
9d82b0edda
EpisodeWidget ui tweaks.
2018-01-04 17:27:55 +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
750abb519b
GtkApplication: Change the action channel polling interval.
2018-01-04 16:42:17 +02:00
Jordan Petridis
f873278a96
hammond_gtk: Move the gtk callback to an Application channel action.
2018-01-04 16:16:34 +02:00
Jordan Petridis
f30c645596
hammond_gtk: Refactor refresh_feed func to use the Application channel.
2018-01-04 16:05:42 +02:00
Jordan Petridis
67bc3e5225
Minor cleanup.
2018-01-03 08:12:55 +02:00
Jordan Petridis
c33b493dcd
Migrate Headerbar transitions into Channel actions.
2018-01-03 08:02:06 +02:00
Jordan Petridis
2633161c67
GtkApplication: Remove some SimpleActions.
2018-01-03 06:57:15 +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
c8537e9474
GtkApplication: Start to refactor to into a App-channel structure.
2018-01-03 05:58:50 +02:00
Jordan Petridis
a0476fedec
ShowWidget: Split init into smaller functions and add comments.
2018-01-03 03:33:33 +02:00
Jordan Petridis
f54ae2f1d5
EpisodeWidget: Code cleanup and splitting.
2018-01-03 03:02:46 +02:00
Jordan Petridis
2d71a99121
Change the auto-updater and checkup startup scheduling.
2018-01-02 20:47:49 +02:00
Jordan Petridis
c67c6e463e
EpisodeWidget: Its still a mess, but a bit cleaner.
2018-01-02 08:19:24 +02:00
Jordan Petridis
c61d322569
EpisodeWidget: Implement shared download state.
2018-01-02 08:00:38 +02:00
Jordan Petridis
37e9b6fbf0
'How hard could it be'
2018-01-02 07:23:53 +02:00
Jordan Petridis
15b3eb115c
ShowWidget: Add tooltip to the website button.
2018-01-01 19:46:27 +02:00
Jordan Petridis
a3c204a02d
Headerbar: Fix add popup.
2018-01-01 00:42:14 +02:00
Jordan Petridis
963ff212ad
hammond-gtk: Add some tooltips. Closes #13 .
2017-12-30 21:56:44 +02:00
Jordan Petridis
3c84d889fd
Headerbar: Do more stuff through glade, cut some code.
2017-12-30 21:19:29 +02:00
Jordan Petridis
5730e71e2a
Clear TODO and FIXME that are no longer releavant.
2017-12-30 20:54:23 +02:00
Jordan Petridis
4894683924
hammond-gtk: Set the default theme to the dark variant for now.
2017-12-30 18:12:53 +02:00
Jordan Petridis
ce08d49107
Headerbar: Added update indication.
2017-12-29 22:58:20 +02:00
Jordan Petridis
bcc089bd82
ShowWidget: Migrate unsub button to use the GAction instead.
2017-12-29 20:33:47 +02:00
Jordan Petridis
036292284d
hammond-data: Do not clean source url's cause some feeds use queries as identifiers for some reason.
2017-12-29 20:21:36 +02:00
Jordan Petridis
ac286888bd
hammond-gtk: Add more GActions and wire the EpisodeWidget.
2017-12-29 20:06:04 +02:00
Jordan Petridis
fdd63afdfe
hammond-gtk: Create Application wide actions.
2017-12-29 16:05:10 +02:00
Jordan Petridis
ca06a16bd9
Closes #2 . Kudo to @jwykeham for the fix!.
2017-12-29 02:45:02 +02:00
Jordan Petridis
55b6fccefd
Make it explicit to run some tests.
2017-12-28 23:46:09 +02:00
Jordan Petridis
1d78ab7c42
Cargo upgrade.
2017-12-28 23:19:36 +02:00
Jordan Petridis
287620d6cd
hammond-gtk: Added some getters and removed some public fields.
2017-12-28 19:16:51 +02:00
Jordan Petridis
5942e47f2a
hammond-gtk: Split gtk::Application into its own module.
2017-12-28 16:59:05 +02:00
Jordan Petridis
ada73a616f
EpisodeWidget: Make cancel button insensitive.
2017-12-27 15:13:09 +02:00
Jordan Petridis
0a7825dfff
EpisodeWidget: Remove delete button and hide cancel button till refactor.
2017-12-26 21:36:18 +02:00
Jordan Petridis
bfb74c4dba
hammond-data: Index_loop does not wait for GET request to finish now.
2017-12-26 18:18:48 +02:00
Jordan Petridis
e99ab58b83
Headerbar: Add margins to the hamburger menu.
2017-12-26 15:46:25 +02:00
Jordan Petridis
d5b9379732
Headerbar: Remove some option from the menu.
2017-12-25 22:26:38 +02:00
Jordan Petridis
0a47b91913
Headerbar: Wire menu refresh button.
2017-12-25 22:03:37 +02:00
Jordan Petridis
9f51f4826f
Headerbar: Added menu popup.
2017-12-25 21:54:57 +02:00
Jordan Petridis
eee491f17c
appdata.xml update.
2017-12-25 20:22:53 +02:00
Jordan Petridis
8cccbe928d
hammond-gtk: Change application title. Addresses #28 .
2017-12-24 20:33:18 +02:00
Julian Sparber
f8b9bdb696
[ui] add round corners to listboxes
2017-12-24 13:16:37 +01:00
Jordan Petridis
e7185d2cd3
Visual tweaks, and other minor stuff.
...
Added margins bottom margins on EpisodesView and ShowWidget.
Added some comment's to the code.
Silenced needless_pass_by_value clippy warning.
Updated TODO.md.
2017-12-23 16:56:03 +02:00
Jordan Petridis
2d6f02c407
EpisodeWidget: Do not display size if it's 0 bytes.
2017-12-23 15:44:28 +02:00
Jordan Petridis
f9d17afad3
hammond-gtk: Remove app menu.
2017-12-23 10:39:20 +02:00
Julian Sparber
32c60e7ffa
merge
2017-12-22 22:10:40 +01:00
Julian Sparber
95c290df50
[ui] add custom style and [fix] draw List separators with css
2017-12-22 21:54:28 +01:00
Jordan Petridis
832495bece
EpisodesView: Remove Year category.
2017-12-22 22:14:08 +02:00
Jordan Petridis
ae6a97d725
EpisodesViewWidget: Add margins from the cover.
2017-12-22 21:21:39 +02:00
Jordan Petridis
fac048a24d
Small Visual tweaks all over the client.
2017-12-22 20:47:37 +02:00
Jordan Petridis
0129efb02e
EpisodeWidget: Display episode's duration. Closes #21 .
2017-12-22 17:49:15 +02:00
Jordan Petridis
8513ba3644
EpisodesView: Use chrono to categorize widgets intead of epoch calculations.
2017-12-22 14:29:41 +02:00
Jordan Petridis
b7e160f735
EpisodeWidget: Change date representation based on it's year. Closes #19 .
2017-12-21 21:50:50 +02:00
Jordan Petridis
4a033e6d89
EpisodeWidget: Remove the decimal places in the size label.
2017-12-21 21:37:51 +02:00
Jordan Petridis
378b8609aa
EpisodeWidget: Change the byte unit based on the size. Closes #18 .
2017-12-21 21:31:25 +02:00
Jordan Petridis
c8310b1eb9
EpisodesView: Bump the labels size a bit.
2017-12-21 20:01:24 +02:00
Jordan Petridis
13b2043b76
EpisodesStack: Fix view selection upon creation.
2017-12-21 19:10:37 +02:00
Jordan Petridis
e416bca963
Implemented a pixbuf cache mechanism.
...
Since gdk_pixbuf::Pixbuf is refference counted and every episode,
use the cover of the Podcast Feed/Show, We can only create a Pixbuf
cover per show and pass around the Rc pointer.
GObjects do not implement Send trait, so SendCell is a way around that.
Also lazy_static requires Sync trait, so that's what the mutexes are.
2017-12-21 17:36:07 +02:00
Jordan Petridis
74a6e5814a
ShowWidget: Update EpisodesView when unsub button is activated.
2017-12-21 15:14:29 +02:00
Jordan Petridis
994ea5af22
EpisodesView: Remove unused label.
2017-12-20 22:08:07 +02:00
Jordan Petridis
336846f6dd
EpisodesStack: Implemnt the transition between empty and populated.
2017-12-20 21:25:00 +02:00
Jordan Petridis
db59bed69d
hammond-data::utils: Modified EpisodeCleaner Diesel model to also be used with played_cleaner.
2017-12-20 19:18:20 +02:00
Jordan Petridis
2e06205eda
Define a new Diesel Model for PodcastCover querries.
...
Define new Diesel Model and impl From<Podcast> trait,
Change the signature of downloader::cache_image function,
Change and merge hammond-gtk::utils::get_pixbuf_from_path functions.
2017-12-20 18:19:31 +02:00
Jordan Petridis
c070fc3032
EpisodesView: Ugly and Hacky Prototype of episode splitting.
2017-12-20 15:12:55 +02:00
Jordan Petridis
ace62f7ed6
EpisodesView: Initial draft of episodewidget's splitting into the frames.
2017-12-20 14:49:28 +02:00
Jordan Petridis
bda09c032a
EpisodeWidget: Update the progrress bar only when download clicked.
2017-12-20 13:18:29 +02:00
Jordan Petridis
632f011db5
EpisodeView: Implement initial view update.
2017-12-20 13:13:32 +02:00
Jordan Petridis
914cad72f5
EpisodesView: Custom Diesel model not really necessary.
2017-12-19 20:45:40 +02:00
Jordan Petridis
895591f628
EpisodesView: Use show cover image.
2017-12-19 13:19:38 +02:00
Jordan Petridis
ad9a932143
Fix diesel query.
2017-12-19 12:56:16 +02:00
Jordan Petridis
f602e8c36d
EpisodesView: Create a DieselModel for EpisodeViewWidget.
2017-12-19 11:04:44 +02:00
Jordan Petridis
5220eaceee
EpisodesView: Add an empty cover to the widget.
2017-12-18 21:35:51 +02:00
Jordan Petridis
61bd7893c7
EpisodeWidget: Remove Podcast depndancy from new() method.
2017-12-18 19:10:50 +02:00
Jordan Petridis
32cd24fc7b
EpisodesView: Added glade files and initial yak shaving.
2017-12-18 18:20:40 +02:00
Jordan Petridis
945600b20d
Merge branch 'master' into 'master'
...
Set dim-label for secondary labels of EpisodeWidget in Glade.
See merge request alatiera/Hammond!7
2017-12-17 14:30:10 +00:00
Jordan Petridis
e04de5a576
ShowsView: Move title to a tooltip, fix gresource, center flowbox halign.
2017-12-17 15:57:06 +02:00
Jordan Petridis
0826514cbc
ShowsView: Remove new_episodes indicator.
2017-12-17 15:34:34 +02:00
Constantin Nickel
681b91d368
Set dim-label for secondary labels of EpisodeWidget in Glade.
2017-12-17 13:17:04 +01:00
Jordan Petridis
2eb58eae00
Headerbar: Remove refresh button.
2017-12-17 13:57:08 +02:00
Jordan Petridis
4c8c1f0013
Add update option to the app menu.
2017-12-17 13:52:00 +02:00
Jordan Petridis
35009e2574
Added an auto-updater that runs each hour.
2017-12-17 13:44:00 +02:00
Jordan Petridis
75fe0f8ff5
Use Default trait for creating Widget's that don't need arguments.
2017-12-17 13:08:51 +02:00
Jordan Petridis
440badf1eb
ShowWidget: Strip html tags from the description.
2017-12-16 20:45:15 +02:00
Jordan Petridis
f7af05a650
EpisodeWidget: Dim/Grey out widget if episode is played.
2017-12-16 20:30:25 +02:00
Jordan Petridis
aca35c0513
ShowWidget: Improve? description handling.
2017-12-16 19:20:40 +02:00
Jordan Petridis
f8ae2dcffe
Update rustfmt.toml and remove rustfmt warnings.
2017-12-16 18:22:35 +02:00
Jordan Petridis
0653460fb2
EpisodeWidget: prevent title label overflow.
...
Set label's maximu character width to prevent it and elipsize instead.
2017-12-16 14:58:16 +02:00
Jordan Petridis
dbe08f7deb
EpisodeListBox: Improve the separator workaround.
2017-12-16 14:17:27 +02:00
Jordan Petridis
5989f4f541
ShowWidget: Set widget width to 600.
2017-12-15 21:15:20 +02:00
Jordan Petridis
4375c7f4ce
EpisodeWidget: Added a separator in each widget.
...
This is a work around since list_box_set_header_func is not yet
available in the gtk-rs bindings.
2017-12-15 21:06:57 +02:00
Jordan Petridis
3c90e98d43
ShowWidget: Make settings button a GtkMenuButton.
2017-12-15 21:06:43 +02:00
Jordan Petridis
b1af25e4c0
ShowWidget: Wire the website button to open podcast homepage.
2017-12-15 21:06:16 +02:00
Jordan Petridis
6614818418
Use Gtk::Frame to limit ShowWidget's size.
2017-12-15 19:55:13 +02:00
Jordan Petridis
c74153f56a
Initial implementation of the new ShowWidget.
2017-12-15 18:42:49 +02:00
Jordan Petridis
4b0a6ea0f7
Add Show title in the Headerbar when switching to ShowWidget.
2017-12-15 13:45:08 +02:00
Jordan Petridis
6284c8828b
Merge branch 'episode_widget_redisgn' into 'master'
...
Episode widget redisgn
See merge request alatiera/Hammond!5
2017-12-15 11:30:15 +00:00
Jordan Petridis
0c1e759a45
Dim out secondary label of EpisodeWidget.
2017-12-15 12:27:30 +02:00
Jordan Petridis
0ac78fcff1
Added date label into EpisodeWidget.
2017-12-14 18:03:37 +02:00