Author SHA1 Message Date
Jordan Petridis f632a66d60 Merge branch 'wip/christopherdavis/release-0.4.7' into 'master'
Release version 0.4.7

See merge request World/podcasts!126
2019-10-23 18:23:20 +00:00
Christopher Davis ea0bb607b6 Release version 0.4.7 2019-10-23 20:45:37 +03:00
Jordan Petridis 85e15b77d9 fix the test script so it works outside flatpak again 2019-10-23 20:02:23 +03:00
Jordan Petridis 95055dea1d update cargo deps 2019-10-23 19:22:48 +03:00
Jordan Petridis 630804c5b5 meson: Bump the required version of deps in order to build 2019-10-23 18:40:38 +03:00
Jordan Petridis 6cce4183e9 Flatpak: disable handy introspection generation 2019-10-20 20:25:18 +03:00
Jordan Petridis 35bd0d625c p-data: Update the user agent 2019-10-20 20:22:36 +03:00
Jordan Petridis 073d00b45b Update cargo deps 2019-10-20 20:21:32 +03:00
Jordan Petridis 982cb13e7e shows_view: remove reduntant import 2019-10-20 20:14:11 +03:00
Jordan Petridis 6d3d4c8339 meson: install nightly icon 2019-10-20 20:03:07 +03:00
Jordan Petridis 911e420c24 Flatpak: remove dri access
There was a time where an inline videoplayer was a possibility,
and this would be needed for the GL widget, but it ain't
happening.
2019-10-20 19:40:46 +03:00
Jordan Petridis e69ff0325e Flatpak: remove dconf permissions.
Yay 🎉🎉🎉
2019-10-20 19:38:15 +03:00
Jordan Petridis 7c1353a8aa Flatpak: Add fallback-x11 socket
This makes it so the x11 socket is made available only when
there is no wayland socket available in the system.
2019-10-20 19:35:05 +03:00
Jordan Petridis 4ce9a172b8 Merge branch 'wip/sadiq/small-width' into 'master'
Let the window work on smaller screens

See merge request World/podcasts!122
2019-10-20 16:22:16 +00:00
Mohammed Sadiq 61a7b24084 headerbar: Use a smaller width for entry
So that it fits better on smaller screens
2019-10-19 15:26:29 +00:00
Mohammed Sadiq 8b2ca19f1a episode_widget: Allow reaching smaller widths
So that the window fits fine on smaller screens
2019-10-19 15:26:29 +00:00
Jordan Petridis deafa8f4d3 Merge branch 'fix-142' into 'master'
Show app icon in PulseAudio settings

Closes #142

See merge request World/podcasts!125
2019-10-19 15:25:59 +00:00
James Westman c739935335 Show app icon in PulseAudio settings
According to the docs, `gtk::Window::set_default_icon_name` should take care of
this, but it evidently isn't. So we'll use the environment variable method
instead.

Fixes #142
2019-10-19 01:26:46 -05:00
Asier Sarasua Garmendia 34e4a4f483 Add Basque translation 2019-10-18 08:00:51 +00:00
Jordan Petridis 85c485509c Merge branch 'update_mpris_permissions' into 'master'
Remove unnecessary MPRIS Flatpak permissions

See merge request World/podcasts!124
2019-10-10 13:08:12 +00:00
Felix Häcker 026145e0c7 Remove unnecessary MPRIS Flatpak permissions 2019-10-09 21:03:13 +02:00
Jordan Petridis bb0cf5b547 Merge branch 'update-coc' into 'master'
Update the Code of Conduct to the official GNOME CoC

See merge request World/podcasts!123
2019-10-08 17:37:43 +00:00
Christopher Davis d8acffa844 Update the Code of Conduct to the official GNOME CoC 2019-10-08 09:55:20 -07:00
Jordan Petridis a1f1cddcbe Merge branch 'revert-d8496fe4' into 'master'
Revert "Flatpak: use the 3.32 runtime version"

See merge request World/podcasts!115
2019-10-04 12:28:24 +00:00
Christopher Davis d19612bb3c README: use new nightly and rust-stable locations
freedeskop-sdk is at 19.08 now, and sdk.g.o -> nightly.g.o
2019-10-04 11:53:05 +00:00
Christopher Davis 30e81961e8 Revert "Flatpak: use the 3.32 runtime version"
This reverts commit d8496fe4c4
2019-10-04 11:53:05 +00:00
Jordan Petridis a9873da802 cargo fmt 2019-10-04 14:52:19 +03:00
Jordan Petridis 6046e62f11 Flatpak: update libhandy version to 0.11 2019-10-04 14:52:19 +03:00
Jordan Petridis eb032619a0 Merge branch 'fix-link-and-typo' into 'master'
Fix link and typo

See merge request World/podcasts!121
2019-09-29 16:02:43 +00:00
Julian Hofer d98f0a20a8 Fix link and typo 2019-09-24 21:34:10 +02:00
Jordan Petridis 945b40249c Do not hardcode deny(warnings) in the source code
When a new version of the compiler introduces a new warning
it makes your perfectly fine older release require manual
patching in order to build again.
2019-09-13 03:05:38 +03:00
Jordan Petridis 1192642811 update cargo deps 2019-09-13 02:55:10 +03:00
Jordan Petridis 70772a61a9 meson.build: stop checking for cargo vendor
Since rust 1.37 release its now part of cargo itself.
2019-09-13 01:24:25 +03:00
Sabri Ünal 66b3f031a5 Update Turkish translation 2019-09-09 06:49:59 +00:00
Jordan Petridis 56a9c115f8 Merge branch 'reset-playback-rate' into 'master'
player:	Playback rate is reset when episode is started

Closes #65

See merge request World/podcasts!116
2019-09-04 14:45:45 +00:00
Julian Hofer bd10ed93af player: Playback rate is reset when episode is started
When an episode	is started the "radio_normal"-button is
set to true.
Fixes #65
2019-09-04 17:10:45 +03:00
Jordan Petridis c3351f01e4 Merge branch 'url-parsing' into 'master'
headerbar: Refactor 'add' styling after url parsing

See merge request World/podcasts!119
2019-09-04 14:04:50 +00:00
FeuRenard 1d13384f6c headerbar: Refactor 'add' styling after url parsing
The current code includes many duplications.

I extract a single parameterized style function
accompanied by two delegate functions.

https://gitlab.gnome.org/World/podcasts/issues/45
2019-09-03 22:11:24 +02:00
Jordan Petridis 598e225b00 Merge branch 'zbrown/subclass-gtkapp' into 'master'
Subclass GtkApp

See merge request World/podcasts!113
2019-09-02 21:35:43 +00:00
Jordan Petridis d8090a8172 Upgrade some cargo deps 2019-09-02 23:55:56 +03:00
Zander Brown f47413686c Use a custom GtkApplication instead of GtkApplication direct 2019-09-02 23:55:56 +03:00
Zander Brown c8a194cf32 Use gtk-rs 0.7.0 2019-09-02 23:55:56 +03:00
Jordan Petridis f07ac1f322 Merge branch 'url-creds' into 'master'
Parse url login info into basic auth header

Closes #124

See merge request World/podcasts!120
2019-09-02 18:49:42 +00:00
Peter Rice 02561b614f Parse url login info into basic auth header 2019-09-01 08:11:23 -04:00
Anders Jonsson 6ca2d02c69 Update Swedish translation 2019-08-22 15:54:41 +00:00
Jordan Petridis 300e103fed Merge branch 'cargo-update' into 'master'
build: Update Cargo.lock

Closes #147

See merge request World/podcasts!118
2019-08-05 00:34:13 +00:00
Christopher Davis a77c0e5f32 build: Update Cargo.lock
Fixes https://gitlab.gnome.org/World/podcasts/issues/147
2019-08-04 04:04:15 -07:00
Jordan Petridis cf644d508d Merge branch '145-contributing-merge-request-process' into 'master'
Resolve "CONTRIBUTING - Merge Request Process"

Closes #145

See merge request World/podcasts!117
2019-07-29 15:49:46 +00:00
Zander 452be8a22f Switch make for meson/ninja 2019-07-27 20:00:11 +00:00
37 changed files with 2592 additions and 1883 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ variables:
BUNDLE: "org.gnome.Podcasts.Devel.flatpak"
flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.32"
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
stage: "test"
variables:
MANIFEST_PATH: "org.gnome.Podcasts.Devel.json"
+32
View File
@@ -14,6 +14,38 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed:
## [0.4.7] - 2019-10-23
### Added:
- Improved appdata validation and meson tests World/podcasts!89
- The ability to export show subscriptions to opml files World/podcasts!77
- Support for feeds requiring authentication World/podcasts!120
### Changed:
- Episodes now have a checkmark to show whether or not they've been played World/podcasts!106
- Changed to how errors are shown when adding podcasts World/podcasts!108 World/podcasts!109 World/podcasts!110
- Improved integration of cargo and meson World/podcasts!94
- Refactored some macros for error handling World/podcasts!82
- Refactored the handling of styling changes World/podcasts!119
- Updated the icon to better match the HIG guidlines World/podcasts#102
- Made Podcasts use a GtkApplication subclass World/podcasts!113
- Updated the MPRIS permissions in order to remove a sandbox hole World/podcasts!124
- Bumped gtk and libhandy minimum versions
### Fixed:
- Rewind now works regardless if its the start or the end of the episode World/podcasts!83
- Typos in the README and CONTRIBUTING docs World/podcast!97 World/podcast!98 World/podcast!99 World/podcasts!121
- Show cover is reset properly now if there isn't an image World/podcasts#114
- Query pairs are no longer stripped from URLs World/podcasts!111
- Pause MPRIS button now works on KDE Plasma World/podcasts#115
- The playback widget now properly reflects the playback state on episode change World/podcasts!116
### Removed:
- All preferences World/podcast!104
## [0.4.6] - 2018-10-07
### Added:
+2 -2
View File
@@ -96,7 +96,7 @@ Steps to reproduce:
## Merge Request Process
1. Ensure your code compiles. Run `make` before creating the merge request.
1. Ensure your code compiles. Run `meson` & `ninja` before creating the merge request.
2. Ensure the test suit passes. Run `cargo test -- --test-threads=1`.
3. Ensure your code is properly formatted. Run `cargo fmt --all`.
4. If you're adding new API, it must be properly documented.
@@ -114,4 +114,4 @@ Steps to reproduce:
do not have permission to do that, you may request the second reviewer to merge it for you.
## Code of Conduct
We follow the [Contributor Covenant](/code-of-conduct.md).
We follow the [GNOME Foundation Code of Conduct](/code-of-conduct.md).
Generated
+1149 -1126
View File
File diff suppressed because it is too large Load Diff
+11 -7
View File
@@ -36,11 +36,15 @@ Flatpak is the recommended way of building and installing GNOME Podcasts.
Here are the dependencies you will need.
```sh
# Add flathub repo
# Add flathub and the gnome-nightly repo
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
# Install the Nightly Sdk and Platform GNOME runtime and the rust Sdk extension
flatpak install --user org.gnome.Sdk//3.32 org.gnome.Platform//3.32 org.freedesktop.Sdk.Extension.rust-stable//18.08
# Install the gnome-nightly Sdk and Platform runtime
flatpak install --user gnome-nightly org.gnome.Sdk org.gnome.Platform
# Install the required rust-stable extension from flathub
flatpak install --user flathub org.freedesktop.Sdk.Extension.rust-stable//19.08
```
To install the resulting flatpak you can do:
@@ -61,10 +65,10 @@ sudo ninja -C build install
#### Dependencies
* Rust stable 1.27 or later along with cargo.
* Gtk+ 3.22 or later
* Gstreamer 1.12 or later
* libhandy
* Rust stable 1.34 or later along with cargo.
* Gtk+ 3.24.11 or later
* Gstreamer 1.16 or later
* libhandy 0.0.11 or later
* Meson
* A network connection
+113 -64
View File
@@ -1,77 +1,126 @@
# Contributor Covenant Code of Conduct
# GNOME Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Thank you for being a part of the GNOME project. We value your participation and want everyone to have an enjoyable and fulfilling experience. Accordingly, all participants are expected to follow this Code of Conduct, and to show respect, understanding, and consideration to one another. Thank you for helping make this a welcoming, friendly community for everyone.
## Scope
This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.
This Code of Conduct applies to all online GNOME community spaces, including, but not limited to:
## Enforcement
* Issue tracking systems - bugzilla.gnome.org
* Documentation and tutorials - developer.gnome.org
* Code repositories - git.gnome.org and gitlab.gnome.org
* Mailing lists - mail.gnome.org
* Wikis - wiki.gnome.org
* Chat and forums - irc.gnome.org, discourse.gnome.org, GNOME Telegram channels, and GNOME groups and channels on Matrix.org (including bridges to GNOME IRC channels)
* Community spaces hosted on gnome.org infrastructure
* Any other channels or groups which exist in order to discuss GNOME project activities
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project maintainer at jpetridis@gnome.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Communication channels and private conversations that are normally out of scope may be considered in scope if a GNOME participant is being stalked or harassed. Social media conversations may be considered in-scope if the incident occurred under a GNOME event hashtag, or when an official GNOME account on social media is tagged, or within any other discussion about GNOME. The GNOME Foundation reserves the right to take actions against behaviors that happen in any context, if they are deemed to be relevant to the GNOME project and its participants.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
All participants in GNOME online community spaces are subject to the Code of Conduct. This includes GNOME Foundation board members, corporate sponsors, and paid employees. This also includes volunteers, maintainers, leaders, contributors, contribution reviewers, issue reporters, GNOME users, and anyone participating in discussion in GNOME online spaces.
## Reporting an Incident
If you believe that someone is violating the Code of Conduct, or have
any other concerns, please [contact the Code of Conduct committee](https://wiki.gnome.org/Foundation/CodeOfConduct/ReporterGuide).
## Our Standards
The GNOME online community is dedicated to providing a positive experience for everyone, regardless of:
* age
* body size
* caste
* citizenship
* disability
* education
* ethnicity
* familial status
* gender expression
* gender identity
* genetic information
* immigration status
* level of experience
* nationality
* personal appearance
* pregnancy
* race
* religion
* sex characteristics
* sexual orientation
* sexual identity
* socio-economic status
* tribe
* veteran status
### Community Guidelines
Examples of behavior that contributes to creating a positive environment include:
* **Be friendly.** Use welcoming and inclusive language.
* **Be empathetic.** Be respectful of differing viewpoints and experiences.
* **Be respectful.** When we disagree, we do so in a polite and constructive manner.
* **Be considerate.** Remember that decisions are often a difficult choice between competing priorities. Focus on what is best for the community. Keep discussions around technology choices constructive and respectful.
* **Be patient and generous.** If someone asks for help it is because they need it. When documentation is available that answers the question, politely point them to it. If the question is off-topic, suggest a more appropriate online space to seek help.
* **Try to be concise.** Read the discussion before commenting in order to not repeat a point that has been made.
### Inappropriate Behavior
Community members asked to stop any inappropriate behavior are expected to comply immediately.
We want all participants in the GNOME community have the best possible experience they can. In order to be clear what that means, we've provided a list of examples of behaviors that are inappropriate for GNOME community spaces:
* **Deliberate intimidation, stalking, or following.**
* **Sustained disruption of online discussion, talks, or other events.** Sustained disruption of events, online discussions, or meetings, including talks and presentations, will not be tolerated. This includes 'Talking over' or 'heckling' event speakers or influencing crowd actions that cause hostility in event sessions. Sustained disruption also includes drinking alcohol to excess or using recreational drugs to excess, or pushing others to do so.
* **Harassment of people who don't drink alcohol.** We do not tolerate derogatory comments about those who abstain from alcohol or other substances. We do not tolerate pushing people to drink, talking about their abstinence or preferences to others, or pressuring them to drink - physically or through jeering.
* **Sexist, racist, homophobic, transphobic, ableist language or otherwise exclusionary language.** This includes deliberately referring to someone by a gender that they do not identify with, and/or questioning the legitimacy of an individual's gender identity. If you're unsure if a word is derogatory, don't use it. This also includes repeated subtle and/or indirect discrimination.
* **Unwelcome sexual attention or behavior that contributes to a sexualized environment.** This includes sexualized comments, jokes or imagery in interactions, communications or presentation materials, as well as inappropriate touching, groping, or sexual advances. Sponsors should not use sexualized images, activities, or other material. Meetup organizing staff and other volunteer organizers should not use sexualized clothing/uniforms/costumes, or otherwise create a sexualized environment.
* **Unwelcome physical contact.** This includes touching a person without permission, including sensitive areas such as their hair, pregnant stomach, mobility device (wheelchair, scooter, etc) or tattoos. This also includes physically blocking or intimidating another person. Physical contact or simulated physical contact (such as emojis like "kiss") without affirmative consent is not acceptable. This includes sharing or distribution of sexualized images or text.
* **Violence or threats of violence.** Violence and threats of violence are not acceptable - online or offline. This includes incitement of violence toward any individual, including encouraging a person to commit self-harm. This also includes posting or threatening to post other people's personally identifying information ("doxxing") online.
* **Influencing or encouraging inappropriate behavior.** If you influence or encourage another person to violate the Code of Conduct, you may face the same consequences as if you had violated the Code of Conduct.
* **Possession of an offensive weapon at a GNOME event.** This includes anything deemed to be a weapon by the event organizers.
The GNOME community prioritizes marginalized people's safety over privileged people's comfort. The committee will not act on complaints regarding:
* "Reverse"-isms, including "reverse racism," "reverse sexism," and "cisphobia"
* Reasonable communication of boundaries, such as "leave me alone," "go away," or "I'm not discussing this with you."
* Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions
* Communicating boundaries or criticizing oppressive behavior in a "tone" you don't find congenial
The examples listed above are not against the Code of Conduct. If you have questions about the above statements, please [read this document](https://github.com/sagesharp/code-of-conduct-template/blob/master/code-of-conduct/example-reversisms.md#supporting-diversity).
If a participant engages in behavior that violates this code of conduct, the GNOME Code of Conduct committee may take any action they deem appropriate. Examples of consequences are outlined in the [Committee Procedures Guide](https://wiki.gnome.org/Foundation/CodeOfConduct/CommitteeProcedures).
## Procedure for Handling Incidents
* [Reporter Guide](https://wiki.gnome.org/Foundation/CodeOfConduct/ReporterGuide)
* [Moderator Procedures](https://wiki.gnome.org/Foundation/CodeOfConduct/ModeratorProcedures)
* [Committee Procedures Guide](https://wiki.gnome.org/Foundation/CodeOfConduct/CommitteeProcedures)
## License
The GNOME Online Code of Conduct is licensed under a [Creative Commons Attribution Share-Alike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/)
![Creative Commons License](http://i.creativecommons.org/l/by-sa/3.0/88x31.png)
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
The GNOME Online Code of Conduct was forked from the example policy from the [Geek Feminism wiki, created by the Ada Initiative and other volunteers](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy), which is under a Creative Commons Zero license.
[homepage]: https://www.contributor-covenant.org
Additional language was incorporated and modified from the following Codes of Conduct:
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
* [Citizen Code of Conduct](http://citizencodeofconduct.org/) is licensed [Creative Commons Attribution Share-Alike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/).
* [Code of Conduct template](https://github.com/sagesharp/code-of-conduct-template/) is licensed [Creative Commons Attribution Share-Alike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/) by [Otter Tech](https://otter.technology/code-of-conduct-training)
* [Contributor Covenant version 1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct) (licensed [CC BY 4.0](https://github.com/ContributorCovenant/contributor_covenant/blob/master/LICENSE.md))
* [Data Carpentry Code of Conduct](https://docs.carpentries.org/topic_folders/policies/index_coc.html) is licensed [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/)
* [Django Project Code of Conduct](https://www.djangoproject.com/conduct/) is licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/)
* [Fedora Code of Conduct](http://fedoraproject.org/code-of-conduct)
* [Geek Feminism Anti-harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy) which is under a [Creative Commons Zero license](https://creativecommons.org/publicdomain/zero/1.0/)
* [Previous GNOME Foundation Code of Conduct](https://wiki.gnome.org/action/recall/Foundation/CodeOfConduct/Old)
* [LGBTQ in Technology Slack Code of Conduct](https://lgbtq.technology/coc.html) licensed [Creative Commons Zero](https://creativecommons.org/publicdomain/zero/1.0/)
* [Mozilla Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/) is licensed [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/).
* [Python Mentors Code of Conduct](http://pythonmentors.com/)
* [Speak Up! Community Code of Conduct](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html), licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/)
+11 -12
View File
@@ -1,6 +1,6 @@
project(
'gnome-podcasts', 'rust',
version: '0.4.6',
version: '0.4.7',
license: 'GPLv3',
)
@@ -11,22 +11,21 @@ dependency('dbus-1')
dependency('glib-2.0', version: '>= 2.56')
dependency('gio-2.0', version: '>= 2.56')
dependency('gdk-pixbuf-2.0')
dependency('gtk+-3.0', version: '>= 3.24.7')
dependency('libhandy-0.0', version: '>= 0.0.9')
dependency('gtk+-3.0', version: '>= 3.24.11')
dependency('libhandy-0.0', version: '>= 0.0.11')
dependency('gstreamer-1.0', version: '>= 1.12')
dependency('gstreamer-base-1.0', version: '>= 1.12')
dependency('gstreamer-audio-1.0', version: '>= 1.12')
dependency('gstreamer-video-1.0', version: '>= 1.12')
dependency('gstreamer-player-1.0', version: '>= 1.12')
dependency('gstreamer-plugins-base-1.0', version: '>= 1.12')
dependency('gstreamer-plugins-bad-1.0', version: '>= 1.12')
dependency('gstreamer-bad-audio-1.0', version: '>= 1.12')
dependency('gstreamer-1.0', version: '>= 1.16')
dependency('gstreamer-base-1.0', version: '>= 1.16')
dependency('gstreamer-audio-1.0', version: '>= 1.16')
dependency('gstreamer-video-1.0', version: '>= 1.16')
dependency('gstreamer-player-1.0', version: '>= 1.16')
dependency('gstreamer-plugins-base-1.0', version: '>= 1.16')
dependency('gstreamer-plugins-bad-1.0', version: '>= 1.16')
dependency('gstreamer-bad-audio-1.0', version: '>= 1.16')
cargo = find_program('cargo', required: true)
gresource = find_program('glib-compile-resources', required: true)
gschemas = find_program('glib-compile-schemas', required: true)
cargo_vendor = find_program('cargo-vendor', required: false)
if get_option('profile') == 'development'
profile = '.Devel'
+5 -10
View File
@@ -1,7 +1,7 @@
{
"app-id" : "org.gnome.Podcasts.Devel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "3.32",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
@@ -10,19 +10,13 @@
"tags" : [
"nightly"
],
"desktop-file-name-suffix" : " ☢️",
"finish-args" : [
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--share=network",
"--share=ipc",
"--socket=x11",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=pulseaudio",
"--device=dri",
"--own-name=org.mpris.MediaPlayer2.Podcasts",
"--env=USE_PLAYBING3=1"
],
"build-options" : {
@@ -41,7 +35,7 @@
"name" : "libhandy",
"buildsystem" : "meson",
"config-opts" : [
"-Dintrospection=enabled",
"-Dintrospection=disabled",
"-Dgtk_doc=false",
"-Dtests=false",
"-Dexamples=false",
@@ -56,13 +50,14 @@
{
"type" : "git",
"url" : "https://source.puri.sm/Librem5/libhandy.git",
"commit" : "56b0aa62f6251ee19a88fc208b7ca8dcf9c9633c"
"commit" : "f5909a897f70143bdd2f89f47a63c1bf848330ce"
}
]
},
{
"name" : "gnome-podcasts",
"buildsystem" : "meson",
"builddir" : "true",
"config-opts" : [
"-Dprofile=development"
],
+5 -10
View File
@@ -1,7 +1,7 @@
{
"app-id" : "org.gnome.Podcasts",
"runtime" : "org.gnome.Platform",
"runtime-version" : "3.32",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
@@ -12,17 +12,12 @@
],
"desktop-file-name-suffix" : " ☢️",
"finish-args" : [
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--share=network",
"--share=ipc",
"--socket=x11",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=pulseaudio",
"--device=dri",
"--own-name=org.mpris.MediaPlayer2.Podcasts",
"--env=USE_PLAYBING3=1"
],
"build-options" : {
@@ -49,14 +44,14 @@
"-Dglade_catalog=disabled"
],
"cleanup" : [
"/include",
"/lib/pkgconfig"
"/include",
"/lib/pkgconfig"
],
"sources" : [
{
"type" : "git",
"url" : "https://source.puri.sm/Librem5/libhandy.git",
"commit" : "56b0aa62f6251ee19a88fc208b7ca8dcf9c9633c"
"commit" : "f5909a897f70143bdd2f89f47a63c1bf848330ce"
}
]
},
+21 -20
View File
@@ -5,37 +5,38 @@ version = "0.1.0"
edition = "2018"
[dependencies]
ammonia = "2.0.0"
chrono = "0.4.6"
derive_builder = "0.7.1"
lazy_static = "1.3.0"
log = "0.4.6"
rayon = "1.0.3"
ammonia = "3.0.0"
chrono = "0.4.9"
derive_builder = "0.8.0"
lazy_static = "1.4.0"
log = "0.4.8"
rayon = "1.2.0"
rfc822_sanitizer = "0.3.3"
rss = "1.7.0"
url = "1.7.2"
rss = "1.8.0"
url = "2.1.0"
xdg = "2.2.0"
xml-rs = "0.8.0"
futures = "0.1.25"
hyper = "0.12.25"
http = "0.1.16"
tokio = "0.1.18"
futures = "0.1.29"
hyper = "0.12.35"
http = "0.1.19"
tokio = "0.1.22"
hyper-tls = "0.3.2"
native-tls = "0.2.2"
num_cpus = "1.10.0"
failure = "0.1.5"
failure_derive = "0.1.5"
native-tls = "0.2.3"
num_cpus = "1.10.1"
failure = "0.1.6"
failure_derive = "0.1.6"
base64 = "0.10.1"
[dependencies.diesel]
features = ["sqlite", "r2d2"]
version = "=1.3.0"
version = "1.4.3"
[dependencies.diesel_migrations]
features = ["sqlite"]
version = "=1.3.0"
version = "1.4.0"
[dev-dependencies]
rand = "0.6.5"
rand = "0.7.2"
tempdir = "0.3.7"
pretty_assertions = "0.6.1"
maplit = "1.0.1"
maplit = "1.0.2"
+1 -2
View File
@@ -62,7 +62,6 @@
missing_copy_implementations
)]
#![allow(proc_macro_derive_resolution_fallback)]
// #![deny(warnings)]
//! FIXME: Docs
@@ -110,7 +109,7 @@ pub use crate::models::{Episode, EpisodeWidgetModel, Show, ShowCoverModel, Sourc
// Keep this in sync with Tor-browser releases
/// The user-agent to be used for all the requests.
/// It originates from the Tor-browser UA.
pub const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0";
pub const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0";
/// [XDG Base Direcotory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths.
#[allow(missing_debug_implementations)]
+16 -2
View File
@@ -27,7 +27,7 @@ use hyper::{Body, Client};
use hyper_tls::HttpsConnector;
use http::header::{
HeaderValue, ETAG, IF_MODIFIED_SINCE, IF_NONE_MATCH, LAST_MODIFIED, LOCATION,
HeaderValue, AUTHORIZATION, ETAG, IF_MODIFIED_SINCE, IF_NONE_MATCH, LAST_MODIFIED, LOCATION,
USER_AGENT as USER_AGENT_HEADER,
};
use http::{Request, Response, StatusCode, Uri};
@@ -35,6 +35,8 @@ use http::{Request, Response, StatusCode, Uri};
use futures::future::{loop_fn, Future, Loop};
use futures::prelude::*;
use base64::{encode_config, URL_SAFE};
use crate::database::connection;
use crate::errors::*;
use crate::feed::{Feed, FeedBuilder};
@@ -65,7 +67,7 @@ impl Save<Source> for Source {
let db = connection();
let con = db.get()?;
self.save_changes::<Source>(&con).map_err(From::from)
self.save_changes::<Source>(&*con).map_err(From::from)
}
}
@@ -276,6 +278,18 @@ impl Source {
let uri = Uri::from_str(self.uri()).unwrap();
let mut req = Request::get(uri).body(Body::empty()).unwrap();
if let Ok(url) = Url::parse(self.uri()) {
if let Some(password) = url.password() {
let mut auth = "Basic ".to_owned();
auth.push_str(&encode_config(
&format!("{}:{}", url.username(), password),
URL_SAFE,
));
req.headers_mut()
.insert(AUTHORIZATION, HeaderValue::from_str(&auth).unwrap());
}
}
// Set the UserAgent cause ppl still seem to check it for some reason...
req.headers_mut()
.insert(USER_AGENT_HEADER, HeaderValue::from_static(USER_AGENT));
-1
View File
@@ -96,5 +96,4 @@ mod tests {
let item = Some(&extension);
assert_eq!(parse_itunes_duration(item), Some(6970));
}
}
+6 -6
View File
@@ -5,14 +5,14 @@ version = "0.1.0"
edition = "2018"
[dependencies]
error-chain = "0.12.0"
log = "0.4.6"
mime_guess = "1.8.6"
reqwest = "0.9.12"
error-chain = "0.12.1"
log = "0.4.8"
mime_guess = "2.0.1"
reqwest = "0.9.22"
tempdir = "0.3.7"
glob = "0.3.0"
failure = "0.1.5"
failure_derive = "0.1.5"
failure = "0.1.6"
failure_derive = "0.1.6"
[dependencies.podcasts-data]
path = "../podcasts-data"
-1
View File
@@ -39,7 +39,6 @@
elided_lifetime_in_paths,
missing_copy_implementations
)]
// #![deny(warnings)]
#[macro_use]
extern crate failure_derive;
+33 -27
View File
@@ -5,48 +5,54 @@ version = "0.1.0"
edition = "2018"
[dependencies]
chrono = "0.4.6"
crossbeam-channel = "0.3.8"
gdk = "0.10.0"
gdk-pixbuf = "0.6.0"
glib = "0.7.1"
gst = { version = "0.13.0", package = "gstreamer" }
gst-player = { version = "0.13.0", package = "gstreamer-player" }
chrono = "0.4.9"
crossbeam-channel = "0.3.9"
gdk = "0.11.0"
gdk-pixbuf = "0.7.0"
gobject-sys = "0.9.0"
glib-sys = "0.9.0"
gst = { version = "0.14.0", package = "gstreamer" }
gst-player = { version = "0.14.0", package = "gstreamer-player" }
humansize = "1.1.0"
lazy_static = "1.3.0"
log = "0.4.6"
loggerv = "0.7.1"
open = "1.2.2"
rayon = "1.0.3"
url = "1.7.2"
failure = "0.1.5"
failure_derive = "0.1.5"
lazy_static = "1.4.0"
log = "0.4.8"
loggerv = "0.7.2"
open = "1.3.2"
rayon = "1.2.0"
url = "2.1.0"
failure = "0.1.6"
failure_derive = "0.1.6"
fragile = "0.3.0"
regex = "1.1.3"
reqwest = "0.9.12"
serde_json = "1.0.39"
regex = "1.3.1"
reqwest = "0.9.22"
serde_json = "1.0.41"
# html2text = "0.1.8"
html2text = { git = "https://github.com/jugglerchris/rust-html2text" }
mpris-player = "0.4.0"
[dependencies.gettext-rs]
git = "https://github.com/danigm/gettext-rs"
branch = "no-gettext"
features = ["gettext-system"]
[dependencies.gtk]
features = ["v3_24"]
version = "0.6.0"
[dependencies.glib]
features = ["subclassing"]
version = "0.8.2"
[dependencies.gio]
features = ["v2_50"]
version = "0.6.0"
features = ["v2_50", "subclassing"]
version = "0.7.0"
[dependencies.gtk]
features = ["v3_24", "subclassing"]
version = "0.7.0"
[dependencies.libhandy]
version = "0.3.0"
features = [ "v0_0_7"]
version = "0.4.0"
features = [ "v0_0_10"]
[dependencies.mpris-player]
version = "0.3.0"
# [dependencies.mpris-player]
# version = "0.4.0"
# git = "https://gitlab.gnome.org/World/Rust/mpris-player"
[dependencies.podcasts-data]
+1
View File
@@ -6,6 +6,7 @@ da
de
en_GB
es
eu
fi
fr
fur
+362
View File
@@ -0,0 +1,362 @@
# Basque translation for podcasts.
# Copyright (C) 2019 podcasts's COPYRIGHT HOLDER
# This file is distributed under the same license as the podcasts package.
# Asier Sarasua Garmendia <asier.sarasua@gmail.com>, 2019.
#
msgid ""
msgstr "Project-Id-Version: podcasts master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/podcasts/issues\n"
"POT-Creation-Date: 2019-10-10 13:08+0000\n"
"PO-Revision-Date: 2019-10-18 10:00+0100\n"
"Last-Translator: Asier Sarasua Garmendia <asier.sarasua@gmail.com>\n"
"Language-Team: Basque <librezale@librezale.eus>\n"
"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:15
msgid "Top position of the last open main window"
msgstr "Irekitako azken leiho nagusiaren goiko posizioa"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:19
msgid "Left position of the last open main window"
msgstr "Irekitako azken leiho nagusiaren ezkerreko posizioa"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:23
msgid "Height of the last open main window"
msgstr "Irekitako azken leiho nagusiaren altuera"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:27
msgid "Width of the last open main window"
msgstr "Irekitako azken leiho nagusiaren zabalera"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:31
msgid "Maximized state of the last open main window"
msgstr "Irekitako azken leiho nagusiaren egoera maximizatua"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:36
msgid "Enable or disable dark theme"
msgstr "Gaitu edo desgaitu gai iluna"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:41
msgid "Whether to periodically refresh content"
msgstr "Edukia aldizka freskatuko den ala ez"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:46
msgid "How many periods of time to wait between automatic refreshes"
msgstr "Zenbat denbora-tarte itxarongo den freskatze automatikoen artean"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:50
msgid "What period of time to wait between automatic refreshes"
msgstr "Zenbat denbora itxarongo den freskatze automatikoen artean"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:54
msgid "Whether to refresh content after startup"
msgstr "Abioaren ondoren edukia freskatuko den ala ez"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:60
msgid "How many periods of time to wait between automatic cleanups"
msgstr "Zenbat denbora-tarte itxarongo den garbitze automatikoen artean"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:64
msgid "What period of time to wait between automatic cleanups"
msgstr "Zenbat denbora itxarongo den garbitze automatikoen artean"
#. Weird magic I copy-pasted that sets the Application Name in the Shell.
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:3
#: podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in:4
#: podcasts-gtk/src/app.rs:327 podcasts-gtk/src/widgets/aboutdialog.rs:56
msgid "Podcasts"
msgstr "Podcast-ak"
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:4
#: podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in:10
msgid "Listen to your favorite podcasts, right from your desktop."
msgstr "Entzun zure podcast gogokoenak zuzenean zure mahaigainetik."
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:13
msgid "Podcast;RSS;"
msgstr "Podcast;RSS;"
#: podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in:8
msgid "Podcast app for GNOME"
msgstr "Podcast-en aplikazioa GNOMErako"
#: podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in:77
msgid "Jordan Petridis"
msgstr "Jordan Petridis"
#: podcasts-gtk/resources/gtk/empty_view.ui:46
msgid "This show does not have episodes yet"
msgstr "Saio honek ez du pasarterik oraindik"
#: podcasts-gtk/resources/gtk/empty_view.ui:62
msgid "If you think this is an error, please consider writing a bug report."
msgstr "Errorea dela uste baduzu, idatzi akatsaren jakinarazpen bat."
#: podcasts-gtk/resources/gtk/empty_view.ui:106
msgid "Get some shows"
msgstr "Eskuratu zenbait saio"
#: podcasts-gtk/resources/gtk/empty_view.ui:143
msgid "Add new shows via feed URL"
msgstr "Gehitu saio berriak jarioen URL baten bidez"
#: podcasts-gtk/resources/gtk/empty_view.ui:172
msgid "Import shows from another device"
msgstr "Inportatu saioak beste gailu batetik"
#: podcasts-gtk/resources/gtk/episode_widget.ui:79
msgid "Youve already listened to this episode."
msgstr "Dagoeneko entzun duzu pasarte hau"
#: podcasts-gtk/resources/gtk/episode_widget.ui:208
msgid "Calculating episode size…"
msgstr "Pasartearen tamaina kalkulatzen…"
#: podcasts-gtk/resources/gtk/episode_widget.ui:248
msgid "Play this episode"
msgstr "Erreproduzitu pasarte hau"
#: podcasts-gtk/resources/gtk/episode_widget.ui:269
msgid "Cancel the download process"
msgstr "Utzi deskarga-prozesua"
#: podcasts-gtk/resources/gtk/episode_widget.ui:292
msgid "Download this episode"
msgstr "Deskargatu pasarte hau"
#: podcasts-gtk/resources/gtk/hamburger.ui:7
msgid "_Check for New Episodes"
msgstr "_Begiratu pasarte berriak dauden"
#: podcasts-gtk/resources/gtk/hamburger.ui:12
msgid "_Import Shows"
msgstr "_Inportatu saioak"
#: podcasts-gtk/resources/gtk/hamburger.ui:16
msgid "_Export Shows"
msgstr "_Esportatu saioak"
#: podcasts-gtk/resources/gtk/hamburger.ui:22
msgid "_Keyboard Shortcuts"
msgstr "Las_ter-teklak"
#: podcasts-gtk/resources/gtk/hamburger.ui:30
msgid "_About Podcasts"
msgstr "Podcasts aplikazioari _buruz"
#: podcasts-gtk/resources/gtk/headerbar.ui:35
#: podcasts-gtk/resources/gtk/headerbar.ui:177
msgid "Add a new feed"
msgstr "Gehitu jario berria"
#: podcasts-gtk/resources/gtk/headerbar.ui:53
msgid "Enter feed address to add"
msgstr "Sartu gehituko den jarioaren helbidea"
#: podcasts-gtk/resources/gtk/headerbar.ui:89
msgid "Add"
msgstr "Gehitu"
#: podcasts-gtk/resources/gtk/headerbar.ui:157
msgid "Show Title"
msgstr "Erakutsi titulua"
#: podcasts-gtk/resources/gtk/headerbar.ui:198
msgid "Back"
msgstr "Atzera"
#: podcasts-gtk/resources/gtk/help-overlay.ui:12
msgid "General"
msgstr "Orokorra"
#: podcasts-gtk/resources/gtk/help-overlay.ui:18
msgctxt "shortcut window"
msgid "Check for new episodes"
msgstr "Begiratu pasarte berriak dauden"
#: podcasts-gtk/resources/gtk/help-overlay.ui:25
msgctxt "shortcut window"
msgid "Quit the application"
msgstr "Irten aplikaziotik"
#: podcasts-gtk/resources/gtk/home_view.ui:56
msgid "Today"
msgstr "Gaur"
#: podcasts-gtk/resources/gtk/home_view.ui:112
msgid "Yesterday"
msgstr "Atzo"
#: podcasts-gtk/resources/gtk/home_view.ui:168
msgid "This Week"
msgstr "Aste honetan"
#: podcasts-gtk/resources/gtk/home_view.ui:224
msgid "This Month"
msgstr "Hilabete honetan"
#: podcasts-gtk/resources/gtk/home_view.ui:281
msgid "Older"
msgstr "Zaharragoa"
#: podcasts-gtk/resources/gtk/inapp_notif.ui:101
msgid "An in-app action notification"
msgstr "Aplikazioaren jakinarazpen bat"
#: podcasts-gtk/resources/gtk/inapp_notif.ui:112
msgid "Undo"
msgstr "Desegin"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:72
msgid "Rewind 10 seconds"
msgstr "Joan 10 segundo atzera"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:87
msgid "Play"
msgstr "Erreproduzitu"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:103
msgid "Pause"
msgstr "Pausatu"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:119
msgid "Fast forward 10 seconds"
msgstr "Joan 10 segundo aurrera"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:285
msgid "Change the playback speed"
msgstr "Aldatu erreprodukzioaren abiadura"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:300
#: podcasts-gtk/resources/gtk/player_toolbar.ui:380
msgid "1.00×"
msgstr "1.00×"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:344
msgid "1.50×"
msgstr "1.50×"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:348
msgid "1.5 speed rate"
msgstr "1.5 abiadura-tasa"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:362
msgid "1.25×"
msgstr "1.25×"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:366
msgid "1.25 speed rate"
msgstr "1.25 abiadura-tasa"
#: podcasts-gtk/resources/gtk/player_toolbar.ui:384
msgid "Normal speed"
msgstr "Abiadura normala"
#: podcasts-gtk/resources/gtk/secondary_menu.ui:7
msgid "_Mark All Episodes as Played"
msgstr "_Markatu pasarte guztiak erreproduzitu gisa"
#: podcasts-gtk/resources/gtk/secondary_menu.ui:11
msgid "_Website"
msgstr "_Webgunea"
#: podcasts-gtk/resources/gtk/secondary_menu.ui:15
msgid "_Unsubscribe"
msgstr "Harpidetza _kendu"
#: podcasts-gtk/resources/gtk/show_menu.ui:51
msgid "Open Website"
msgstr "Ireki webgunea"
#: podcasts-gtk/resources/gtk/show_menu.ui:64
msgid "Mark All as Played"
msgstr "Markatu dena erreproduzitu gisa"
#: podcasts-gtk/resources/gtk/show_menu.ui:89
msgid "Unsubscribe"
msgstr "Harpidetza kendu"
#: podcasts-gtk/src/app.rs:265
msgid "Fetching new episodes"
msgstr "Pasarte berriak eskuratzen"
#: podcasts-gtk/src/stacks/content.rs:54
msgid "New"
msgstr "Berria"
#: podcasts-gtk/src/stacks/content.rs:55
msgid "Shows"
msgstr "Saioak"
#: podcasts-gtk/src/utils.rs:396
msgid "Select the file from which to you want to import shows."
msgstr "Hautatu saioak inportatzeko erabiliko duzun fitxategia."
#: podcasts-gtk/src/utils.rs:399
msgid "_Import"
msgstr "_Inportatu"
#: podcasts-gtk/src/utils.rs:408 podcasts-gtk/src/utils.rs:456
msgid "OPML file"
msgstr "OPML fitxategia"
#: podcasts-gtk/src/utils.rs:425
msgid "Failed to parse the imported file"
msgstr "Huts egin du inportatuko fitxategia analizatzeak"
#: podcasts-gtk/src/utils.rs:430 podcasts-gtk/src/utils.rs:474
msgid "Selected file could not be accessed."
msgstr "Hautatutako fitxategia ezin da eskuratu."
#: podcasts-gtk/src/utils.rs:444
msgid "Export shows to…"
msgstr "Esportatu saioak hona…"
#: podcasts-gtk/src/utils.rs:447
msgid "_Export"
msgstr "_Esportatu"
#: podcasts-gtk/src/utils.rs:448
msgid "_Cancel"
msgstr "_Utzi"
#: podcasts-gtk/src/utils.rs:468
msgid "GNOME Podcasts Subscriptions"
msgstr "GNOME Podcasts harpidetzak"
#: podcasts-gtk/src/utils.rs:469
msgid "Failed to export podcasts"
msgstr "Huts egin du podcast-ak esportatzeak"
#: podcasts-gtk/src/widgets/aboutdialog.rs:51
msgid "Podcast Client for the GNOME Desktop."
msgstr "Podcast-en bezeroa GNOME mahaigainerako."
#: podcasts-gtk/src/widgets/aboutdialog.rs:58
msgid "Learn more about GNOME Podcasts"
msgstr "Ikasi gehiago GNOME Podcasts aplikazioari buruz"
#: podcasts-gtk/src/widgets/aboutdialog.rs:63
msgid "translator-credits"
msgstr "Asier Sarasua Garmendia <asier.sarasua@gmail.com>"
#: podcasts-gtk/src/widgets/episode.rs:148
msgid "{} min"
msgstr "{} min"
#. sender.send(Action::ErrorNotification(format!("Player Error: {}", error)));
#: podcasts-gtk/src/widgets/player.rs:535
msgid "The media player was unable to execute an action."
msgstr "Multimedia-erreproduzigailuak ezin izan da ekintza bat exekutatu."
#: podcasts-gtk/src/widgets/show_menu.rs:179
msgid "Marked all episodes as listened"
msgstr "Markatu pasarte guztiak entzundako gisa"
#: podcasts-gtk/src/widgets/show_menu.rs:184
msgid "Unsubscribed from {}"
msgstr "Kendu {} podcast-eko harpidetza"
+76 -88
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: podcasts master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/podcasts/issues\n"
"POT-Creation-Date: 2019-02-02 15:17+0000\n"
"PO-Revision-Date: 2019-03-13 23:00+0100\n"
"POT-Creation-Date: 2019-06-15 10:55+0000\n"
"PO-Revision-Date: 2019-08-22 17:54+0200\n"
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.1\n"
"X-Generator: Poedit 2.2.3\n"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:15
msgid "Top position of the last open main window"
@@ -69,7 +69,7 @@ msgstr "Vilken sorts tidsperiod att vänta mellan automatiska upprensningar"
#. Weird magic I copy-pasted that sets the Application Name in the Shell.
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:3
#: podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in:4
#: podcasts-gtk/src/app.rs:124 podcasts-gtk/src/app.rs:455
#: podcasts-gtk/src/app.rs:109 podcasts-gtk/src/app.rs:433
#: podcasts-gtk/src/widgets/aboutdialog.rs:56
msgid "Podcasts"
msgstr "Poddsändningar"
@@ -79,11 +79,6 @@ msgstr "Poddsändningar"
msgid "Listen to your favorite podcasts, right from your desktop."
msgstr "Lyssna på dina favoritpoddsändningar, direkt från ditt skrivbord."
#. Translators: Do NOT translate or transliterate this text (this is an icon file name)!
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:6
msgid "@icon@"
msgstr "@icon@"
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:13
msgid "Podcast;RSS;"
@@ -117,19 +112,23 @@ msgstr "Lägg till nya shower via flödes-URL"
msgid "Import shows from another device"
msgstr "Importera shower från en annan enhet"
#: podcasts-gtk/resources/gtk/episode_widget.ui:180
#: podcasts-gtk/resources/gtk/episode_widget.ui:79
msgid "Youve already listened to this episode."
msgstr "Du har redan lyssnat på detta avsnitt."
#: podcasts-gtk/resources/gtk/episode_widget.ui:208
msgid "Calculating episode size…"
msgstr "Beräknar avsnittsstorlek…"
#: podcasts-gtk/resources/gtk/episode_widget.ui:220
#: podcasts-gtk/resources/gtk/episode_widget.ui:248
msgid "Play this episode"
msgstr "Spela detta avsnitt"
#: podcasts-gtk/resources/gtk/episode_widget.ui:241
#: podcasts-gtk/resources/gtk/episode_widget.ui:269
msgid "Cancel the download process"
msgstr "Avbryt hämtningsprocessen"
#: podcasts-gtk/resources/gtk/episode_widget.ui:264
#: podcasts-gtk/resources/gtk/episode_widget.ui:292
msgid "Download this episode"
msgstr "Hämta detta avsnitt"
@@ -146,19 +145,15 @@ msgid "_Export Shows"
msgstr "_Exportera shower"
#: podcasts-gtk/resources/gtk/hamburger.ui:22
msgid "_Preferences"
msgstr "I_nställningar"
#: podcasts-gtk/resources/gtk/hamburger.ui:27
msgid "_Keyboard Shortcuts"
msgstr "_Tangentbordsgenvägar"
#: podcasts-gtk/resources/gtk/hamburger.ui:35
#: podcasts-gtk/resources/gtk/hamburger.ui:30
msgid "_About Podcasts"
msgstr "_Om Poddsändningar"
#: podcasts-gtk/resources/gtk/headerbar.ui:35
#: podcasts-gtk/resources/gtk/headerbar.ui:189
#: podcasts-gtk/resources/gtk/headerbar.ui:177
msgid "Add a new feed"
msgstr "Lägg till ett nytt flöde"
@@ -170,15 +165,11 @@ msgstr "Ange flödesadress att lägga till"
msgid "Add"
msgstr "Lägg till"
#: podcasts-gtk/resources/gtk/headerbar.ui:133
msgid "You are already subscribed to that feed!"
msgstr "Du prenumererar redan på det flödet!"
#: podcasts-gtk/resources/gtk/headerbar.ui:169
#: podcasts-gtk/resources/gtk/headerbar.ui:157
msgid "Show Title"
msgstr "Visa titel"
#: podcasts-gtk/resources/gtk/headerbar.ui:210
#: podcasts-gtk/resources/gtk/headerbar.ui:198
msgid "Back"
msgstr "Bakåt"
@@ -193,11 +184,6 @@ msgstr "Sök efter nya avsnitt"
#: podcasts-gtk/resources/gtk/help-overlay.ui:25
msgctxt "shortcut window"
msgid "Preferences"
msgstr "Inställningar"
#: podcasts-gtk/resources/gtk/help-overlay.ui:32
msgctxt "shortcut window"
msgid "Quit the application"
msgstr "Avsluta programmet"
@@ -274,27 +260,6 @@ msgstr "Hastighetsfaktor 1,25"
msgid "Normal speed"
msgstr "Normal hastighet"
#: podcasts-gtk/resources/gtk/prefs.ui:42
#: podcasts-gtk/resources/gtk/prefs.ui:295
msgid "Preferences"
msgstr "Inställningar"
#: podcasts-gtk/resources/gtk/prefs.ui:76
msgid "Appearance"
msgstr "Utseende"
#: podcasts-gtk/resources/gtk/prefs.ui:120
msgid "Dark Theme"
msgstr "Mörkt tema"
#: podcasts-gtk/resources/gtk/prefs.ui:166
msgid "Delete played episodes"
msgstr "Ta bort spelade avsnitt"
#: podcasts-gtk/resources/gtk/prefs.ui:211
msgid "After"
msgstr "Efter"
#: podcasts-gtk/resources/gtk/secondary_menu.ui:7
msgid "_Mark All Episodes as Played"
msgstr "_Markera alla avsnitt som spelade"
@@ -319,38 +284,18 @@ msgstr "Markera alla som spelade"
msgid "Unsubscribe"
msgstr "Säg upp prenumeration"
#: podcasts-gtk/src/app.rs:369
#: podcasts-gtk/src/app.rs:351
msgid "Fetching new episodes"
msgstr "Hämtar nya avsnitt"
#: podcasts-gtk/src/headerbar.rs:117
#: podcasts-gtk/src/headerbar.rs:127
msgid "You are already subscribed to this show"
msgstr "Du prenumererar redan på denna show"
#: podcasts-gtk/src/headerbar.rs:125
#: podcasts-gtk/src/headerbar.rs:145
msgid "Invalid URL"
msgstr "Ogiltig URL"
#: podcasts-gtk/src/prefs.rs:78
msgid "Seconds"
msgstr "Sekunder"
#: podcasts-gtk/src/prefs.rs:79
msgid "Minutes"
msgstr "Minuter"
#: podcasts-gtk/src/prefs.rs:80
msgid "Hours"
msgstr "Timmar"
#: podcasts-gtk/src/prefs.rs:81
msgid "Days"
msgstr "Dagar"
#: podcasts-gtk/src/prefs.rs:82
msgid "Weeks"
msgstr "Veckor"
#: podcasts-gtk/src/stacks/content.rs:54
msgid "New"
msgstr "Nytt"
@@ -359,43 +304,43 @@ msgstr "Nytt"
msgid "Shows"
msgstr "Shower"
#: podcasts-gtk/src/utils.rs:377
#: podcasts-gtk/src/utils.rs:397
msgid "Select the file from which to you want to import shows."
msgstr "Välj filen från vilken du vill importera shower."
#: podcasts-gtk/src/utils.rs:380
#: podcasts-gtk/src/utils.rs:400
msgid "_Import"
msgstr "_Importera"
#: podcasts-gtk/src/utils.rs:389 podcasts-gtk/src/utils.rs:435
#: podcasts-gtk/src/utils.rs:409 podcasts-gtk/src/utils.rs:457
msgid "OPML file"
msgstr "OPML-fil"
#: podcasts-gtk/src/utils.rs:406
#: podcasts-gtk/src/utils.rs:426
msgid "Failed to parse the imported file"
msgstr "Misslyckades med att tolka den importerade filen"
#: podcasts-gtk/src/utils.rs:411 podcasts-gtk/src/utils.rs:453
#: podcasts-gtk/src/utils.rs:431 podcasts-gtk/src/utils.rs:475
msgid "Selected file could not be accessed."
msgstr "Den markerade filen kunde inte kommas åt."
#: podcasts-gtk/src/utils.rs:423
#: podcasts-gtk/src/utils.rs:445
msgid "Export shows to…"
msgstr "Exportera shower till…"
#: podcasts-gtk/src/utils.rs:426
#: podcasts-gtk/src/utils.rs:448
msgid "_Export"
msgstr "_Exportera"
#: podcasts-gtk/src/utils.rs:427
#: podcasts-gtk/src/utils.rs:449
msgid "_Cancel"
msgstr "A_vbryt"
#: podcasts-gtk/src/utils.rs:447
#: podcasts-gtk/src/utils.rs:469
msgid "GNOME Podcasts Subscriptions"
msgstr "GNOME Poddsändningar-prenumerationer"
#: podcasts-gtk/src/utils.rs:448
#: podcasts-gtk/src/utils.rs:470
msgid "Failed to export podcasts"
msgstr "Misslyckades med att exportera poddsändningar"
@@ -415,22 +360,65 @@ msgstr ""
"Skicka synpunkter på översättningen till\n"
"<tp-sv@listor.tp-sv.se>."
#: podcasts-gtk/src/widgets/episode.rs:149
#: podcasts-gtk/src/widgets/episode.rs:148
msgid "{} min"
msgstr "{} min"
#. sender.send(Action::ErrorNotification(format!("Player Error: {}", error)));
#: podcasts-gtk/src/widgets/player.rs:536
#: podcasts-gtk/src/widgets/player.rs:534
msgid "The media player was unable to execute an action."
msgstr "Mediaspelaren kunde inte utföra en åtgärd."
#: podcasts-gtk/src/widgets/show_menu.rs:169
#: podcasts-gtk/src/widgets/show_menu.rs:179
msgid "Marked all episodes as listened"
msgstr "Markerade alla avsnitt som lyssnade"
#: podcasts-gtk/src/widgets/show_menu.rs:174
#: podcasts-gtk/src/widgets/show_menu.rs:184
msgid "Unsubscribed from {}"
msgstr "Sade upp prenumeration från {}"
#~ msgid "@icon@"
#~ msgstr "@icon@"
#~ msgid "_Preferences"
#~ msgstr "I_nställningar"
#~ msgid "You are already subscribed to that feed!"
#~ msgstr "Du prenumererar redan på det flödet!"
#~ msgctxt "shortcut window"
#~ msgid "Preferences"
#~ msgstr "Inställningar"
#~ msgid "Preferences"
#~ msgstr "Inställningar"
#~ msgid "Appearance"
#~ msgstr "Utseende"
#~ msgid "Dark Theme"
#~ msgstr "Mörkt tema"
#~ msgid "Delete played episodes"
#~ msgstr "Ta bort spelade avsnitt"
#~ msgid "After"
#~ msgstr "Efter"
#~ msgid "Seconds"
#~ msgstr "Sekunder"
#~ msgid "Minutes"
#~ msgstr "Minuter"
#~ msgid "Hours"
#~ msgstr "Timmar"
#~ msgid "Days"
#~ msgstr "Dagar"
#~ msgid "Weeks"
#~ msgstr "Veckor"
#~ msgid "_About"
#~ msgstr "_Om"
+83 -91
View File
@@ -1,22 +1,24 @@
# Turkish translation for podcasts.
# Copyright (C) 2018 podcasts's COPYRIGHT HOLDER
# Copyright (C) 2018-2019 podcasts's COPYRIGHT HOLDER
# This file is distributed under the same license as the podcasts package.
#
# Emin Tufan Çetin <etcetin@gmail.com>, 2018-2019.
# Sabri Ünal <libreajans@gmail.com>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: podcasts master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/podcasts/issues\n"
"POT-Creation-Date: 2019-03-03 16:03+0000\n"
"PO-Revision-Date: 2019-03-06 13:46+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
"POT-Creation-Date: 2019-06-15 10:55+0000\n"
"PO-Revision-Date: 2019-09-04 15:16+0300\n"
"Last-Translator: Sabri Ünal <libreajans@gmail.com>\n"
"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Gtranslator 3.30.1\n"
"X-Generator: Poedit 2.0.6\n"
#: podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml:15
msgid "Top position of the last open main window"
@@ -69,7 +71,7 @@ msgstr "Kendiliğinden temizlemeler arasında beklenecek zaman aralığı"
#. Weird magic I copy-pasted that sets the Application Name in the Shell.
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:3
#: podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in:4
#: podcasts-gtk/src/app.rs:124 podcasts-gtk/src/app.rs:463
#: podcasts-gtk/src/app.rs:109 podcasts-gtk/src/app.rs:433
#: podcasts-gtk/src/widgets/aboutdialog.rs:56
msgid "Podcasts"
msgstr "Podcastler"
@@ -79,11 +81,6 @@ msgstr "Podcastler"
msgid "Listen to your favorite podcasts, right from your desktop."
msgstr "Gözde podcastlerinizi masaüstünüzden dinleyin."
#. Translators: Do NOT translate or transliterate this text (this is an icon file name)!
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:6
msgid "@icon@"
msgstr "@icon@"
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: podcasts-gtk/resources/org.gnome.Podcasts.desktop.in.in:13
msgid "Podcast;RSS;"
@@ -117,19 +114,23 @@ msgstr "Besleme URLʼsi ile yeni gösteriler ekle"
msgid "Import shows from another device"
msgstr "Gösterileri başka aygıttan içe aktar"
#: podcasts-gtk/resources/gtk/episode_widget.ui:180
#: podcasts-gtk/resources/gtk/episode_widget.ui:79
msgid "Youve already listened to this episode."
msgstr "Bu bölümü zaten dinlediniz."
#: podcasts-gtk/resources/gtk/episode_widget.ui:208
msgid "Calculating episode size…"
msgstr "Bölüm boyutu hesaplanıyor…"
#: podcasts-gtk/resources/gtk/episode_widget.ui:220
#: podcasts-gtk/resources/gtk/episode_widget.ui:248
msgid "Play this episode"
msgstr "Bu bölümü oynat"
#: podcasts-gtk/resources/gtk/episode_widget.ui:241
#: podcasts-gtk/resources/gtk/episode_widget.ui:269
msgid "Cancel the download process"
msgstr "İndirme sürecini iptal et"
#: podcasts-gtk/resources/gtk/episode_widget.ui:264
#: podcasts-gtk/resources/gtk/episode_widget.ui:292
msgid "Download this episode"
msgstr "Bu bölümü indir"
@@ -146,19 +147,15 @@ msgid "_Export Shows"
msgstr "_Gösterileri Dışa Aktar"
#: podcasts-gtk/resources/gtk/hamburger.ui:22
msgid "_Preferences"
msgstr "_Tercihler"
#: podcasts-gtk/resources/gtk/hamburger.ui:27
msgid "_Keyboard Shortcuts"
msgstr "_Klavye Kısayolları"
#: podcasts-gtk/resources/gtk/hamburger.ui:35
#: podcasts-gtk/resources/gtk/hamburger.ui:30
msgid "_About Podcasts"
msgstr "Podcastler _Hakkında"
#: podcasts-gtk/resources/gtk/headerbar.ui:35
#: podcasts-gtk/resources/gtk/headerbar.ui:189
#: podcasts-gtk/resources/gtk/headerbar.ui:177
msgid "Add a new feed"
msgstr "Yeni besleme ekle"
@@ -170,15 +167,11 @@ msgstr "Eklenecek besleme adresini gir"
msgid "Add"
msgstr "Ekle"
#: podcasts-gtk/resources/gtk/headerbar.ui:133
msgid "You are already subscribed to that feed!"
msgstr "Bu beslemeye zaten abonesiniz!"
#: podcasts-gtk/resources/gtk/headerbar.ui:169
#: podcasts-gtk/resources/gtk/headerbar.ui:157
msgid "Show Title"
msgstr "Gösteri Başlığı"
#: podcasts-gtk/resources/gtk/headerbar.ui:210
#: podcasts-gtk/resources/gtk/headerbar.ui:198
msgid "Back"
msgstr "Geri"
@@ -193,11 +186,6 @@ msgstr "Yeni bölümleri denetle"
#: podcasts-gtk/resources/gtk/help-overlay.ui:25
msgctxt "shortcut window"
msgid "Preferences"
msgstr "Tercihler"
#: podcasts-gtk/resources/gtk/help-overlay.ui:32
msgctxt "shortcut window"
msgid "Quit the application"
msgstr "Uygulamadan çık"
@@ -274,27 +262,6 @@ msgstr "1.25 hız oranı"
msgid "Normal speed"
msgstr "Olağan hız"
#: podcasts-gtk/resources/gtk/prefs.ui:42
#: podcasts-gtk/resources/gtk/prefs.ui:295
msgid "Preferences"
msgstr "Tercihler"
#: podcasts-gtk/resources/gtk/prefs.ui:76
msgid "Appearance"
msgstr "Görünüm"
#: podcasts-gtk/resources/gtk/prefs.ui:120
msgid "Dark Theme"
msgstr "Karanlık Gövde"
#: podcasts-gtk/resources/gtk/prefs.ui:166
msgid "Delete played episodes"
msgstr "Oynatılan bölümleri sil"
#: podcasts-gtk/resources/gtk/prefs.ui:211
msgid "After"
msgstr "Şundan Sonra"
#: podcasts-gtk/resources/gtk/secondary_menu.ui:7
msgid "_Mark All Episodes as Played"
msgstr "Tüm Bölümleri Oynatıldı Olarak _İmle"
@@ -319,38 +286,18 @@ msgstr "Tümünü Oynatıldı Olarak İmle"
msgid "Unsubscribe"
msgstr "Abonelikten Çık"
#: podcasts-gtk/src/app.rs:378
#: podcasts-gtk/src/app.rs:351
msgid "Fetching new episodes"
msgstr "Yeni bölümler alınıyor"
#: podcasts-gtk/src/headerbar.rs:117
#: podcasts-gtk/src/headerbar.rs:127
msgid "You are already subscribed to this show"
msgstr "Bu gösteriye zaten abonesiniz"
#: podcasts-gtk/src/headerbar.rs:125
#: podcasts-gtk/src/headerbar.rs:145
msgid "Invalid URL"
msgstr "Geçersiz URL"
#: podcasts-gtk/src/prefs.rs:78
msgid "Seconds"
msgstr "Saniye"
#: podcasts-gtk/src/prefs.rs:79
msgid "Minutes"
msgstr "Dakika"
#: podcasts-gtk/src/prefs.rs:80
msgid "Hours"
msgstr "Saat"
#: podcasts-gtk/src/prefs.rs:81
msgid "Days"
msgstr "Gün"
#: podcasts-gtk/src/prefs.rs:82
msgid "Weeks"
msgstr "Hafta"
#: podcasts-gtk/src/stacks/content.rs:54
msgid "New"
msgstr "Yeni"
@@ -359,43 +306,43 @@ msgstr "Yeni"
msgid "Shows"
msgstr "Gösteriler"
#: podcasts-gtk/src/utils.rs:387
#: podcasts-gtk/src/utils.rs:397
msgid "Select the file from which to you want to import shows."
msgstr "Gösterileri içe aktarmak istediğiniz dosyayı seçin."
#: podcasts-gtk/src/utils.rs:390
#: podcasts-gtk/src/utils.rs:400
msgid "_Import"
msgstr "_İçe Aktar"
#: podcasts-gtk/src/utils.rs:399 podcasts-gtk/src/utils.rs:447
#: podcasts-gtk/src/utils.rs:409 podcasts-gtk/src/utils.rs:457
msgid "OPML file"
msgstr "OPML dosyası"
#: podcasts-gtk/src/utils.rs:416
#: podcasts-gtk/src/utils.rs:426
msgid "Failed to parse the imported file"
msgstr "İçe aktarılan dosya ayrıştırılamadı"
#: podcasts-gtk/src/utils.rs:421 podcasts-gtk/src/utils.rs:465
#: podcasts-gtk/src/utils.rs:431 podcasts-gtk/src/utils.rs:475
msgid "Selected file could not be accessed."
msgstr "Seçilen dosyaya erişilemedi."
#: podcasts-gtk/src/utils.rs:435
#: podcasts-gtk/src/utils.rs:445
msgid "Export shows to…"
msgstr "Gösterileri dışa aktar…"
#: podcasts-gtk/src/utils.rs:438
#: podcasts-gtk/src/utils.rs:448
msgid "_Export"
msgstr "_Dışa Aktar"
#: podcasts-gtk/src/utils.rs:439
#: podcasts-gtk/src/utils.rs:449
msgid "_Cancel"
msgstr "_İptal"
#: podcasts-gtk/src/utils.rs:459
#: podcasts-gtk/src/utils.rs:469
msgid "GNOME Podcasts Subscriptions"
msgstr "GNOME Podcastler Abonelikleri"
#: podcasts-gtk/src/utils.rs:460
#: podcasts-gtk/src/utils.rs:470
msgid "Failed to export podcasts"
msgstr "Podcastler dışa aktarılamadı"
@@ -409,25 +356,70 @@ msgstr "GNOME Podcastler hakkında daha çoğunu öğrenin"
#: podcasts-gtk/src/widgets/aboutdialog.rs:63
msgid "translator-credits"
msgstr "Emin Tufan Çetin <etcetin@gmail.com>"
msgstr ""
"Emin Tufan Çetin <etcetin@gmail.com>\n"
"Sabri Ünal <libreajans@gmail.com>"
#: podcasts-gtk/src/widgets/episode.rs:145
#: podcasts-gtk/src/widgets/episode.rs:148
msgid "{} min"
msgstr "{} dak"
#. sender.send(Action::ErrorNotification(format!("Player Error: {}", error)));
#: podcasts-gtk/src/widgets/player.rs:536
#: podcasts-gtk/src/widgets/player.rs:534
msgid "The media player was unable to execute an action."
msgstr "Ortam oynatıcı eylemi yürütemiyor."
#: podcasts-gtk/src/widgets/show_menu.rs:175
#: podcasts-gtk/src/widgets/show_menu.rs:179
msgid "Marked all episodes as listened"
msgstr "Tüm bölümler dinlendi olarak imlendi"
#: podcasts-gtk/src/widgets/show_menu.rs:180
#: podcasts-gtk/src/widgets/show_menu.rs:184
msgid "Unsubscribed from {}"
msgstr "{} aboneliğinden çıkıldı"
#~ msgid "@icon@"
#~ msgstr "@icon@"
#~ msgid "_Preferences"
#~ msgstr "_Tercihler"
#~ msgid "You are already subscribed to that feed!"
#~ msgstr "Bu beslemeye zaten abonesiniz!"
#~ msgctxt "shortcut window"
#~ msgid "Preferences"
#~ msgstr "Tercihler"
#~ msgid "Preferences"
#~ msgstr "Tercihler"
#~ msgid "Appearance"
#~ msgstr "Görünüm"
#~ msgid "Dark Theme"
#~ msgstr "Karanlık Gövde"
#~ msgid "Delete played episodes"
#~ msgstr "Oynatılan bölümleri sil"
#~ msgid "After"
#~ msgstr "Şundan Sonra"
#~ msgid "Seconds"
#~ msgstr "Saniye"
#~ msgid "Minutes"
#~ msgstr "Dakika"
#~ msgid "Hours"
#~ msgstr "Saat"
#~ msgid "Days"
#~ msgstr "Gün"
#~ msgid "Weeks"
#~ msgstr "Hafta"
#~ msgid "_About"
#~ msgstr "_Hakkında"
+1 -1
View File
@@ -44,7 +44,7 @@ Tobias Bernard
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="info_container">
<property name="width_request">230</property>
<property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+1 -1
View File
@@ -70,7 +70,7 @@ Tobias Bernard
<object class="GtkEntry" id="new_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">30</property>
<property name="width_chars">26</property>
<property name="input_purpose">url</property>
</object>
<packing>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128px" height="128px" viewBox="0 0 128 128" version="1.1">
<defs>
<linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="8" y1="264" x2="120" y2="264" gradientTransform="matrix(1,0,0,1,0,-160.000006)">
<stop offset="0" style="stop-color:rgb(64.705884%,11.372549%,17.647059%);stop-opacity:1;"/>
<stop offset="0.0343218" style="stop-color:rgb(92.941177%,20%,23.137255%);stop-opacity:1;"/>
<stop offset="0.0706241" style="stop-color:rgb(75.294119%,10.980392%,15.686275%);stop-opacity:1;"/>
<stop offset="0.927675" style="stop-color:rgb(75.294119%,10.980392%,15.686275%);stop-opacity:1;"/>
<stop offset="0.964286" style="stop-color:rgb(92.941177%,20%,23.137255%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(75.294119%,10.980392%,15.686275%);stop-opacity:1;"/>
</linearGradient>
<clipPath id="clip1">
<path d="M 52 62 L 76 62 L 76 74 L 52 74 Z M 52 62 "/>
</clipPath>
<filter id="alpha" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feColorMatrix type="matrix" in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
</filter>
<mask id="mask0">
<g filter="url(#alpha)">
<rect x="0" y="0" width="128" height="128" style="fill:rgb(0%,0%,0%);fill-opacity:0.5;stroke:none;"/>
</g>
</mask>
<clipPath id="clip2">
<rect x="0" y="0" width="192" height="152"/>
</clipPath>
<g id="surface29618" clip-path="url(#clip2)">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(25.882354%,25.098041%,28.235295%);fill-opacity:1;" d="M 76 84 C 76 99.464844 63.464844 112 48 112 C 32.535156 112 20 99.464844 20 84 C 20 68.535156 32.535156 56 48 56 C 63.464844 56 76 68.535156 76 84 Z M 76 84 "/>
</g>
<linearGradient id="linear1" gradientUnits="userSpaceOnUse" x1="8" y1="264" x2="120" y2="264" gradientTransform="matrix(1,0,0,1,0,-160.000006)">
<stop offset="0" style="stop-color:rgb(64.705884%,11.372549%,17.647059%);stop-opacity:1;"/>
<stop offset="0.0343218" style="stop-color:rgb(92.941177%,20%,23.137255%);stop-opacity:1;"/>
<stop offset="0.0706241" style="stop-color:rgb(75.294119%,10.980392%,15.686275%);stop-opacity:1;"/>
<stop offset="0.927675" style="stop-color:rgb(75.294119%,10.980392%,15.686275%);stop-opacity:1;"/>
<stop offset="0.964286" style="stop-color:rgb(92.941177%,20%,23.137255%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(75.294119%,10.980392%,15.686275%);stop-opacity:1;"/>
</linearGradient>
<clipPath id="clip5">
<path d="M 52 62 L 76 62 L 76 74 L 52 74 Z M 52 62 "/>
</clipPath>
<mask id="mask2">
<g filter="url(#alpha)">
<rect x="0" y="0" width="128" height="128" style="fill:rgb(0%,0%,0%);fill-opacity:0.5;stroke:none;"/>
</g>
</mask>
<clipPath id="clip6">
<rect x="0" y="0" width="192" height="152"/>
</clipPath>
<g id="surface29618" clip-path="url(#clip6)">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(25.882354%,25.098041%,28.235295%);fill-opacity:1;" d="M 76 84 C 76 99.464844 63.464844 112 48 112 C 32.535156 112 20 99.464844 20 84 C 20 68.535156 32.535156 56 48 56 C 63.464844 56 76 68.535156 76 84 Z M 76 84 "/>
</g>
<clipPath id="clip4">
<rect x="0" y="0" width="128" height="128"/>
</clipPath>
<g id="surface29630" clip-path="url(#clip4)">
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear1);" d="M 16 92 L 112 92 C 116.417969 92 120 95.582031 120 100 L 120 108 C 120 112.417969 116.417969 116 112 116 L 16 116 C 11.582031 116 8 112.417969 8 108 L 8 100 C 8 95.582031 11.582031 92 16 92 Z M 16 92 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(92.941177%,20%,23.137255%);fill-opacity:1;" d="M 16 28 L 112 28 C 116.417969 28 120 31.957031 120 36.84375 L 120 103.15625 C 120 108.042969 116.417969 112 112 112 L 16 112 C 11.582031 112 8 108.042969 8 103.15625 L 8 36.84375 C 8 31.957031 11.582031 28 16 28 Z M 16 28 "/>
<path style="fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(36.862746%,36.078432%,39.215687%);stroke-opacity:1;stroke-miterlimit:4;" d="M 36 281.999994 L 92 281.999994 L 88 271.999994 L 40 271.999994 Z M 36 281.999994 " transform="matrix(1,0,0,1,0,-171.999994)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(25.882354%,25.098041%,28.235295%);fill-opacity:1;" d="M 32 110 L 96 110 L 96 116 L 32 116 Z M 32 110 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,96.078432%,95.686275%);fill-opacity:1;" d="M 24 36 L 104 36 L 112 44 L 112 96 L 16 96 L 16 44 Z M 24 36 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(25.882354%,25.098041%,28.235295%);fill-opacity:1;" d="M 16 52 L 112 52 L 112 84 L 16 84 Z M 16 52 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,96.078432%,95.686275%);fill-opacity:1;" d="M 46 68 C 46 71.3125 43.3125 74 40 74 C 36.6875 74 34 71.3125 34 68 C 34 64.6875 36.6875 62 40 62 C 43.3125 62 46 64.6875 46 68 Z M 46 68 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,96.078432%,95.686275%);fill-opacity:1;" d="M 94 68 C 94 71.3125 91.3125 74 88 74 C 84.6875 74 82 71.3125 82 68 C 82 64.6875 84.6875 62 88 62 C 91.3125 62 94 64.6875 94 68 Z M 94 68 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(58.039218%,57.647061%,56.470591%);fill-opacity:1;" d="M 52 62 L 76 62 L 76 74 L 52 74 Z M 52 62 "/>
<g clip-path="url(#clip5)" clip-rule="nonzero">
<use xlink:href="#surface29618" transform="matrix(1,0,0,1,-8,-16)" mask="url(#mask2)"/>
</g>
</g>
<clipPath id="clip3">
<rect x="0" y="0" width="128" height="128"/>
</clipPath>
<g id="surface29633" clip-path="url(#clip3)" filter="url(#alpha)">
<use xlink:href="#surface29630"/>
</g>
<mask id="mask1">
<use xlink:href="#surface29633"/>
</mask>
<mask id="mask3">
<g filter="url(#alpha)">
<rect x="0" y="0" width="128" height="128" style="fill:rgb(0%,0%,0%);fill-opacity:0.8;stroke:none;"/>
</g>
</mask>
<linearGradient id="linear2" gradientUnits="userSpaceOnUse" x1="300" y1="235" x2="428" y2="235" gradientTransform="matrix(0.000000000000000023,0.37,-0.98462,0.00000000000000006,295.38501,-30.360001)">
<stop offset="0" style="stop-color:rgb(97.647059%,94.117647%,41.960785%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(96.078432%,76.078433%,6.666667%);stop-opacity:1;"/>
</linearGradient>
<clipPath id="clip8">
<rect x="0" y="0" width="128" height="128"/>
</clipPath>
<g id="surface29627" clip-path="url(#clip8)">
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear2);" d="M 128 80.640625 L 128 128 L 0 128 L 0 80.640625 Z M 128 80.640625 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 13.308594 80.640625 L 60.664062 128 L 81.878906 128 L 34.519531 80.640625 Z M 55.730469 80.640625 L 103.09375 128 L 124.308594 128 L 76.945312 80.640625 Z M 98.160156 80.640625 L 128 110.480469 L 128 89.269531 L 119.371094 80.640625 Z M 0 88.546875 L 0 109.761719 L 18.238281 128 L 39.453125 128 Z M 0 88.546875 "/>
</g>
<clipPath id="clip7">
<rect x="0" y="0" width="128" height="128"/>
</clipPath>
<g id="surface29632" clip-path="url(#clip7)">
<use xlink:href="#surface29627" mask="url(#mask3)"/>
</g>
</defs>
<g id="surface29613">
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 16 92 L 112 92 C 116.417969 92 120 95.582031 120 100 L 120 108 C 120 112.417969 116.417969 116 112 116 L 16 116 C 11.582031 116 8 112.417969 8 108 L 8 100 C 8 95.582031 11.582031 92 16 92 Z M 16 92 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(92.941177%,20%,23.137255%);fill-opacity:1;" d="M 16 28 L 112 28 C 116.417969 28 120 31.957031 120 36.84375 L 120 103.15625 C 120 108.042969 116.417969 112 112 112 L 16 112 C 11.582031 112 8 108.042969 8 103.15625 L 8 36.84375 C 8 31.957031 11.582031 28 16 28 Z M 16 28 "/>
<path style="fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(36.862746%,36.078432%,39.215687%);stroke-opacity:1;stroke-miterlimit:4;" d="M 36 281.999994 L 92 281.999994 L 88 271.999994 L 40 271.999994 Z M 36 281.999994 " transform="matrix(1,0,0,1,0,-171.999994)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(25.882354%,25.098041%,28.235295%);fill-opacity:1;" d="M 32 110 L 96 110 L 96 116 L 32 116 Z M 32 110 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,96.078432%,95.686275%);fill-opacity:1;" d="M 24 36 L 104 36 L 112 44 L 112 96 L 16 96 L 16 44 Z M 24 36 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(25.882354%,25.098041%,28.235295%);fill-opacity:1;" d="M 16 52 L 112 52 L 112 84 L 16 84 Z M 16 52 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,96.078432%,95.686275%);fill-opacity:1;" d="M 46 68 C 46 71.3125 43.3125 74 40 74 C 36.6875 74 34 71.3125 34 68 C 34 64.6875 36.6875 62 40 62 C 43.3125 62 46 64.6875 46 68 Z M 46 68 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,96.078432%,95.686275%);fill-opacity:1;" d="M 94 68 C 94 71.3125 91.3125 74 88 74 C 84.6875 74 82 71.3125 82 68 C 82 64.6875 84.6875 62 88 62 C 91.3125 62 94 64.6875 94 68 Z M 94 68 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(58.039218%,57.647061%,56.470591%);fill-opacity:1;" d="M 52 62 L 76 62 L 76 74 L 52 74 Z M 52 62 "/>
<g clip-path="url(#clip1)" clip-rule="nonzero">
<use xlink:href="#surface29618" transform="matrix(1,0,0,1,-8,-16)" mask="url(#mask0)"/>
</g>
<use xlink:href="#surface29632" mask="url(#mask1)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.3 KiB

+6 -2
View File
@@ -3,7 +3,11 @@ scalable_dir = join_paths('hicolor', 'scalable', 'apps')
install_data(
join_paths(scalable_dir, 'org.gnome.Podcasts.svg'),
install_dir: join_paths(datadir, 'icons', scalable_dir),
rename: '@0@.svg'.format(application_id)
)
install_data(
join_paths(scalable_dir, 'org.gnome.Podcasts.Devel.svg'),
install_dir: join_paths(datadir, 'icons', scalable_dir),
)
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
@@ -12,4 +16,4 @@ install_data(
join_paths(symbolic_dir, 'org.gnome.Podcasts-symbolic.svg'),
install_dir: join_paths(datadir, 'icons', symbolic_dir),
rename: '@0@-symbolic.svg'.format(application_id)
)
)
@@ -24,6 +24,13 @@
</screenshot>
</screenshots>
<releases>
<release version="0.4.7" date="2019-10-23">
<description>
<p>
Small release including OPML export functionality, partial support for premium feeds, a couple of bugfixes and overall life improvements.
</p>
</description>
</release>
<release version="0.4.6" date="2018-10-07">
<description>
<p>
+229 -332
View File
@@ -20,46 +20,110 @@
#![allow(new_without_default)]
use gio::{self, prelude::*, ActionMapExt, SettingsExt};
use glib::{self, Variant};
use glib::subclass;
use glib::subclass::prelude::*;
use glib::translate::*;
use glib::{glib_object_impl, glib_object_subclass, glib_object_wrapper, glib_wrapper};
use gio::subclass::application::ApplicationImplExt;
use gio::{self, prelude::*, ActionMapExt, ApplicationFlags, SettingsExt};
use gtk;
use gtk::prelude::*;
use gettextrs::{bindtextdomain, setlocale, textdomain, LocaleCategory};
use crossbeam_channel::{unbounded, Receiver, Sender};
use crossbeam_channel::Receiver;
use fragile::Fragile;
use podcasts_data::Show;
use crate::headerbar::Header;
use crate::settings::{self, WindowGeometry};
use crate::stacks::{Content, PopulatedState};
use crate::settings;
use crate::stacks::PopulatedState;
use crate::utils;
use crate::widgets::about_dialog;
use crate::widgets::appnotif::{InAppNotification, SpinnerState, State};
use crate::widgets::player;
use crate::widgets::show_menu::{mark_all_notif, remove_show_notif, ShowMenu};
use crate::window::MainWindow;
use std::cell::RefCell;
use std::env;
use std::rc::Rc;
use std::sync::Arc;
use crate::config::{APP_ID, LOCALEDIR};
use crate::i18n::i18n;
/// Creates an action named `name` in the action map `T with the handler `F`
fn action<T, F>(thing: &T, name: &str, action: F)
where
T: ActionMapExt,
for<'r, 's> F: Fn(&'r gio::SimpleAction, &'s Option<Variant>) + 'static,
{
// Create a stateless, parameterless action
let act = gio::SimpleAction::new(name, None);
// Connect the handler
act.connect_activate(action);
// Add it to the map
thing.add_action(&act);
pub struct PdApplicationPrivate {
window: RefCell<Option<MainWindow>>,
settings: RefCell<Option<gio::Settings>>,
}
impl ObjectSubclass for PdApplicationPrivate {
const NAME: &'static str = "PdApplication";
type ParentType = gtk::Application;
type Instance = subclass::simple::InstanceStruct<Self>;
type Class = subclass::simple::ClassStruct<Self>;
glib_object_subclass!();
fn new() -> Self {
Self {
window: RefCell::new(None),
settings: RefCell::new(None),
}
}
}
impl ObjectImpl for PdApplicationPrivate {
glib_object_impl!();
}
impl gio::subclass::prelude::ApplicationImpl for PdApplicationPrivate {
fn activate(&self, app: &gio::Application) {
debug!("GtkApplication<PdApplication>::activate");
if let Some(ref window) = *self.window.borrow() {
// Ideally Gtk4/GtkBuilder make this irrelvent
window.show_all();
window.present();
info!("Window presented");
return;
}
let app = app.clone().downcast::<PdApplication>().expect("How?");
let window = MainWindow::new(&app);
window.setup_gactions();
window.show_all();
window.present();
self.window.replace(Some(window));
// Setup the Action channel
gtk::timeout_add(25, clone!(app => move || app.setup_action_channel()));
}
fn startup(&self, app: &gio::Application) {
debug!("GtkApplication<PdApplication>::startup");
self.parent_startup(app);
let settings = gio::Settings::new("org.gnome.Podcasts");
let cleanup_date = settings::get_cleanup_date(&settings);
// Garbage collect watched episodes from the disk
utils::cleanup(cleanup_date);
self.settings.replace(Some(settings));
let app = app.clone().downcast::<PdApplication>().expect("How?");
app.setup_timed_callbacks();
}
}
impl gtk::subclass::application::GtkApplicationImpl for PdApplicationPrivate {}
glib_wrapper! {
pub struct PdApplication(Object<subclass::simple::InstanceStruct<PdApplicationPrivate>, subclass::simple::ClassStruct<PdApplicationPrivate>, PdApplicationClass>) @extends gio::Application, gtk::Application;
match fn {
get_type => || PdApplicationPrivate::get_type().to_glib(),
}
}
#[derive(Debug, Clone)]
@@ -85,312 +149,168 @@ pub(crate) enum Action {
RaiseWindow,
}
#[derive(Debug, Clone)]
pub(crate) struct App {
instance: gtk::Application,
window: gtk::ApplicationWindow,
overlay: gtk::Overlay,
settings: gio::Settings,
content: Rc<Content>,
headerbar: Rc<Header>,
player: player::PlayerWrapper,
updater: RefCell<Option<InAppNotification>>,
sender: Sender<Action>,
receiver: Receiver<Action>,
}
impl PdApplication {
pub(crate) fn new() -> Self {
let application = glib::Object::new(
PdApplication::static_type(),
&[
("application-id", &Some(APP_ID)),
("flags", &ApplicationFlags::empty()),
],
)
.expect("Application initialization failed...")
.downcast::<PdApplication>()
.expect("Congrats, you have won a prize for triggering an impossible outcome");
impl App {
pub(crate) fn new(application: &gtk::Application) -> Rc<Self> {
let settings = gio::Settings::new("org.gnome.Podcasts");
application.set_resource_base_path(Some("/org/gnome/Podcasts"));
let (sender, receiver) = unbounded();
let window = gtk::ApplicationWindow::new(application);
window.set_title(&i18n("Podcasts"));
if APP_ID.ends_with("Devel") {
window.get_style_context().add_class("devel");
}
let weak_s = settings.downgrade();
let weak_app = application.downgrade();
window.connect_delete_event(move |window, _| {
let app = match weak_app.upgrade() {
Some(a) => a,
None => return Inhibit(false),
};
let settings = match weak_s.upgrade() {
Some(s) => s,
None => return Inhibit(false),
};
info!("Saving window position");
WindowGeometry::from_window(&window).write(&settings);
info!("Application is exiting");
app.quit();
Inhibit(false)
});
// Create a content instance
let content = Content::new(&sender).expect("Content initialization failed.");
// Create the headerbar
let header = Header::new(&content, &sender);
// Add the Headerbar to the window.
window.set_titlebar(&header.container);
// Add the content main stack to the overlay.
let overlay = gtk::Overlay::new();
overlay.add(&content.get_stack());
let wrap = gtk::Box::new(gtk::Orientation::Vertical, 0);
// Add the overlay to the main Box
wrap.add(&overlay);
let player = player::PlayerWrapper::new(&sender);
// Add the player to the main Box
wrap.add(&player.action_bar);
let updater = RefCell::new(None);
window.add(&wrap);
let app = App {
instance: application.clone(),
window,
settings,
overlay,
headerbar: header,
content,
player,
updater,
sender,
receiver,
};
Rc::new(app)
}
fn init(app: &Rc<Self>) {
let cleanup_date = settings::get_cleanup_date(&app.settings);
// Garbage collect watched episodes from the disk
utils::cleanup(cleanup_date);
app.setup_gactions();
app.setup_timed_callbacks();
// Retrieve the previous window position and size.
WindowGeometry::from_settings(&app.settings).apply(&app.window);
// Setup the Action channel
gtk::timeout_add(25, clone!(app => move || app.setup_action_channel()));
application
}
fn setup_timed_callbacks(&self) {
self.setup_dark_theme();
self.setup_refresh_on_startup();
self.setup_auto_refresh();
}
fn setup_dark_theme(&self) {
let gtk_settings = gtk::Settings::get_default().unwrap();
self.settings.bind(
"dark-theme",
&gtk_settings,
"gtk-application-prefer-dark-theme",
gio::SettingsBindFlags::DEFAULT,
);
}
fn setup_refresh_on_startup(&self) {
// Update the feeds right after the Application is initialized.
let sender = self.sender.clone();
if self.settings.get_boolean("refresh-on-startup") {
info!("Refresh on startup.");
let s: Option<Vec<_>> = None;
utils::refresh(s, sender.clone());
let data = PdApplicationPrivate::from_instance(self);
if let Some(ref settings) = *data.settings.borrow() {
let gtk_settings = gtk::Settings::get_default().unwrap();
settings.bind(
"dark-theme",
&gtk_settings,
"gtk-application-prefer-dark-theme",
gio::SettingsBindFlags::DEFAULT,
);
} else {
debug_assert!(false, "Well how'd you manage that?");
}
}
fn setup_auto_refresh(&self) {
let refresh_interval = settings::get_refresh_interval(&self.settings).num_seconds() as u32;
info!("Auto-refresh every {:?} seconds.", refresh_interval);
let sender = self.sender.clone();
gtk::timeout_add_seconds(refresh_interval, move || {
let s: Option<Vec<_>> = None;
utils::refresh(s, sender.clone());
glib::Continue(true)
});
}
/// Define the `GAction`s.
///
/// Used in menus and the keyboard shortcuts dialog.
#[cfg_attr(rustfmt, rustfmt_skip)]
fn setup_gactions(&self) {
let sender = &self.sender;
let weak_win = self.window.downgrade();
// Create the `refresh` action.
//
// This will trigger a refresh of all the shows in the database.
action(&self.window, "refresh", clone!(sender => move |_, _| {
gtk::idle_add(clone!(sender => move || {
let s: Option<Vec<_>> = None;
utils::refresh(s, sender.clone());
glib::Continue(false)
}));
}));
self.instance.set_accels_for_action("win.refresh", &["<primary>r"]);
// Create the `OPML` import action
action(&self.window, "import", clone!(sender, weak_win => move |_, _| {
weak_win.upgrade().map(|win| utils::on_import_clicked(&win, &sender));
}));
action(&self.window, "export", clone!(sender, weak_win => move |_, _| {
weak_win.upgrade().map(|win| utils::on_export_clicked(&win, &sender));
}));
// Create the action that shows a `gtk::AboutDialog`
action(&self.window, "about", clone!(weak_win => move |_, _| {
weak_win.upgrade().map(|win| about_dialog(&win));
}));
// Create the quit action
let weak_instance = self.instance.downgrade();
action(&self.window, "quit", move |_, _| {
weak_instance.upgrade().map(|app| app.quit());
});
self.instance.set_accels_for_action("win.quit", &["<primary>q"]);
// Create the menu action
let header = Rc::downgrade(&self.headerbar);
action(&self.window, "menu", move |_, _| {
header.upgrade().map(|h| h.open_menu());
});
// Bind the hamburger menu button to `F10`
self.instance.set_accels_for_action("win.menu", &["F10"]);
}
fn setup_action_channel(&self) -> glib::Continue {
use crossbeam_channel::TryRecvError;
let data = PdApplicationPrivate::from_instance(self);
let action = match self.receiver.try_recv() {
Ok(a) => a,
Err(TryRecvError::Empty) => return glib::Continue(true),
Err(TryRecvError::Disconnected) => {
unreachable!("How the hell was the action channel dropped.")
}
};
if let Some(ref window) = *data.window.borrow() {
let action = match window.receiver.try_recv() {
Ok(a) => a,
Err(TryRecvError::Empty) => return glib::Continue(true),
Err(TryRecvError::Disconnected) => {
unreachable!("How the hell was the action channel dropped.")
}
};
trace!("Incoming channel action: {:?}", action);
match action {
Action::RefreshAllViews => self.content.update(),
Action::RefreshShowsView => self.content.update_shows_view(),
Action::RefreshWidgetIfSame(id) => self.content.update_widget_if_same(id),
Action::RefreshEpisodesView => self.content.update_home(),
Action::RefreshEpisodesViewBGR => self.content.update_home_if_background(),
Action::ReplaceWidget(pd) => {
let shows = self.content.get_shows();
let pop = shows.borrow().populated();
pop.borrow_mut()
.replace_widget(pd.clone())
.map_err(|err| error!("Failed to update ShowWidget: {}", err))
.map_err(|_| error!("Failed to update ShowWidget {}", pd.title()))
.ok();
}
Action::ShowWidgetAnimated => {
let shows = self.content.get_shows();
let pop = shows.borrow().populated();
pop.borrow_mut()
.switch_visible(PopulatedState::Widget, gtk::StackTransitionType::SlideLeft);
}
Action::ShowShowsAnimated => {
let shows = self.content.get_shows();
let pop = shows.borrow().populated();
pop.borrow_mut()
.switch_visible(PopulatedState::View, gtk::StackTransitionType::SlideRight);
}
Action::HeaderBarShowTile(title) => self.headerbar.switch_to_back(&title),
Action::HeaderBarNormal => self.headerbar.switch_to_normal(),
Action::MarkAllPlayerNotification(pd) => {
let notif = mark_all_notif(pd, &self.sender);
notif.show(&self.overlay);
}
Action::RemoveShow(pd) => {
let notif = remove_show_notif(pd, self.sender.clone());
notif.show(&self.overlay);
}
Action::ErrorNotification(err) => {
error!("An error notification was triggered: {}", err);
let callback = |revealer: gtk::Revealer| {
revealer.set_reveal_child(false);
glib::Continue(false)
};
let undo_cb: Option<fn()> = None;
let notif = InAppNotification::new(&err, 6000, callback, undo_cb);
notif.show(&self.overlay);
}
Action::ShowUpdateNotif(receiver) => {
let sender = self.sender.clone();
let callback = move |revealer: gtk::Revealer| match receiver.try_recv() {
Err(TryRecvError::Empty) => glib::Continue(true),
Err(TryRecvError::Disconnected) => glib::Continue(false),
Ok(_) => {
trace!("Incoming channel action: {:?}", action);
match action {
Action::RefreshAllViews => window.content.update(),
Action::RefreshShowsView => window.content.update_shows_view(),
Action::RefreshWidgetIfSame(id) => window.content.update_widget_if_same(id),
Action::RefreshEpisodesView => window.content.update_home(),
Action::RefreshEpisodesViewBGR => window.content.update_home_if_background(),
Action::ReplaceWidget(pd) => {
let shows = window.content.get_shows();
let pop = shows.borrow().populated();
pop.borrow_mut()
.replace_widget(pd.clone())
.map_err(|err| error!("Failed to update ShowWidget: {}", err))
.map_err(|_| error!("Failed to update ShowWidget {}", pd.title()))
.ok();
}
Action::ShowWidgetAnimated => {
let shows = window.content.get_shows();
let pop = shows.borrow().populated();
pop.borrow_mut().switch_visible(
PopulatedState::Widget,
gtk::StackTransitionType::SlideLeft,
);
}
Action::ShowShowsAnimated => {
let shows = window.content.get_shows();
let pop = shows.borrow().populated();
pop.borrow_mut()
.switch_visible(PopulatedState::View, gtk::StackTransitionType::SlideRight);
}
Action::HeaderBarShowTile(title) => window.headerbar.switch_to_back(&title),
Action::HeaderBarNormal => window.headerbar.switch_to_normal(),
Action::MarkAllPlayerNotification(pd) => {
let notif = mark_all_notif(pd, &window.sender);
notif.show(&window.overlay);
}
Action::RemoveShow(pd) => {
let notif = remove_show_notif(pd, window.sender.clone());
notif.show(&window.overlay);
}
Action::ErrorNotification(err) => {
error!("An error notification was triggered: {}", err);
let callback = |revealer: gtk::Revealer| {
revealer.set_reveal_child(false);
sender
.send(Action::RefreshAllViews)
.expect("Action channel blew up somehow");
glib::Continue(false)
}
};
let txt = i18n("Fetching new episodes");
let undo_cb: Option<fn()> = None;
let updater = InAppNotification::new(&txt, 250, callback, undo_cb);
updater.set_close_state(State::Hidden);
updater.set_spinner_state(SpinnerState::Active);
};
let undo_cb: Option<fn()> = None;
let notif = InAppNotification::new(&err, 6000, callback, undo_cb);
notif.show(&window.overlay);
}
Action::ShowUpdateNotif(receiver) => {
let sender = window.sender.clone();
let callback = move |revealer: gtk::Revealer| match receiver.try_recv() {
Err(TryRecvError::Empty) => glib::Continue(true),
Err(TryRecvError::Disconnected) => glib::Continue(false),
Ok(_) => {
revealer.set_reveal_child(false);
sender
.send(Action::RefreshAllViews)
.expect("Action channel blew up somehow");
glib::Continue(false)
}
};
let txt = i18n("Fetching new episodes");
let undo_cb: Option<fn()> = None;
let updater = InAppNotification::new(&txt, 250, callback, undo_cb);
updater.set_close_state(State::Hidden);
updater.set_spinner_state(SpinnerState::Active);
let old = self.updater.replace(Some(updater));
old.map(|i| i.destroy());
self.updater
.borrow()
.as_ref()
.map(|i| i.show(&self.overlay));
}
Action::InitEpisode(rowid) => {
let res = self.player.initialize_episode(rowid);
debug_assert!(res.is_ok());
}
Action::InitShowMenu(s) => {
let menu = &s.get().container;
self.headerbar.set_secondary_menu(menu);
}
Action::EmptyState => {
self.window
.lookup_action("refresh")
.and_then(|action| action.downcast::<gio::SimpleAction>().ok())
// Disable refresh action
.map(|action| action.set_enabled(false));
let old = window.updater.replace(Some(updater));
old.map(|i| i.destroy());
window
.updater
.borrow()
.as_ref()
.map(|i| i.show(&window.overlay));
}
Action::InitEpisode(rowid) => {
let res = window.player.initialize_episode(rowid);
debug_assert!(res.is_ok());
}
Action::InitShowMenu(s) => {
let menu = &s.get().container;
window.headerbar.set_secondary_menu(menu);
}
Action::EmptyState => {
window
.window
.lookup_action("refresh")
.and_then(|action| action.downcast::<gio::SimpleAction>().ok())
// Disable refresh action
.map(|action| action.set_enabled(false));
self.headerbar.switch.set_sensitive(false);
self.content.switch_to_empty_views();
}
Action::PopulatedState => {
self.window
.lookup_action("refresh")
.and_then(|action| action.downcast::<gio::SimpleAction>().ok())
// Enable refresh action
.map(|action| action.set_enabled(true));
window.headerbar.switch.set_sensitive(false);
window.content.switch_to_empty_views();
}
Action::PopulatedState => {
window
.window
.lookup_action("refresh")
.and_then(|action| action.downcast::<gio::SimpleAction>().ok())
// Enable refresh action
.map(|action| action.set_enabled(true));
self.headerbar.switch.set_sensitive(true);
self.content.switch_to_populated();
}
Action::RaiseWindow => self.window.present(),
};
window.headerbar.switch.set_sensitive(true);
window.content.switch_to_populated();
}
Action::RaiseWindow => window.window.present(),
};
} else {
debug_assert!(false, "Huh that's odd then");
}
glib::Continue(true)
}
@@ -401,33 +321,10 @@ impl App {
bindtextdomain("gnome-podcasts", LOCALEDIR);
textdomain("gnome-podcasts");
let application = gtk::Application::new(APP_ID, gio::ApplicationFlags::empty())
.expect("Application initialization failed...");
application.set_resource_base_path("/org/gnome/Podcasts");
// Make sure the app icon shows up in PulseAudio settings
env::set_var("PULSE_PROP_application.icon_name", APP_ID);
let weak_app = application.downgrade();
application.connect_startup(move |_| {
info!("GApplication::startup");
weak_app.upgrade().map(|application| {
let app = Self::new(&application);
Self::init(&app);
let weak = Rc::downgrade(&app);
application.connect_activate(move |_| {
info!("GApplication::activate");
if let Some(app) = weak.upgrade() {
// Ideally Gtk4/GtkBuilder make this irrelvent
app.window.show_all();
app.window.present();
info!("Window presented");
} else {
debug_assert!(false, "I hate computers");
}
});
info!("Init complete");
});
});
let application = Self::new();
// Weird magic I copy-pasted that sets the Application Name in the Shell.
glib::set_application_name(&i18n("Podcasts"));
+42 -37
View File
@@ -104,58 +104,63 @@ impl AddPopover {
};
debug!("Url: {}", url);
// TODO: refactor to avoid duplication
match Url::parse(&url) {
Ok(u) => {
if !dbqueries::source_exists(u.as_str())? {
self.entry
.get_style_context()
.remove_class(&gtk::STYLE_CLASS_ERROR);
self.entry
.set_icon_from_icon_name(gtk::EntryIconPosition::Secondary, None);
self.add.set_sensitive(true);
self.style_neutral(true);
} else {
self.entry
.get_style_context()
.add_class(&gtk::STYLE_CLASS_ERROR);
self.entry.set_icon_from_icon_name(
gtk::EntryIconPosition::Secondary,
"dialog-error-symbolic",
);
self.entry.set_icon_tooltip_text(
gtk::EntryIconPosition::Secondary,
i18n("You are already subscribed to this show").as_str(),
);
self.add.set_sensitive(false);
self.style_error("You are already subscribed to this show");
}
Ok(())
}
Err(err) => {
self.add.set_sensitive(false);
if !is_input_url_empty {
self.entry
.get_style_context()
.add_class(&gtk::STYLE_CLASS_ERROR);
self.entry.set_icon_from_icon_name(
gtk::EntryIconPosition::Secondary,
"dialog-error-symbolic",
);
self.entry.set_icon_tooltip_text(
gtk::EntryIconPosition::Secondary,
i18n("Invalid URL").as_str(),
);
self.style_error("Invalid URL");
error!("Error: {}", err);
} else {
self.entry
.get_style_context()
.remove_class(&gtk::STYLE_CLASS_ERROR);
self.entry
.set_icon_from_icon_name(gtk::EntryIconPosition::Secondary, None);
self.style_neutral(false);
}
Ok(())
}
}
}
fn style_error(&self, icon_tooltip: &str) {
self.style(
true,
false,
Some("dialog-error-symbolic"),
Some(icon_tooltip),
);
}
fn style_neutral(&self, sensitive: bool) {
self.style(false, sensitive, None, None);
}
fn style(
&self,
error: bool,
sensitive: bool,
icon_name: Option<&str>,
icon_tooltip: Option<&str>,
) {
let entry = &self.entry;
let icon_position = gtk::EntryIconPosition::Secondary;
entry.set_icon_from_icon_name(icon_position, icon_name);
if let Some(icon_tooltip_text) = icon_tooltip {
entry.set_icon_tooltip_text(icon_position, Some(i18n(icon_tooltip_text).as_str()));
}
self.add.set_sensitive(sensitive);
let error_style_class = &gtk::STYLE_CLASS_ERROR;
let style_context = entry.get_style_context();
if error {
style_context.add_class(error_style_class);
} else {
style_context.remove_class(error_style_class);
}
}
}
impl Default for Header {
@@ -210,7 +215,7 @@ impl Header {
pub(crate) fn init(s: &Rc<Self>, content: &Content, sender: &Sender<Action>) {
let weak = Rc::downgrade(s);
s.switch.set_stack(&content.get_stack());
s.switch.set_stack(Some(&content.get_stack()));
s.add.entry.connect_changed(clone!(weak => move |_| {
weak.upgrade().map(|h| {
+5 -5
View File
@@ -41,7 +41,6 @@
elided_lifetime_in_paths,
missing_copy_implementations
)]
// #![deny(warnings)]
#[macro_use]
extern crate failure;
@@ -60,7 +59,7 @@ use log::Level;
use gtk::prelude::*;
// http://gtk-rs.org/tuto/closures
// https://gtk-rs.org/docs-src/tutorial/closures
#[macro_export]
macro_rules! clone {
(@param _) => ( _ );
@@ -85,6 +84,7 @@ mod widgets;
mod app;
mod config;
mod headerbar;
mod window;
mod manager;
mod settings;
@@ -93,7 +93,7 @@ mod utils;
mod i18n;
use crate::app::App;
use crate::app::PdApplication;
#[cfg(test)]
fn init_gtk_tests() -> Result<(), failure::Error> {
@@ -111,7 +111,7 @@ fn init_gtk_tests() -> Result<(), failure::Error> {
}
fn main() {
// TODO: make the the logger a cli -vv option
// TODO: make the logger a cli -vv option
loggerv::init_with_level(Level::Info).expect("Error initializing loggerv.");
gtk::init().expect("Error initializing gtk.");
gst::init().expect("Error initializing gstreamer");
@@ -126,7 +126,7 @@ fn main() {
600,
);
App::run();
PdApplication::run();
}
#[test]
+2 -2
View File
@@ -100,11 +100,11 @@ impl ShowStack {
if is_episodes_populated(&ign)? {
self.sender
.send(Action::PopulatedState)
.expect("Action channel blew up somehow");;
.expect("Action channel blew up somehow");
} else {
self.sender
.send(Action::EmptyState)
.expect("Action channel blew up somehow");;
.expect("Action channel blew up somehow");
};
Ok(())
+8 -9
View File
@@ -19,7 +19,6 @@
#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
use gdk::FrameClockExt;
use gdk_pixbuf::{Object, Pixbuf};
use glib::{self, object::WeakRef};
use gtk;
@@ -155,10 +154,10 @@ pub(crate) fn smooth_scroll_to(view: &gtk::ScrolledWindow, target: &gtk::Adjustm
let mut t = (now - start_time) as f64 / (end_time - start_time) as f64;
t = ease_out_cubic(t);
adj.set_value(start + t * (end - start));
true
Continue(true)
} else {
adj.set_value(end);
false
Continue(false)
}
});
}
@@ -252,7 +251,7 @@ where
up_sender
.send(true)
.expect("Channel was dropped unexpectedly");;
.expect("Channel was dropped unexpectedly");
});
}
@@ -285,7 +284,7 @@ pub(crate) fn set_image_from_path(
.and_then(|fragile| {
fragile
.try_get()
.map(|px| image.set_from_pixbuf(px))
.map(|px| image.set_from_pixbuf(Some(px)))
.map_err(From::from)
})?;
@@ -343,13 +342,13 @@ pub(crate) fn set_image_from_path(
if let Ok(mut hashmap) = CACHED_PIXBUFS.write() {
hashmap
.insert((show_id, size), Mutex::new(Fragile::new(px.clone())));
image.set_from_pixbuf(&px);
image.set_from_pixbuf(Some(&px));
}
}
}
Err(DownloadError::NoImageLocation) => {
image.set_from_icon_name(
"image-x-generic-symbolic",
Some("image-x-generic-symbolic"),
gtk::IconSize::__Unknown(s),
);
}
@@ -431,7 +430,7 @@ pub(crate) fn on_import_clicked(window: &gtk::ApplicationWindow, sender: &Sender
let text = i18n("Selected file could not be accessed.");
sender
.send(Action::ErrorNotification(text))
.expect("Action channel blew up somehow");;
.expect("Action channel blew up somehow");
}
}
}
@@ -475,7 +474,7 @@ pub(crate) fn on_export_clicked(window: &gtk::ApplicationWindow, sender: &Sender
let text = i18n("Selected file could not be accessed.");
sender
.send(Action::ErrorNotification(text))
.expect("Action channel blew up somehow");;
.expect("Action channel blew up somehow");
}
}
}
+8 -8
View File
@@ -47,20 +47,20 @@ pub(crate) fn about_dialog(window: &gtk::ApplicationWindow) {
];
let dialog = gtk::AboutDialog::new();
dialog.set_logo_icon_name(APP_ID);
dialog.set_comments(i18n("Podcast Client for the GNOME Desktop.").as_str());
dialog.set_copyright("© 2017, 2018 Jordan Petridis");
dialog.set_logo_icon_name(Some(APP_ID));
dialog.set_comments(Some(i18n("Podcast Client for the GNOME Desktop.").as_str()));
dialog.set_copyright(Some("© 2017, 2018 Jordan Petridis"));
dialog.set_license_type(gtk::License::Gpl30);
dialog.set_modal(true);
dialog.set_version(VERSION);
dialog.set_version(Some(VERSION));
dialog.set_program_name(&i18n("Podcasts"));
dialog.set_website("https://wiki.gnome.org/Apps/Podcasts");
dialog.set_website_label(i18n("Learn more about GNOME Podcasts").as_str());
dialog.set_transient_for(window);
dialog.set_website(Some("https://wiki.gnome.org/Apps/Podcasts"));
dialog.set_website_label(Some(i18n("Learn more about GNOME Podcasts").as_str()));
dialog.set_transient_for(Some(window));
dialog.set_artists(&["Tobias Bernard", "Sam Hewitt"]);
dialog.set_authors(authors);
dialog.set_translator_credits(i18n("translator-credits").as_str());
dialog.set_translator_credits(Some(i18n("translator-credits").as_str()));
dialog.connect_response(|dlg, _| dlg.destroy());
+1 -1
View File
@@ -37,7 +37,7 @@ impl Default for EmptyView {
let view: gtk::Box = builder.get_object("empty_view").unwrap();
let image: gtk::Image = builder.get_object("image").unwrap();
image.set_from_icon_name(
format!("{}-symbolic", APP_ID).as_str(),
Some(format!("{}-symbolic", APP_ID).as_str()),
gtk::IconSize::__Unknown(256),
);
EmptyView(view)
+11 -10
View File
@@ -34,6 +34,7 @@ use podcasts_data::{dbqueries, USER_AGENT};
use podcasts_data::{EpisodeWidgetModel, ShowCoverModel};
use crate::app::Action;
use crate::config::APP_ID;
use crate::utils::set_image_from_path;
use std::cell::RefCell;
@@ -94,12 +95,12 @@ impl PlayerInfo {
fn set_episode_title(&self, episode: &EpisodeWidgetModel) {
self.episode.set_text(episode.title());
self.episode.set_tooltip_text(episode.title());
self.episode.set_tooltip_text(Some(episode.title()));
}
fn set_show_title(&self, show: &ShowCoverModel) {
self.show.set_text(show.title());
self.show.set_tooltip_text(show.title());
self.show.set_tooltip_text(Some(show.title()));
}
fn set_cover_image(&self, show: &ShowCoverModel) {
@@ -213,9 +214,9 @@ impl Default for PlayerWidget {
);
let mpris = MprisPlayer::new(
"Podcasts".to_string(),
APP_ID.to_string(),
"GNOME Podcasts".to_string(),
"org.gnome.Podcasts.desktop".to_string(),
format!("{}.desktop", APP_ID).to_string(),
);
mpris.set_can_raise(true);
mpris.set_can_play(false);
@@ -323,12 +324,12 @@ impl PlayerWidget {
// path is an absolute fs path ex. "foo/bar/baz".
// Convert it so it will have a "file:///"
// FIXME: convert it properly
if let Some(uri) = File::new_for_path(path).get_uri() {
// play the file
self.player.set_uri(&uri);
self.play();
return Ok(());
}
let uri = File::new_for_path(path).get_uri();
// play the file
self.player.set_uri(uri.as_str());
self.rate.radio_normal.set_active(true);
self.play();
return Ok(());
}
// TODO: log an error
}
+2 -4
View File
@@ -99,8 +99,6 @@ fn populate_flowbox(shows: &Rc<ShowsView>, vadj: Option<Adjustment>) -> Result<(
}
fn on_child_activate(child: &gtk::FlowBoxChild, sender: &Sender<Action>) -> Result<(), Error> {
use gtk::WidgetExt;
// This is such an ugly hack...
let id = WidgetExt::get_name(child)
.ok_or_else(|| format_err!("Failed to get \"episodes\" child from the stack."))?
@@ -128,7 +126,7 @@ struct ShowsChild {
impl Default for ShowsChild {
fn default() -> Self {
let cover = gtk::Image::new_from_icon_name(
"image-x-generic-symbolic",
Some("image-x-generic-symbolic"),
gtk::IconSize::__Unknown(-1),
);
let child = gtk::FlowBoxChild::new();
@@ -149,7 +147,7 @@ impl ShowsChild {
}
fn init(&self, pd: &Show) {
self.child.set_tooltip_text(pd.title());
self.child.set_tooltip_text(Some(pd.title()));
WidgetExt::set_name(&self.child, &pd.id().to_string());
self.set_cover(pd.id())
+222
View File
@@ -0,0 +1,222 @@
// window.rs
//
// Copyright 2019 Jordan Petridis <jpetridis@gnome.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-or-later
use glib;
use glib::Variant;
use gio::{self, prelude::*, ActionMapExt, SettingsExt};
use gtk;
use gtk::prelude::*;
use crossbeam_channel::{unbounded, Receiver, Sender};
use crate::app::{Action, PdApplication};
use crate::headerbar::Header;
use crate::settings::{self, WindowGeometry};
use crate::stacks::Content;
use crate::utils;
use crate::widgets::about_dialog;
use crate::widgets::appnotif::InAppNotification;
use crate::widgets::player;
use std::cell::RefCell;
use std::ops::Deref;
use std::rc::Rc;
use crate::config::APP_ID;
use crate::i18n::i18n;
/// Creates an action named `name` in the action map `T with the handler `F`
fn action<T, F>(thing: &T, name: &str, action: F)
where
T: ActionMapExt,
for<'r, 's> F: Fn(&'r gio::SimpleAction, Option<&Variant>) + 'static,
{
// Create a stateless, parameterless action
let act = gio::SimpleAction::new(name, None);
// Connect the handler
act.connect_activate(action);
// Add it to the map
thing.add_action(&act);
}
#[derive(Debug)]
pub struct MainWindow {
app: PdApplication,
pub(crate) window: gtk::ApplicationWindow,
pub(crate) overlay: gtk::Overlay,
pub(crate) content: Rc<Content>,
pub(crate) headerbar: Rc<Header>,
pub(crate) player: player::PlayerWrapper,
pub(crate) updater: RefCell<Option<InAppNotification>>,
pub(crate) sender: Sender<Action>,
pub(crate) receiver: Receiver<Action>,
}
impl MainWindow {
pub fn new(app: &PdApplication) -> Self {
let settings = gio::Settings::new("org.gnome.Podcasts");
let (sender, receiver) = unbounded();
let window = gtk::ApplicationWindow::new(app);
window.set_title(&i18n("Podcasts"));
if APP_ID.ends_with("Devel") {
window.get_style_context().add_class("devel");
}
let weak_s = settings.downgrade();
let weak_app = app.downgrade();
window.connect_delete_event(move |window, _| {
let app = match weak_app.upgrade() {
Some(a) => a,
None => return Inhibit(false),
};
let settings = match weak_s.upgrade() {
Some(s) => s,
None => return Inhibit(false),
};
info!("Saving window position");
WindowGeometry::from_window(&window).write(&settings);
info!("Application is exiting");
let app = app.clone().upcast::<gio::Application>();
app.quit();
Inhibit(false)
});
// Create a content instance
let content = Content::new(&sender).expect("Content initialization failed.");
// Create the headerbar
let header = Header::new(&content, &sender);
// Add the Headerbar to the window.
window.set_titlebar(Some(&header.container));
// Add the content main stack to the overlay.
let overlay = gtk::Overlay::new();
overlay.add(&content.get_stack());
let wrap = gtk::Box::new(gtk::Orientation::Vertical, 0);
// Add the overlay to the main Box
wrap.add(&overlay);
let player = player::PlayerWrapper::new(&sender);
// Add the player to the main Box
wrap.add(&player.action_bar);
let updater = RefCell::new(None);
window.add(&wrap);
// Retrieve the previous window position and size.
WindowGeometry::from_settings(&settings).apply(&window);
// Update the feeds right after the Window is initialized.
if settings.get_boolean("refresh-on-startup") {
info!("Refresh on startup.");
let s: Option<Vec<_>> = None;
utils::refresh(s, sender.clone());
}
let refresh_interval = settings::get_refresh_interval(&settings).num_seconds() as u32;
info!("Auto-refresh every {:?} seconds.", refresh_interval);
let r_sender = sender.clone();
gtk::timeout_add_seconds(refresh_interval, move || {
let s: Option<Vec<_>> = None;
utils::refresh(s, r_sender.clone());
glib::Continue(true)
});
Self {
app: app.clone(),
window,
overlay,
headerbar: header,
content,
player,
updater,
sender,
receiver,
}
}
/// Define the `GAction`s.
///
/// Used in menus and the keyboard shortcuts dialog.
#[cfg_attr(rustfmt, rustfmt_skip)]
pub fn setup_gactions(&self) {
let sender = &self.sender;
let weak_win = self.window.downgrade();
// Create the `refresh` action.
//
// This will trigger a refresh of all the shows in the database.
action(&self.window, "refresh", clone!(sender => move |_, _| {
gtk::idle_add(clone!(sender => move || {
let s: Option<Vec<_>> = None;
utils::refresh(s, sender.clone());
glib::Continue(false)
}));
}));
self.app.set_accels_for_action("win.refresh", &["<primary>r"]);
// Create the `OPML` import action
action(&self.window, "import", clone!(sender, weak_win => move |_, _| {
weak_win.upgrade().map(|win| utils::on_import_clicked(&win, &sender));
}));
action(&self.window, "export", clone!(sender, weak_win => move |_, _| {
weak_win.upgrade().map(|win| utils::on_export_clicked(&win, &sender));
}));
// Create the action that shows a `gtk::AboutDialog`
action(&self.window, "about", clone!(weak_win => move |_, _| {
weak_win.upgrade().map(|win| about_dialog(&win));
}));
// Create the quit action
let weak_instance = self.app.downgrade();
action(&self.window, "quit", move |_, _| {
weak_instance.upgrade().map(|app| app.quit());
});
self.app.set_accels_for_action("win.quit", &["<primary>q"]);
// Create the menu action
let header = Rc::downgrade(&self.headerbar);
action(&self.window, "menu", move |_, _| {
header.upgrade().map(|h| h.open_menu());
});
// Bind the hamburger menu button to `F10`
self.app.set_accels_for_action("win.menu", &["F10"]);
}
}
impl Deref for MainWindow {
type Target = gtk::ApplicationWindow;
fn deref(&self) -> &Self::Target {
&self.window
}
}
Regular → Executable
View File
+4 -1
View File
@@ -2,14 +2,17 @@
set -o errexit
set -o pipefail
set -x
# $1 Passed by meson and should be the builddir
export CARGO_TARGET_DIR="$1/target/"
# If this is run inside a flatpak envrironment, append the export the rustc
# sdk-extension binaries to the path
if [ -n "/.flatpak-info" ]
if [ -f "/.flatpak-info" ]
then
export PATH="$PATH:/usr/lib/sdk/rust-stable/bin"
# This assumes its run inside a Builder terminal
export CARGO_TARGET_DIR="$BUILDDIR/target/"
fi