[SCM] gnome-mpv/master: New upstream version 0.13
infinity0 at users.alioth.debian.org
infinity0 at users.alioth.debian.org
Thu Oct 19 13:23:29 UTC 2017
The following commit has been merged in the master branch:
commit 7f1cd0449b490ecb73de9adf060660617f684338
Author: Ximin Luo <infinity0 at debian.org>
Date: Thu Oct 19 14:38:45 2017 +0200
New upstream version 0.13
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 54505f2..fb76e90 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -2,6 +2,14 @@ Reporting Bugs
==============
- Make sure you're using the latest release.
- If possible, also check if the problem has already been fixed in git master.
-- Attach a log file made by running gnome-mpv on the command line like this:
- `G_MESSAGES_DEBUG=all gnome-mpv`
- Don't report multiple unrelated/barely related bugs in one issue.
+- Attach a log file.
+ - You can make gnome-mpv print log messages by running
+ `G_MESSAGES_DEBUG=all gnome-mpv`
+- If the issue involves crashing, include a backtrace in the report.
+ - You can create a backtrace by running
+ `gdb -ex 'set pagination off' -ex run -ex bt gnome-mpv`
+ and perform the action that triggers the crash.
+- If the issue is a regression, it would be very helpful if you could perform a
+ [bisect](https://git-scm.com/docs/git-bisect) to locate the commit that
+ introduces the regression.
diff --git a/Makefile.am b/Makefile.am
index ceb38c7..ecb94bd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src data po
+SUBDIRS = src data docs po
EXTRA_DIST = README.md AUTHORS meson.build meson_post_install.py po/meson.build
diff --git a/README.md b/README.md
index 4003c01..0869fc6 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,6 @@ capabilities.
- autoconf >= 2.69<sup>[[1]](#note1)</sup> (build)
- autoconf-archive<sup>[[1]](#note1)</sup> (build)
- automake >= 1.12<sup>[[1]](#note1)</sup> (build)
-- python2<sup>[[1]](#note1)</sup> (build)
- pkg-config (build)
- gcc (build)
- glib >= 2.44
@@ -37,30 +36,29 @@ capabilities.
- Frugalware: http://www4.frugalware.org/pub/linux/distributions/frugalware/frugalware-current/source/xapps-extra/gnome-mpv/
- OpenSUSE: https://build.opensuse.org/package/show/home:mermoldy:multimedia/gnome-mpv
- Gentoo: http://gpo.zugaina.org/media-video/gnome-mpv
+- Guix: https://www.gnu.org/software/guix/packages/g.html#gnome-mpv
- Solus: https://packages.solus-project.com/shannon/g/gnome-mpv/
- Ubuntu: https://launchpad.net/~xuzhen666/+archive/ubuntu/gnome-mpv
-### Guix
-To install with Guix, run the following command:
+### Flatpak
+
+[Flatpak](https://flatpak.org) packages support multiple distributions and are sandboxed.
+Flatpak 0.9.5+ is recommended for best integration.
+
+Stable releases are hosted on [Flathub](https://flathub.org):
```sh
-guix package -i gnome-mpv
+flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
+flatpak install flathub io.github.GnomeMpv
```
-### Flatpak
-Flatpak builds can be obtained from https://dl.tingping.se/flatpak/. The build
-file is available in [TingPing/flatpak-packages](https://github.com/TingPing/flatpak-packages/blob/master/io.github.GnomeMpv.json).
-
-Run the commands below to install:
+Development versions are also packaged:
```sh
-flatpak --user remote-add gnome https://sdk.gnome.org/gnome.flatpakrepo
-flatpak --user install gnome org.gnome.Platform 3.22
-
-flatpak --user remote-add tingping https://dl.tingping.se/flatpak/tingping.flatpakrepo
-flatpak --user install tingping io.github.GnomeMpv
+flatpak install https://dl.tingping.se/flatpak/gnome-mpv.flatpakref
```
+
### Source code
Run the following command in the source code directory to build and install:
@@ -68,6 +66,12 @@ Run the following command in the source code directory to build and install:
./autogen.sh && make && sudo make install
```
+When building from release tarballs, replace `./autogen.sh` with `./configure`:
+
+```sh
+./configure && make && sudo make install
+```
+
Alternatively, you can use Meson:
```sh
diff --git a/configure.ac b/configure.ac
index 52eae12..80e4080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
AC_PREREQ([2.69])
AC_INIT( [gnome-mpv],
- [0.12],
+ [0.13],
[http://github.com/gnome-mpv/gnome-mpv/issues],
[gnome-mpv],
[http://github.com/gnome-mpv/gnome-mpv] )
@@ -109,7 +109,7 @@ AC_CHECK_FUNCS([setlocale],[],[
AC_MSG_ERROR([Could not find required functions])
])
-AC_CONFIG_FILES([Makefile src/Makefile data/Makefile po/Makefile.in])
+AC_CONFIG_FILES([Makefile src/Makefile data/Makefile docs/Makefile po/Makefile.in])
AC_OUTPUT
echo "
diff --git a/data/Makefile.am b/data/Makefile.am
index 18bd8db..518fbf5 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -10,6 +10,13 @@ appstream_XML = $(appstream_in_files:.xml.in=.xml)
@APPSTREAM_XML_RULES@
+dbusservicedir = $(datadir)/dbus-1/services
+dbusservice_in_files = io.github.GnomeMpv.service.in
+dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
+
+%.service: %.service.in Makefile
+ $(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" $< > $@
+
desktopdir = $(datadir)/applications
desktop_in_files = io.github.GnomeMpv.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@@ -23,11 +30,15 @@ icon_DATA = gnome-mpv.svg
symicondir = $(datadir)/icons/hicolor/symbolic/apps
symicon_DATA = gnome-mpv-symbolic.svg
-EXTRA_DIST = $(appstream_in_files) $(desktop_in_files) \
- gnome-mpv.svg gnome-mpv-symbolic.svg \
+EXTRA_DIST = $(appstream_in_files) \
+ $(desktop_in_files) \
+ $(dbusservice_in_files) \
+ gnome-mpv.svg \
+ gnome-mpv-symbolic.svg \
org.gnome-mpv.gschema.xml \
io.github.GnomeMpv.gschema.xml \
- gmpv_mpris_gdbus.xml gmpv_marshal.lst \
+ gmpv_mpris_gdbus.xml \
+ gmpv_marshal.lst \
meson.build
-DISTCLEANFILES = $(appstream_XML) $(desktop_DATA)
+DISTCLEANFILES = $(appstream_XML) $(desktop_DATA) $(dbusservice_DATA)
diff --git a/data/gmpv_marshal.lst b/data/gmpv_marshal.lst
index 213003d..08ee3fa 100644
--- a/data/gmpv_marshal.lst
+++ b/data/gmpv_marshal.lst
@@ -1,4 +1,8 @@
VOID:POINTER,BOOLEAN
VOID:STRING,POINTER
VOID:INT,INT
+VOID:INT64,INT64
+VOID:INT,STRING,STRING
+VOID:INT,POINTER
+VOID:BOOLEAN,BOOLEAN,POINTER,POINTER
VOID:INT64
diff --git a/data/gmpv_mpris_gdbus.xml b/data/gmpv_mpris_gdbus.xml
index 4d994d1..df16fda 100644
--- a/data/gmpv_mpris_gdbus.xml
+++ b/data/gmpv_mpris_gdbus.xml
@@ -79,7 +79,7 @@
</signal>
<signal name='TrackAdded'>
<arg type='a{sv}' name='Metadata'/>
- <arg type='0' name='AfterTrack'/>
+ <arg type='o' name='AfterTrack'/>
</signal>
<signal name='TrackRemoved'>
<arg type='o' name='TrackId'/>
diff --git a/data/io.github.GnomeMpv.appdata.xml.in b/data/io.github.GnomeMpv.appdata.xml.in
index 3f75b17..c3f5d86 100644
--- a/data/io.github.GnomeMpv.appdata.xml.in
+++ b/data/io.github.GnomeMpv.appdata.xml.in
@@ -6,6 +6,7 @@
<project_license>GPL-3.0+</project_license>
<name>GNOME MPV</name>
<summary>GTK+ frontend for mpv</summary>
+ <launchable type="desktop-id">io.github.GnomeMpv.desktop</launchable>
<translation type="gettext">gnome-mpv</translation>
<description>
<p>
@@ -22,6 +23,9 @@
<li>MPRIS2 D-Bus interface</li>
</ul>
</description>
+ <releases>
+ <release date="2017-06-12" version="0.12"/>
+ </releases>
<screenshots>
<screenshot type="default">
<image>http://gnome-mpv.github.io/images/screenshot-0.png</image>
@@ -38,5 +42,5 @@
</screenshots>
<url type="homepage">http://gnome-mpv.github.io</url>
<url type="bugtracker">http://github.com/gnome-mpv/gnome-mpv/issues</url>
- <update_contact>gnome-mpv_at_openmailbox.org</update_contact>
+ <update_contact>gnome-mpv_at_teknik.io</update_contact>
</component>
diff --git a/data/io.github.GnomeMpv.desktop.in b/data/io.github.GnomeMpv.desktop.in
index 84e09e2..283d7fd 100644
--- a/data/io.github.GnomeMpv.desktop.in
+++ b/data/io.github.GnomeMpv.desktop.in
@@ -8,6 +8,12 @@ Icon=gnome-mpv
Terminal=false
Type=Application
StartupNotify=true
+DBusActivatable=true
Categories=GTK;GNOME;AudioVideo;Player;Video;TV;
MimeType=application/mpeg4-iod;application/mpeg4-muxcodetable;application/mxf;application/ogg;application/ram;application/sdp;application/streamingmedia;application/vnd.apple.mpegurl;application/vnd.ms-asf;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;application/x-extension-m4a;application/x-extension-mp4;application/x-flac;application/x-flash-video;application/x-matroska;application/x-ogg;application/x-streamingmedia;audio/3gpp;audio/3gpp2;audio/aac;audio/ac3;audio/amr;audio/amr-wb;audio/basic;audio/dv;audio/eac3;audio/flac;audio/m4a;audio/midi;audio/mp1;audio/mp2;audio/mp3;audio/mp4;audio/mpeg;audio/mpegurl;audio/mpg;audio/ogg;audio/opus;audio/scpls;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/vnd.dolby.mlp;audio/vnd.dts;audio/vnd.dts.hd;audio/vnd.rn-realaudio;audio/wav;audio/webm;audio/x-aac;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp1;audio/x-mp2;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-mpg;audio/x-ms-asf;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-realaudio;audio/x-pn-wav;audio/x-real-audio;audio/x-realaudio;audio/x-s3m;audio/x-scpls;audio/x-shorten;audio/x-speex;audio/x-tta;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-wav;audio/x-wavpack;audio/x-xm;video/3gp;video/3gpp;video/3gpp2;video/divx;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/mpeg-system;video/msvideo;video/ogg;video/quicktime;video/vnd.mpegurl;video/vnd.rn-realvideo;video/webm;video/x-avi;video/x-flc;video/x-fli;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-mpeg-system;video/x-mpeg2;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-msvideo;video/x-nsv;video/x-ogm+ogg;video/x-theora;video/x-theora+ogg;x-content/audio-cdda;x-content/audio-player;x-content/video-dvd;x-scheme-handler/mms;x-scheme-handler/mmsh;x-scheme-handler/rtmp;x-scheme-handler/rtp;x-scheme-handler/rtsp;
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
+Actions=new-window;
+
+[Desktop Action new-window]
+Name=New Window
+Exec=gnome-mpv --new-window
diff --git a/data/io.github.GnomeMpv.gschema.xml b/data/io.github.GnomeMpv.gschema.xml
index 51e4b87..75f6376 100644
--- a/data/io.github.GnomeMpv.gschema.xml
+++ b/data/io.github.GnomeMpv.gschema.xml
@@ -35,9 +35,9 @@
<description>
</description>
</key>
- <key name='multiple-instances-enable' type='b'>
+ <key name='always-open-new-window' type='b'>
<default>false</default>
- <summary>Allow multiple instances</summary>
+ <summary>Whether or not to create new windows when there is already an instance</summary>
<description>
</description>
</key>
@@ -71,6 +71,24 @@
<description>
</description>
</key>
+ <key name='mpris-enable' type='b'>
+ <default>true</default>
+ <summary>Whether or not to enable MPRIS support</summary>
+ <description>
+ </description>
+ </key>
+ <key name='media-keys-enable' type='b'>
+ <default>true</default>
+ <summary>Whether or not to enable GNOME-Settings-Daemon-based media keys support</summary>
+ <description>
+ </description>
+ </key>
+ <key name='prefetch-metadata' type='b'>
+ <default>true</default>
+ <summary>Whether or not to prefetch metadata for non-current playlist entries</summary>
+ <description>
+ </description>
+ </key>
</schema>
<schema path="/io/github/gnome-mpv/window-state/"
diff --git a/data/io.github.GnomeMpv.service.in b/data/io.github.GnomeMpv.service.in
new file mode 100644
index 0000000..0179921
--- /dev/null
+++ b/data/io.github.GnomeMpv.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=io.github.GnomeMpv
+Exec=@bindir@/gnome-mpv --gapplication-service
diff --git a/data/meson.build b/data/meson.build
index 5f27b77..48b7354 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -30,3 +30,13 @@ install_data('gnome-mpv.svg',
install_data('gnome-mpv-symbolic.svg',
install_dir: join_paths(icondir, 'symbolic/apps')
)
+
+service_conf = configuration_data()
+service_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+
+configure_file(
+ input: 'io.github.GnomeMpv.service.in',
+ output: 'io.github.GnomeMpv.service',
+ configuration: service_conf,
+ install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services')
+)
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..d65bde5
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,5 @@
+man_MANS=gnome-mpv.1
+
+EXTRA_DIST = $(man_MANS)
+
+
diff --git a/docs/gnome-mpv.1 b/docs/gnome-mpv.1
new file mode 100644
index 0000000..180d5a9
--- /dev/null
+++ b/docs/gnome-mpv.1
@@ -0,0 +1,44 @@
+.\"Copyright (c) 2017 gnome-mpv
+.\"
+.\"This file is part of GNOME MPV.
+.\"
+.\"GNOME MPV 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.
+.\"
+.\"GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
+.TH gnome-mpv 1 "19 July 2017"
+.SH NAME
+GNOME MPV \- A simple GTK+ frontend for mpv
+.SH SYNOPSIS
+.B gnome-mpv
+[\fIoptions...\fR]
+[\fIfilenames\fR|\fIURIs\fR]
+.SH DESCRIPTION
+\fBGNOME MPV\fR is a simple GTK+ frontend for \fBmpv\fR. \fBGNOME MPV\fR
+interacts with \fBmpv\fR via the client API exported by libmpv, allowing access
+to \fBmpv\fR's powerful playback capabilities.
+.SH OPTIONS
+.TP
+\fB\-?, \-h, \-\-help\fR
+Show help options.
+.TP
+\fB\--new-window\fR
+Create a new window if there is already a running instance. The option has no
+effect otherwise.
+.TP
+\fB\--enqueue\fR
+Append the given files or URIs to the playlist if there is a running instance.
+The option has no effect otherwise.
+.TP
+\fB\--version\fR
+Print the release version and exit.
+.SH BUGS
+Please report bugs at https://github.com/gnome-mpv/gnome-mpv/issues.
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..c7aa8ab
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1 @@
+install_man('gnome-mpv.1')
diff --git a/meson.build b/meson.build
index 5a4f9c4..151153e 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('gnome-mpv', 'c',
- version: '0.11',
+ version: '0.13',
meson_version: '>= 0.37.0',
default_options: [
'warning_level=2',
@@ -58,6 +58,7 @@ endif
subdir('src')
subdir('data')
+subdir('docs')
subdir('po')
meson.add_install_script('meson_post_install.py')
diff --git a/po/LINGUAS b/po/LINGUAS
index 828c8d3..e75d2e6 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,16 +1,20 @@
+bg
ca
cs
de_DE
+es
fr
hu
it
ja
nl
pl
+pt_BR
pt_PT
ro
ru
-sr_RS
-sr_RS at latin
+sr
+sr at latin
+sv
zh_CN
zh_TW
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9a23cc7..3c8f59b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,28 +2,29 @@ data/org.gnome-mpv.gschema.xml
data/io.github.GnomeMpv.gschema.xml
data/io.github.GnomeMpv.appdata.xml.in
data/io.github.GnomeMpv.desktop.in
-src/gmpv_application_action.c
src/gmpv_application.c
src/gmpv_common.c
src/gmpv_control_box.c
+src/gmpv_controller_actions.c
src/gmpv_controller.c
+src/gmpv_controller_input.c
src/gmpv_file_chooser.c
src/gmpv_header_bar.c
-src/gmpv_controller_input.c
src/gmpv_main.c
src/gmpv_main_window.c
src/gmpv_menu.c
+src/gmpv_metadata_cache.c
src/gmpv_model.c
src/gmpv_mpv.c
-src/gmpv_mpv_opt.c
src/gmpv_mpv_wrapper.c
src/gmpv_open_location_dialog.c
+src/gmpv_player.c
+src/gmpv_player_options.c
src/gmpv_playlist_widget.c
src/gmpv_plugins_manager.c
src/gmpv_plugins_manager_item.c
-src/gmpv_pref_dialog.c
+src/gmpv_preferences_dialog.c
src/gmpv_seek_bar.c
src/gmpv_shortcuts_window.c
src/gmpv_video_area.c
src/gmpv_view.c
-
diff --git a/po/bg.po b/po/bg.po
new file mode 100644
index 0000000..87932af
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,778 @@
+# cybercop <cybercop_montana at abv.bg>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.6\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-04 00:00+0700\n"
+"PO-Revision-Date: 2017-08-02 01:15-0400\n"
+"Last-Translator: cybercop <cybercop_montana at abv.bg>\n"
+"Language-Team: Bulgarian\n"
+"Language: bg\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Zanata 3.9.6\n"
+
+#: data/org.gnome-mpv.gschema.xml:9 data/io.github.GnomeMpv.gschema.xml:16
+msgid "Enable or disable dark theme"
+msgstr "Включване или изключване на тъмната тема"
+
+#: data/org.gnome-mpv.gschema.xml:15 data/io.github.GnomeMpv.gschema.xml:22
+msgid "Enable or disable client-side decorations"
+msgstr "Включване или изключване на Gnome 3 декорацията"
+
+#: data/org.gnome-mpv.gschema.xml:21 data/io.github.GnomeMpv.gschema.xml:34
+msgid ""
+"Whether or not to make file chooser dialog remember last folder accessed"
+msgstr "Да бъде ли запомнян последния избран файл или посетена папка"
+
+#: data/org.gnome-mpv.gschema.xml:27 data/io.github.GnomeMpv.gschema.xml:46
+msgid "Options to pass to mpv"
+msgstr "Внасяне на настройки от MPV"
+
+#: data/org.gnome-mpv.gschema.xml:33 data/io.github.GnomeMpv.gschema.xml:52
+msgid "Path to mpv configuration file"
+msgstr "Път до конфигурационен файл на MPV"
+
+#: data/org.gnome-mpv.gschema.xml:39 data/io.github.GnomeMpv.gschema.xml:58
+msgid "Load or don't load mpv configuration file"
+msgstr "Да се зареди ли конфигурационния файл от MPV"
+
+#: data/org.gnome-mpv.gschema.xml:45 data/io.github.GnomeMpv.gschema.xml:64
+msgid "Path to mpv input configuration file"
+msgstr "Път до внесения конфигурационен файл на MPV"
+
+#: data/org.gnome-mpv.gschema.xml:51 data/io.github.GnomeMpv.gschema.xml:70
+msgid "Load or don't load mpv input configuration file"
+msgstr "Да се зареди ли внесен MPV конфигурационен файл"
+
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
+msgid "Width of the window"
+msgstr "Ширина на прозореца"
+
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
+msgid "Height of the window"
+msgstr "Височина на прозореца"
+
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
+msgid "Volume of player"
+msgstr "Сила на звука на плеъра"
+
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
+msgid "Width of the playlist"
+msgstr "Ширина на спъсъка за изпълнение"
+
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
+msgid "Show or not show the playlist"
+msgstr "Показване и скриване на списъка за изпълнение"
+
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
+msgid "URI of the last folder accessed"
+msgstr "Адрес на последната посещавана папка"
+
+#: data/io.github.GnomeMpv.gschema.xml:10
+msgid ""
+"Whether the settings has already been migrated from the previous version"
+msgstr "Дали настройките вече са прехвърлени от предишната версия"
+
+#: data/io.github.GnomeMpv.gschema.xml:28
+msgid "Whether or not to use floating controls in windowed mode"
+msgstr "Да се ползват ли плаващи контролери в прозоречен режим"
+
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr "Разрешена ли е поддръжка на MPRIS"
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+"Включена ли е поддръжка на мултимедийни клавиши в GNOME-Settings-Daemon"
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
+msgid "Show or not show the controls"
+msgstr "Да се показват ли контролерите"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:7
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
+msgid "GNOME MPV"
+msgstr "GNOME MPV"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:8
+#: data/io.github.GnomeMpv.desktop.in:5
+msgid "GTK+ frontend for mpv"
+msgstr "GTK+ интерфейс за MPV"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:12
+msgid ""
+"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
+"player capable of playing virtually all video and audio formats. The design "
+"of GNOME MPV is based on GNOME HIG, though it is not dependent on any GNOME "
+"libraries. GNOME MPV also offers an option to disable client-side "
+"decorations (CSD) for better compatibility with non-GNOME systems."
+msgstr ""
+"GNOME MPV е опростен GTK+ интерфейс за MPV, който е мощен мултимедиен плеър,"
+" способен да възпрозвежда множество мултимедийни формати. Дизайна на GNOME "
+"MPV съответства GNOME HIG. GNOME MPV също предлага опция, която изключва "
+"Gnome 3 декорацията на прозорецa (CSD) за по- добра съвместимост с графични "
+"среди, различни от GNOME."
+
+#: data/io.github.GnomeMpv.appdata.xml.in:19
+msgid "Features:"
+msgstr "Опции:"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:21
+msgid "Drag and drop playlist"
+msgstr "Поддръжка на Drag'n'Drop"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:22
+msgid "Loading external mpv configuration files"
+msgstr "Зареждане на външни MPV конфигурационни файлове"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:23
+msgid "MPRIS2 D-Bus interface"
+msgstr "MPRIS2 D-Bus интерфейс"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:36
+msgid "The main window with CSD disabled"
+msgstr "Главният прозорец с изключен CSD"
+
+#: data/io.github.GnomeMpv.appdata.xml.in:40
+msgid "The main window with playlist open"
+msgstr "Главният прозорец с отворен спъсък за изпълнение"
+
+#. Translators: This is an icon name, don't translate!
+#: data/io.github.GnomeMpv.desktop.in:8
+msgid "gnome-mpv"
+msgstr "gnome-mpv"
+
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr "Нов прозорец"
+
+#: src/gmpv_application.c:370
+msgid "Playing"
+msgstr "Изпълнение"
+
+#: src/gmpv_application.c:415
+msgid "Show release version"
+msgstr "Покажи текущата версия"
+
+#: src/gmpv_application.c:423
+msgid "Enqueue"
+msgstr "На опашка"
+
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr "Създаване на нов прозорец"
+
+#: src/gmpv_application.c:439
+msgid "Don't connect to an already-running instance"
+msgstr "Не свързвайте към вече стартиран екземпляр"
+
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Пауза"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
+msgid "Play"
+msgstr "Изпълнение"
+
+#: src/gmpv_control_box.c:436
+msgid "Stop"
+msgstr "Спиране"
+
+#: src/gmpv_control_box.c:439
+msgid "Forward"
+msgstr "Напред"
+
+#: src/gmpv_control_box.c:442
+msgid "Rewind"
+msgstr "Назад"
+
+#: src/gmpv_control_box.c:445
+msgid "Next Chapter"
+msgstr "Следващо заглавие"
+
+#: src/gmpv_control_box.c:448
+msgid "Previous Chapter"
+msgstr "Предишно заглавие"
+
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
+msgid "Toggle Fullscreen"
+msgstr "Включване/изключване режима на цял екран"
+
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
+msgid "Error"
+msgstr "Грешка"
+
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
+msgid "_Cancel"
+msgstr "Отказ"
+
+#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
+#: src/gmpv_open_location_dialog.c:129
+msgid "_Open"
+msgstr "_Отваряне"
+
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
+msgid "All Files"
+msgstr "Всички файлове"
+
+#: src/gmpv_file_chooser.c:143
+msgid "Media Files"
+msgstr "Мултимедийни файлове"
+
+#: src/gmpv_file_chooser.c:154
+msgid "Audio Files"
+msgstr "Аудио файлове"
+
+#: src/gmpv_file_chooser.c:162
+msgid "Video Files"
+msgstr "Видео файлове"
+
+#: src/gmpv_file_chooser.c:170
+msgid "Image Files"
+msgstr "Файлове с изображения"
+
+#: src/gmpv_file_chooser.c:180
+msgid "Subtitle Files"
+msgstr "Фалове със субтитри"
+
+#: src/gmpv_menu.c:102
+msgid "None"
+msgstr "Няма"
+
+#. For simplicity, also dup the default string used when the
+#. * track has no title.
+#: src/gmpv_menu.c:117
+msgid "Unknown"
+msgstr "Неизвестно"
+
+#: src/gmpv_menu.c:150
+msgid "_Load External…"
+msgstr "_Зареждане на външен…"
+
+#: src/gmpv_menu.c:243
+msgid "_File"
+msgstr "_Файл"
+
+#: src/gmpv_menu.c:245 src/gmpv_menu.c:322
+msgid "Open _Location"
+msgstr "Отваряне на местоположение"
+
+#: src/gmpv_menu.c:246 src/gmpv_menu.c:296
+msgid "_Save Playlist"
+msgstr "Запазване на списък за изпълнение"
+
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
+msgid "_Quit"
+msgstr "_Изход"
+
+#: src/gmpv_menu.c:248
+msgid "_Edit"
+msgstr "_Редактиране"
+
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
+msgid "_Preferences"
+msgstr "_Предпочитания"
+
+#: src/gmpv_menu.c:250 src/gmpv_menu.c:298
+msgid "_Video Track"
+msgstr "_Видео запис"
+
+#: src/gmpv_menu.c:251 src/gmpv_menu.c:299
+msgid "_Audio Track"
+msgstr "_Аудио запис"
+
+#: src/gmpv_menu.c:252 src/gmpv_menu.c:300
+msgid "S_ubtitle Track"
+msgstr "Файл със субтитри"
+
+#: src/gmpv_menu.c:253
+msgid "_View"
+msgstr "_Преглед"
+
+#: src/gmpv_menu.c:254 src/gmpv_menu.c:293
+msgid "_Toggle Controls"
+msgstr "Включване/изключване на контролерите"
+
+#: src/gmpv_menu.c:255 src/gmpv_menu.c:295
+msgid "_Toggle Playlist"
+msgstr "Включване/изключване на списъка за изпълнение"
+
+#: src/gmpv_menu.c:256
+msgid "_Fullscreen"
+msgstr "Режим на цял екран"
+
+#: src/gmpv_menu.c:257 src/gmpv_menu.c:302
+msgid "_Normal Size"
+msgstr "Нормален размер"
+
+#: src/gmpv_menu.c:258 src/gmpv_menu.c:303
+msgid "_Double Size"
+msgstr "Двоен размер"
+
+#: src/gmpv_menu.c:259 src/gmpv_menu.c:304
+msgid "_Half Size"
+msgstr "Намален наполовина размер"
+
+#: src/gmpv_menu.c:260
+msgid "_Help"
+msgstr "_Помощ"
+
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
+msgid "_Keyboard Shortcuts"
+msgstr "Клавишни комбинации"
+
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
+msgid "_About"
+msgstr "Относно"
+
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
+#, c-format
+msgid "Playback was terminated abnormally. Reason: %s."
+msgstr "Възпрозвеждането беше спряно непредвидено. Причина: %s."
+
+#: src/gmpv_open_location_dialog.c:123
+msgid "Location:"
+msgstr "Местоположение:"
+
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Не могат да бъдат приложени една или повече опции за MPV."
+
+#: src/gmpv_playlist_widget.c:533
+msgid "_Add…"
+msgstr "_Добавяне…"
+
+#: src/gmpv_playlist_widget.c:537
+msgid "Add _Location…"
+msgstr "Добавяне на местоположение…"
+
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr "Разбъркано"
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr "Повторение"
+
+#: src/gmpv_playlist_widget.c:654
+msgid "Playlist"
+msgstr "Списък за изпълнение"
+
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
+msgid "Add Lua Script"
+msgstr "Добавяне на Lua скрипт"
+
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
+msgid "Lua Scripts"
+msgstr "Lua скрипт"
+
+#: src/gmpv_plugins_manager.c:299
+#, c-format
+msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
+msgstr "Неуспешно копиране на файл от '%s' в '%s'. Причина: %s"
+
+#: src/gmpv_plugins_manager.c:348
+msgid "No Lua script found"
+msgstr "Не е намерен Lua скрипт"
+
+#: src/gmpv_plugins_manager_item.c:69
+msgid "Remove"
+msgstr "Премахване"
+
+#: src/gmpv_plugins_manager_item.c:163
+msgid ""
+"Are you sure you want to remove this script? This action cannot be undone."
+msgstr ""
+"Сигурен ли сте, че искате да премахнете този скрипт? Това действие не може "
+"да бъде отменено."
+
+#: src/gmpv_plugins_manager_item.c:184
+#, c-format
+msgid "Failed to delete file '%s'. Reason: %s"
+msgstr "Неуспешно изтриване на файл '%s'. Причина: %s"
+
+#: src/gmpv_preferences_dialog.c:290
+msgid "<b>User Interface</b>"
+msgstr "<b>Потребителски интерфейс</b>"
+
+#: src/gmpv_preferences_dialog.c:293
+msgid "Enable client-side decorations"
+msgstr "Включване на вградената Gnome 3 декорация"
+
+#: src/gmpv_preferences_dialog.c:296
+msgid "Enable dark theme"
+msgstr "Включване на тъмната тема"
+
+#: src/gmpv_preferences_dialog.c:299
+msgid "Use floating controls in windowed mode"
+msgstr "Използване на плаващи контролери в прозоречен режим"
+
+#: src/gmpv_preferences_dialog.c:302
+msgid "Remember last file's location"
+msgstr "Запомняне на последното местоположение на файловете"
+
+#: src/gmpv_preferences_dialog.c:305
+msgid "<b>MPV Configuration</b>"
+msgstr "<b> MPV конфигурация</b>"
+
+#: src/gmpv_preferences_dialog.c:308
+msgid "Load MPV configuration file"
+msgstr "Зареждане на MPV конфигурационен файл"
+
+#: src/gmpv_preferences_dialog.c:311
+msgid "MPV configuration file:"
+msgstr " MPV конфигурационен файл:"
+
+#: src/gmpv_preferences_dialog.c:314
+msgid "<b>Keybindings</b>"
+msgstr "<b>Клавишни комбинации</b>"
+
+#: src/gmpv_preferences_dialog.c:317
+msgid "Load MPV input configuration file"
+msgstr "Зареждане на внесен MPV конфигурационен файл"
+
+#: src/gmpv_preferences_dialog.c:320
+msgid "MPV input configuration file:"
+msgstr "Внесен MPV конфигурационен файл:"
+
+#: src/gmpv_preferences_dialog.c:323
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Разни</b>"
+
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr "Включване поддръжка на MPRIS"
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr "Включване поддръжка на мултимедийни клавиши"
+
+#: src/gmpv_preferences_dialog.c:338
+msgid "Extra MPV options:"
+msgstr "Допълнителни опции за MPV:"
+
+#: src/gmpv_preferences_dialog.c:371
+msgid "General"
+msgstr "Общи"
+
+#: src/gmpv_preferences_dialog.c:380
+msgid "_Save"
+msgstr "_Запазване"
+
+#: src/gmpv_preferences_dialog.c:397
+msgid "Preferences"
+msgstr "Предпочитания"
+
+#: src/gmpv_shortcuts_window.c:56
+msgid "Open file"
+msgstr "Отваряне на файл"
+
+#: src/gmpv_shortcuts_window.c:57
+msgid "Open location"
+msgstr "Отваряне на местоположение"
+
+#: src/gmpv_shortcuts_window.c:58
+msgid "Add file to playlist"
+msgstr "Добавяне на файлове в списъка за изпълнение"
+
+#: src/gmpv_shortcuts_window.c:59
+msgid "Add location to playlist"
+msgstr "Добавяне на местоположение в списъка за изпълнение"
+
+#: src/gmpv_shortcuts_window.c:60
+msgid "Show preferences dialog"
+msgstr "Показване на диалога с настройките"
+
+#: src/gmpv_shortcuts_window.c:61
+msgid "Toggle controls"
+msgstr "Показване/скриване на контролерите"
+
+#: src/gmpv_shortcuts_window.c:62
+msgid "Toggle playlist"
+msgstr "Показване/скриване на списъка за изпълнение"
+
+#: src/gmpv_shortcuts_window.c:63
+msgid "Toggle fullscreen mode"
+msgstr "Превключване в режим на цял екран"
+
+#: src/gmpv_shortcuts_window.c:64
+msgid "Leave fullscreen mode"
+msgstr "Изход от режима на цял екран"
+
+#: src/gmpv_shortcuts_window.c:65
+msgid "Toggle OSD states between normal and playback time/duration"
+msgstr ""
+"Превключване в OSD режим между нормалното време и времето на "
+"възпроизвеждане/продължителност"
+
+#: src/gmpv_shortcuts_window.c:66
+msgid "Show filename on the OSD"
+msgstr "Показване името на файла в OSD"
+
+#: src/gmpv_shortcuts_window.c:67
+msgid "Show progress, elapsed time, and duration on the OSD"
+msgstr "Показване на прогреса, оставащото време и продължителност в OSD"
+
+#: src/gmpv_shortcuts_window.c:70
+msgid "Seek backward/forward 5 seconds"
+msgstr "Прескачане назад/напред с 5 секунди"
+
+#: src/gmpv_shortcuts_window.c:71
+msgid "Exact seek backward/forward 1 second"
+msgstr "Прецизно прескачане назад/напред с 1 секунда"
+
+#: src/gmpv_shortcuts_window.c:72
+msgid "Seek backward/forward 1 minute"
+msgstr "Прескачане назад/напред с 1 минута"
+
+#: src/gmpv_shortcuts_window.c:73
+msgid "Exact seek backward/forward 5 seconds"
+msgstr "Прецизно прескачане назад/напред с 5 секунди"
+
+#: src/gmpv_shortcuts_window.c:74
+msgid "Seek to previous/next subtitle"
+msgstr "Преминаване към предишните/следващите субтитри"
+
+#: src/gmpv_shortcuts_window.c:75
+msgid "Step backward/forward a single frame"
+msgstr "Стъпка назад/напред с един кадър"
+
+#: src/gmpv_shortcuts_window.c:76
+msgid "Seek to the beginning of the previous/next chapter"
+msgstr "Преминаване към предишното/следващото заглавие"
+
+#: src/gmpv_shortcuts_window.c:79
+msgid "Decrease/increase playback speed by 10%"
+msgstr "Намаляване/увеличаване скоростта на възпроизвеждане с 10%"
+
+#: src/gmpv_shortcuts_window.c:80
+msgid "Halve/double current playback speed"
+msgstr "Намаляване наполовина/удвояване скоростта на изпълнение"
+
+#: src/gmpv_shortcuts_window.c:81
+msgid "Reset playback speed to normal"
+msgstr "Нулиране скоростта на изпълнение до нормална стойност"
+
+#: src/gmpv_shortcuts_window.c:82
+msgid "Go backward/forward in the playlist"
+msgstr "Отиване назад/напред в списъка за изпълнение"
+
+#: src/gmpv_shortcuts_window.c:83
+msgid "Remove selected playlist item"
+msgstr "Премахване на избраните елементи от списъка за изпълнение"
+
+#: src/gmpv_shortcuts_window.c:84
+msgid "Save playlist"
+msgstr "Запазване на списъка за изпълнение"
+
+#: src/gmpv_shortcuts_window.c:85
+msgid "Set/clear A-B loop points"
+msgstr "Задай/изчисти точки на повторение A-B"
+
+#: src/gmpv_shortcuts_window.c:86
+msgid "Toggle infinite looping"
+msgstr "Включване/изключване на напрекъснатото повторение"
+
+#: src/gmpv_shortcuts_window.c:87
+msgid "Pause or unpause"
+msgstr "Пауза и възобновяване"
+
+#: src/gmpv_shortcuts_window.c:88
+msgid "Quit"
+msgstr "Изход"
+
+#: src/gmpv_shortcuts_window.c:89
+msgid "Save current playback position and quit"
+msgstr "Запазване на текущата позиция на възпроизвеждане и изход"
+
+#: src/gmpv_shortcuts_window.c:92
+msgid "Cycle through audio tracks"
+msgstr "Превъртане през аудио записите"
+
+#: src/gmpv_shortcuts_window.c:93 src/gmpv_shortcuts_window.c:94
+msgid "Decrease/increase volume"
+msgstr "Намаляване/увеличаване силата на звука"
+
+#: src/gmpv_shortcuts_window.c:95
+msgid "Mute or unmute"
+msgstr "Заглушаване и пускане на звука"
+
+#: src/gmpv_shortcuts_window.c:96
+msgid "Adjust audio delay by +/- 0.1 seconds"
+msgstr "Задържане на аудиото с + / - 0,1 секунди"
+
+#: src/gmpv_shortcuts_window.c:99
+msgid "Toggle subtitle visibility"
+msgstr "Превключване видимостта на субтитрите"
+
+#: src/gmpv_shortcuts_window.c:100
+msgid "Cycle through available subtitles"
+msgstr "Превъртане през наличните субтитри"
+
+#: src/gmpv_shortcuts_window.c:101
+msgid "Adjust subtitle delay by +/- 0.1 seconds"
+msgstr "Задържане на субтитрите с + / - 0,1 секунди"
+
+#: src/gmpv_shortcuts_window.c:102
+msgid "Toggle SSA/ASS subtitles style override"
+msgstr "Превключване промяната стила на субтитрите SSA/ASS"
+
+#: src/gmpv_shortcuts_window.c:103
+msgid "Move subtitles up/down"
+msgstr "Преместване на субтитрите нагоре/надолу"
+
+#: src/gmpv_shortcuts_window.c:104
+msgid "Toggle VSFilter aspect compatibility mode"
+msgstr "Включване/изключване режим на VSFilter"
+
+#: src/gmpv_shortcuts_window.c:107
+msgid "Cycle through video tracks"
+msgstr "Превъртане през видео записите"
+
+#: src/gmpv_shortcuts_window.c:108
+msgid "Decrease/increase pan-and-scan range"
+msgstr "Намаляване/увеличаване диапазона на обхващане и сканиране"
+
+#: src/gmpv_shortcuts_window.c:109
+msgid "Take a screenshot"
+msgstr "Направете снимка на екрана"
+
+#: src/gmpv_shortcuts_window.c:110
+msgid "Take a screenshot, without subtitles"
+msgstr "Направете снимка на екрана без субтитри"
+
+#: src/gmpv_shortcuts_window.c:111
+msgid "Take a screenshot, as the window shows it"
+msgstr "Направете снимка на екрана с всичко в прозореца"
+
+#: src/gmpv_shortcuts_window.c:112
+msgid "Resize video to half its original size"
+msgstr "Оразмеряване на видеото в половината от оригиналния размер"
+
+#: src/gmpv_shortcuts_window.c:113
+msgid "Resize video to its original size"
+msgstr "Оразмеряване на видеото в неговия оригинален размер"
+
+#: src/gmpv_shortcuts_window.c:114
+msgid "Resize video to double its original size"
+msgstr "Оразмеряване на видеото в двоен размер спрямо оригинала"
+
+#: src/gmpv_shortcuts_window.c:115
+msgid "Adjust contrast"
+msgstr "Настройка на контраста"
+
+#: src/gmpv_shortcuts_window.c:116
+msgid "Adjust brightness"
+msgstr "Настройка на яркостта"
+
+#: src/gmpv_shortcuts_window.c:117
+msgid "Adjust gamma"
+msgstr "Настройка на гамата"
+
+#: src/gmpv_shortcuts_window.c:118
+msgid "Adjust saturation"
+msgstr "Настройка на наситеността"
+
+#: src/gmpv_shortcuts_window.c:119
+msgid "Activate or deactivate deinterlacer"
+msgstr "Активирайте или деактивирайте деинтерлактора"
+
+#: src/gmpv_shortcuts_window.c:120
+msgid "Cycle aspect ratio override"
+msgstr "Циклично презаписване на стойностите"
+
+#: src/gmpv_shortcuts_window.c:123
+msgid "User Interface"
+msgstr "Потребителски интерфейс"
+
+#: src/gmpv_shortcuts_window.c:124
+msgid "Video"
+msgstr "Видео"
+
+#: src/gmpv_shortcuts_window.c:125
+msgid "Audio"
+msgstr "Аудио"
+
+#: src/gmpv_shortcuts_window.c:126
+msgid "Subtitle"
+msgstr "Субтитри"
+
+#: src/gmpv_shortcuts_window.c:127
+msgid "Playback"
+msgstr "Възпроизвеждане"
+
+#: src/gmpv_shortcuts_window.c:128
+msgid "Seeking"
+msgstr "Търсене"
+
+#: src/gmpv_view.c:711
+msgid ""
+"Enabling or disabling client-side decorations requires restarting to take "
+"effect."
+msgstr ""
+"Включването или изключването на вградената (Gnome 3) декорация изисква "
+"рестартиране за да влязат промените в сила."
+
+#: src/gmpv_view.c:1280
+msgid "Add File to Playlist"
+msgstr "Добавяне на файл в списъка"
+
+#: src/gmpv_view.c:1281
+msgid "Open File"
+msgstr "Отваряне на файл"
+
+#: src/gmpv_view.c:1308
+msgid "Add Location to Playlist"
+msgstr "Добавяне местоположение до списък"
+
+#: src/gmpv_view.c:1309
+msgid "Open Location"
+msgstr "Отвори местоположение"
+
+#: src/gmpv_view.c:1330
+msgid "Load Audio Track…"
+msgstr "Зареди аудио запис…"
+
+#: src/gmpv_view.c:1349
+msgid "Load Subtitle Track…"
+msgstr "Зареди файл със субтитри…"
+
+#: src/gmpv_view.c:1374
+msgid "Save Playlist"
+msgstr "Запазване на списъка"
+
+#: src/gmpv_view.c:1439
+msgid "A GTK frontend for MPV"
+msgstr "GTK интерфейс за MPV"
+
+#: src/gmpv_view.c:1449
+msgid "translator-credits"
+msgstr "Kiril Kirilov <cybercop_montana at abv.bg>, 2017."
diff --git a/po/ca.po b/po/ca.po
index 6c4a784..73f5e5c 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -1,17 +1,18 @@
# Adolfo Jayme <fitoschido at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-16 23:25+0700\n"
-"PO-Revision-Date: 2016-11-03 05:23-0400\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Catalan\n"
+"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -50,27 +51,27 @@ msgstr "Camí al fitxer de configuració d’entrada de l’MPV"
msgid "Load or don't load mpv input configuration file"
msgstr "Carrega o no un fitxer de configuració d’entrada de l’MPV"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Amplada de la finestra"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Alçada de la finestra"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Volum del reproductor"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Amplada de la llista de reproducció"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Mostra o amaga la llista de reproducció"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "URI de la darrera carpeta accedida"
@@ -83,17 +84,30 @@ msgstr "Si els paràmetres ja s’han migrat des d’una versió anterior"
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr ""
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -102,7 +116,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "Frontal en GTK+ per a l’mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -117,29 +131,29 @@ msgstr ""
"decoració del client (CSD) i millorar la compatibilitat amb altres sistemes "
"diferents del GNOME."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Característiques:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr ""
"La llista de reproducció es pot reorganitzar amb la tècnica d’arrossegar i "
"deixar anar"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Càrrega de fitxers de configuració externs de l’MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "Interfície per a MPRIS2 del D-Bus"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "La finestra principal amb la CSD inhabilitada"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "La finestra principal amb la llista de reproducció oberta"
@@ -148,69 +162,77 @@ msgstr "La finestra principal amb la llista de reproducció oberta"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "En reproducció"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr ""
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr ""
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr ""
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Posa en pausa"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Reprodueix"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Atura"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Avança"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Rebobina"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Capítol següent"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Capítol anterior"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Commuta la pantalla completa"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Posa en pausa"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Error"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Cancel·la"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Obre"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -260,7 +282,7 @@ msgstr "Obre una _ubicació"
msgid "_Save Playlist"
msgstr "_Desa la llista de reproducció"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Surt"
@@ -268,7 +290,7 @@ msgstr "_Surt"
msgid "_Edit"
msgstr "_Edita"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Preferències"
@@ -316,57 +338,65 @@ msgstr "_Meitat de la mida"
msgid "_Help"
msgstr "_Ajuda"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr ""
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_Quant a"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "La reproducció ha terminat de forma anòmala. Motiu: %s"
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "No s’han pogut aplicar alguns paràmetres de l’MPV."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Ubicació:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "No s’han pogut aplicar alguns paràmetres de l’MPV."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Afegeix…"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr ""
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Repetició"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Llista de reproducció"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr ""
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "«Scripts» en Lua"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "No s’ha pogut copiar el fitxer de «%s» a «%s». Motiu: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "No s’ha trobat cap «script» en Lua"
@@ -386,67 +416,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "No s’ha pogut suprimir el fitxer «%s». Motiu: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Interfície de l’usuari</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Habilita les decoracions del client"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Habilita el tema fosc"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Recorda la ubicació del darrer fitxer"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Paràmetres de l’MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Carrega un fitxer de configuració de l’MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "Fitxer de configuració de l’MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Assignacions de tecles</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Carrega un fitxer de configuració d’entrada de l’MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Fitxer de configuració d’entrada de l’MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Altres</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Opcions addicionals de l’MPV:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Generals"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Desa"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Preferències"
@@ -690,44 +736,44 @@ msgstr ""
msgid "Seeking"
msgstr ""
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Afegeix un fitxer a una llista de reproducció"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Obre un fitxer"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr ""
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Obre una ubicació"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Desa la llista de reproducció"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Un frontal en GTK per a l’MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Adolfo Jayme Barrientos <fitojb at ubuntu.com>"
diff --git a/po/cs.po b/po/cs.po
index e1eb690..e9db4de 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -3,22 +3,23 @@
# Copyright (C) 2015 THE gnome-mpv'S COPYRIGHT HOLDER
# This file is distributed under the same license as the gnome-mpv package.
# Tomáš Marný, 2015.
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2015. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2015. #zanata
# Marek Suchánek <m.suchanek.2 at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
# Marek Suchánek <m.suchanek.2 at gmail.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: gnome-mpv 0.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-23 10:58-0500\n"
-"PO-Revision-Date: 2017-02-02 08:22-0500\n"
-"Last-Translator: Marek Suchánek <m.suchanek.2 at gmail.com>\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: \n"
+"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
"X-Generator: Zanata 3.9.6\n"
@@ -55,27 +56,27 @@ msgstr "Cesta ke konfiguračnímu souboru vstupu mpv"
msgid "Load or don't load mpv input configuration file"
msgstr "Načíst nebo nenačíst konfigurační soubor vstupu mpv"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Šířka okna"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Výška okna"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Hlasitost přehrávání"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Šířka seznamu přehrávání"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Zobrazit nebo nezobrazit seznam přehrávání"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "Cesta k poslední použité složce"
@@ -86,19 +87,32 @@ msgstr "Zda už byly předvolby konvertovány ze staré na novou verzi"
#: data/io.github.GnomeMpv.gschema.xml:28
msgid "Whether or not to use floating controls in windowed mode"
+msgstr "Zda v okenním režimu použít plovoucí ovládací prvky"
+
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Povolit více souběžných spuštění"
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Zobrazit nebo nezobrazit ovládací tlačítka"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -107,7 +121,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "GTK+ rozhraní nad mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -121,120 +135,128 @@ msgstr ""
"žádných knihovnách GNOME nezávisí. Navíc GNOME MPV umožňuje vypnout okenní "
"dekorace na straně klienta (CSD), aby lépe zapadal do jiných prostředí."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Nabízí:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Seznam přehrávání („playlist“) s možností přetáhnout soubory myší"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Načítání externího konfiguračního souboru pro mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "Rozhraní MPRIS2 D-Bus"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Hlavní okno s vypnutými dekoracemi na straně klienta"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Hlavní okno s otevřeným seznamem přehrávání"
#. Translators: This is an icon name, don't translate!
#: data/io.github.GnomeMpv.desktop.in:8
msgid "gnome-mpv"
+msgstr "gnome-mpv"
+
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
msgstr ""
-#: src/gmpv_application.c:464
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "Hraje"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Zobrazit verzi vydání"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "Zařadit do fronty"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Nepřipojovat k již běžící instanci"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pozastavit"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Přehrát"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Zastavit"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Vpřed"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Zpět"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Další kapitola"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Předchozí kapitola"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Zobrazení na celou obrazovku"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pozastavit"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Chyba"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Zrušit"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Otevřít"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
-msgstr ""
+msgstr "Všechny soubory"
#: src/gmpv_file_chooser.c:143
msgid "Media Files"
-msgstr ""
+msgstr "Soubory médií"
#: src/gmpv_file_chooser.c:154
msgid "Audio Files"
-msgstr ""
+msgstr "Soubory zvuku"
#: src/gmpv_file_chooser.c:162
msgid "Video Files"
-msgstr ""
+msgstr "Soubory videa"
#: src/gmpv_file_chooser.c:170
msgid "Image Files"
-msgstr ""
+msgstr "Soubory obrázků"
#: src/gmpv_file_chooser.c:180
msgid "Subtitle Files"
-msgstr ""
+msgstr "Soubory titulků"
#: src/gmpv_menu.c:102
msgid "None"
@@ -243,7 +265,6 @@ msgstr "Nic"
#. For simplicity, also dup the default string used when the
#. * track has no title.
#: src/gmpv_menu.c:117
-#, fuzzy
msgid "Unknown"
msgstr "Neznámý"
@@ -263,7 +284,7 @@ msgstr "_Otevřít umístění"
msgid "_Save Playlist"
msgstr "_Uložit seznam přehrávání"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "U_končit"
@@ -271,7 +292,7 @@ msgstr "U_končit"
msgid "_Edit"
msgstr "Up_ravit"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Předvolby"
@@ -319,58 +340,65 @@ msgstr "_Poloviční velikost"
msgid "_Help"
msgstr "_Nápověda"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Klávesové zkratky"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_O aplikaci"
-#: src/gmpv_mpv.c:408
-#, fuzzy, c-format
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Přehrávání bylo nečekaně ukončeno. Důvod: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Nebylo možno uplatnit jednu nebo více předvoleb MPV."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Umístění:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Nebylo možno uplatnit jednu nebo více předvoleb MPV."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Přidat…"
-#: src/gmpv_playlist_widget.c:535
-#, fuzzy
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Přidat _umístění…"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Opakovat"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Seznam přehrávání"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Přidat skript Lua"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Skripty Lua"
-#: src/gmpv_plugins_manager.c:300
-#, fuzzy, c-format
+#: src/gmpv_plugins_manager.c:299
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Selhalo kopírování souboru z ‚%s‘ do ‚%s‘. Důvod: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Skript Lua nenalezen"
@@ -384,71 +412,87 @@ msgid ""
msgstr "Určitě si přejete tento skript odstranit? Akci nelze vrátit zpět."
#: src/gmpv_plugins_manager_item.c:184
-#, fuzzy, c-format
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Selhalo smazání souboru ‚%s‘. Důvod: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Uživatelské rozhraní</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Povolit dekorace na straně klienta"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Povolit tmavý motiv"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
-msgstr ""
+msgstr "Použít v okenním režimu plovoucí ovládání"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Pamatovat si umístění posledního souboru"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Nastavení MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Načíst konfigurační soubor MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "Konfigurační soubor MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Klávesové zkratky</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Načíst vstupní konfigurační soubor MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Vstupní konfigurační soubor MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Různé</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Extra možnosti MPV:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Obecné"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Uložit"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Předvolby"
@@ -462,11 +506,11 @@ msgstr "Otevřít umístění"
#: src/gmpv_shortcuts_window.c:58
msgid "Add file to playlist"
-msgstr ""
+msgstr "Přidat soubory do seznamu přehrávání"
#: src/gmpv_shortcuts_window.c:59
msgid "Add location to playlist"
-msgstr ""
+msgstr "Přidat umístění do seznamu přehrávání"
#: src/gmpv_shortcuts_window.c:60
msgid "Show preferences dialog"
@@ -665,7 +709,6 @@ msgid "Activate or deactivate deinterlacer"
msgstr "Zapnout nebo vypnout odstranění prokládání"
#: src/gmpv_shortcuts_window.c:120
-#, fuzzy
msgid "Cycle aspect ratio override"
msgstr "Procházet přepsání poměru stran"
@@ -693,44 +736,46 @@ msgstr "Přehrávání"
msgid "Seeking"
msgstr "Posouvání"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
+"Aby se projevilo povolení nebo zakázání dekorací na straně klienta, je nutný"
+" restart aplikace"
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "_Přidat soubory do seznamu přehrávání"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Otevřít soubor"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Přidat umístění do seznamu přehrávání"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Otevřít umístění"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
-msgstr ""
+msgstr "Načíst zvukovou stopu…"
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
-msgstr ""
+msgstr "Načíst stopu titulků…"
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "_Uložit seznam přehrávání"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "GTK frontend pro MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Tomáš Marný"
diff --git a/po/de_DE.po b/po/de_DE.po
index a30badd..c86b779 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -3,22 +3,23 @@
# Copyright (C) 2015 THE gnome-mpv'S COPYRIGHT HOLDER
# This file is distributed under the same license as the gnone-mpv package.
# Vincent Bermel <willovince at openmailbox.org>, 2015.
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2015. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2015. #zanata
# Vincent Bermel <willovince at openmailbox.org>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
# Vincent Bermel <willovince at openmailbox.org>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: gnome-mpv 0.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-23 10:58-0500\n"
-"PO-Revision-Date: 2017-02-20 08:39-0500\n"
+"PO-Revision-Date: 2017-08-05 05:05-0400\n"
"Last-Translator: Vincent Bermel <willovince at openmailbox.org>\n"
"Language-Team: German Translations\n"
+"Language: de-DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: de-DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Zanata 3.9.6\n"
@@ -55,27 +56,27 @@ msgstr "Datei mit MPV-Tastenbelegungen"
msgid "Load or don't load mpv input configuration file"
msgstr "MPV-Konfiguration aus Datei laden"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Fensterbreite"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Fensterhöhe"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Lautstärke"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Breite der Wiedergabeliste"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Wiedergabeliste anzeigen"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "Zuletzt geöffnetes Verzeichnis"
@@ -89,17 +90,30 @@ msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
"Ob im Fenstermodus ausblendende Bedienelemente verwendet werden sollen"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Mehrere Instanzen gleichzeitig zulassen"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr "Ob Steuerung über MPRIS aktiviert werden soll"
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr "Ob mittels GNOME-Settings-Daemon Medientasten aktiviert werden sollen"
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Wiedergabesteuerung anzeigen"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -108,7 +122,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "Eine GTK-Oberfläche für den Medienspieler mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -123,27 +137,27 @@ msgstr ""
"Titelleiste für bessere Integration in Nicht-GNOME-Systeme deaktiviert "
"werden."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Funktionen:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Wiedergabeliste mit Drag and Drop-Unterstützung"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Laden externer mpv-Konfigurationsdateien"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "MPRIS2 D-Bus Schnittstelle"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Das Hauptfenster ohne CSD-Titelleiste"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Das Hauptfenster mit Wiedergabeliste"
@@ -152,92 +166,100 @@ msgstr "Das Hauptfenster mit Wiedergabeliste"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr "Neues Fenster"
+
+#: src/gmpv_application.c:370
#, fuzzy
msgid "Playing"
msgstr "Wiedergabe"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Release-Version anzeigen"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "In Warteschlange aufnehmen"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr "Neues Fenster aufrufen"
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Nicht mit einer bereits laufenden Instanz verbinden"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pause"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Abspielen"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Stoppen"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Vorspulen"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Zurückspulen"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Weiterspringen"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Zurückspringen"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Vollbild"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pause"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Fehler"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Abbrechen"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "Ö_ffnen"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr "Alle Dateien"
#: src/gmpv_file_chooser.c:143
msgid "Media Files"
-msgstr ""
+msgstr "Mediendateien"
#: src/gmpv_file_chooser.c:154
msgid "Audio Files"
-msgstr ""
+msgstr "Audiodateien"
#: src/gmpv_file_chooser.c:162
msgid "Video Files"
-msgstr ""
+msgstr "Videodateien"
#: src/gmpv_file_chooser.c:170
msgid "Image Files"
-msgstr ""
+msgstr "Bilddateien"
#: src/gmpv_file_chooser.c:180
msgid "Subtitle Files"
-msgstr ""
+msgstr "Untertiteldateien"
#: src/gmpv_menu.c:102
msgid "None"
@@ -265,7 +287,7 @@ msgstr "_Adresse öffnen"
msgid "_Save Playlist"
msgstr "Wiedergabeliste _speichern"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Beenden"
@@ -273,7 +295,7 @@ msgstr "_Beenden"
msgid "_Edit"
msgstr "_Bearbeiten"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Einstellungen"
@@ -321,57 +343,65 @@ msgstr "_Halbe Videogröße"
msgid "_Help"
msgstr "_Hilfe"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Tastenkürzel"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_Info"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Wiedergabe wurde abgebrochen. Grund: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "MPV-Optionen konnten nicht angewendet werden."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Adresse (lokal oder Web):"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "MPV-Optionen konnten nicht angewendet werden."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Hinzufügen"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Verzeichnis oder URL hinzufügen"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Wiederholen"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr "_Zufällige Wiedergabe"
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr "_Wiederholen"
+
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Wiedergabeliste"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Lua-Skript hinzufügen"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua-Skripte"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Datei konnte nicht von '%s' nach '%s' kopiert werden. Grund: %s."
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Es wurde kein Lua-Skript gefunden."
@@ -389,67 +419,83 @@ msgstr "Wollen Sie dieses Skript unwiderruflich entfernen?"
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Datei '%s' konnte nicht gelöscht werden. Grund: %s."
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Benutzeroberfläche</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Kombinierte Titel-/Menüleiste (CSD)"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Dunkles Thema verwenden"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr "Ausblendende Bedienelemente in Fenstermodus"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Speicherort der zuletzt gespielten Datei merken"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV-Einstellungen</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "MPV-Konfiguration aus Datei laden"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV-Konfigurationsdatei"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Tastenbelegungen</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "MPV-Tastenbelegung aus Datei laden"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Datei mit MPV-Tastenbelegungen"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Sonstiges</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr "MPRIS-Unterstützung aktivieren"
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr "Medientasten unterstützen"
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Weitere Optionen für MPV"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Allgemein"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Speichern"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Einstellungen"
@@ -463,11 +509,11 @@ msgstr "Adresse öffnen"
#: src/gmpv_shortcuts_window.c:58
msgid "Add file to playlist"
-msgstr ""
+msgstr "Datei zur Widergabeliste hinzufügen"
#: src/gmpv_shortcuts_window.c:59
msgid "Add location to playlist"
-msgstr ""
+msgstr "Ort zur Wiedergabeliste hinzufügen"
#: src/gmpv_shortcuts_window.c:60
msgid "Show preferences dialog"
@@ -693,44 +739,44 @@ msgstr "Wiedergabesteuerung"
msgid "Seeking"
msgstr "Wiedergabeposition"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
-msgstr ""
+msgstr "Die Änderung der Fensterdekoration erfordert einen Neustart."
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Datei zur _Wiedergabeliste hinzufügen"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Datei öffnen"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Verzeichnis oder URL zur Wiedergabeliste hinzufügen"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Adresse öffnen"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
-msgstr ""
+msgstr "Audiospur laden..."
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
-msgstr ""
+msgstr "Untertitel laden..."
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Wiedergabeliste speichern"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Eine GTK-Oberfläche für MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Vincent Bermel"
diff --git a/po/hu.po b/po/es.po
similarity index 50%
copy from po/hu.po
copy to po/es.po
index aa2b8ff..a940350 100644
--- a/po/hu.po
+++ b/po/es.po
@@ -1,107 +1,123 @@
-# Bendegúz Gyönki <gyonkibendeguz at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
-# Bendegúz Gyönki <gyonkibendeguz at gmail.com>, 2017. #zanata
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+# Eddy Castillo <dyskette at gmail.com>, 2017. #zanata
+# Sergio M <baqtor at gmail.com>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-16 23:25+0700\n"
-"PO-Revision-Date: 2017-01-19 05:43-0500\n"
-"Last-Translator: Bendegúz Gyönki <gyonkibendeguz at gmail.com>\n"
-"Language-Team: Hungarian\n"
+"PO-Revision-Date: 2017-09-22 03:40-0400\n"
+"Last-Translator: Sergio M <baqtor at gmail.com>\n"
+"Language-Team: Spanish\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
#: data/org.gnome-mpv.gschema.xml:9 data/io.github.GnomeMpv.gschema.xml:16
msgid "Enable or disable dark theme"
-msgstr "Sötét téma engedélyezése/tiltása"
+msgstr "Habilitar el tema oscuro"
#: data/org.gnome-mpv.gschema.xml:15 data/io.github.GnomeMpv.gschema.xml:22
msgid "Enable or disable client-side decorations"
-msgstr "Kliensoldali díszítések engedélyezése/tiltása"
+msgstr "Habilitar decoraciones del lado del cliente"
#: data/org.gnome-mpv.gschema.xml:21 data/io.github.GnomeMpv.gschema.xml:34
msgid ""
"Whether or not to make file chooser dialog remember last folder accessed"
-msgstr ""
+msgstr "Recordar la localización del último archivo abierto"
#: data/org.gnome-mpv.gschema.xml:27 data/io.github.GnomeMpv.gschema.xml:46
msgid "Options to pass to mpv"
-msgstr "Az mpv-nek átadandó opciók"
+msgstr "Opciones extra de MPV"
#: data/org.gnome-mpv.gschema.xml:33 data/io.github.GnomeMpv.gschema.xml:52
msgid "Path to mpv configuration file"
-msgstr "Az mpv konfigurációs fájl útvonala"
+msgstr "Archivo de configuración de MPV:"
#: data/org.gnome-mpv.gschema.xml:39 data/io.github.GnomeMpv.gschema.xml:58
msgid "Load or don't load mpv configuration file"
-msgstr ""
+msgstr "Cargar archivo de configuración de MPV"
#: data/org.gnome-mpv.gschema.xml:45 data/io.github.GnomeMpv.gschema.xml:64
msgid "Path to mpv input configuration file"
-msgstr "Az mpv bemeneti konfigurációs fájl útvonala"
+msgstr "Archivo de configuración de entrada de MPV:"
#: data/org.gnome-mpv.gschema.xml:51 data/io.github.GnomeMpv.gschema.xml:70
msgid "Load or don't load mpv input configuration file"
-msgstr ""
+msgstr "Cargar archivo de configuración de entrada de MPV"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
-msgstr "Az ablak szélessége"
+msgstr "Ancho de la ventana"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
-msgstr "Az ablak magassága"
+msgstr "Altura de la ventan"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
-msgstr "A lejátszó hangereje"
+msgstr "Volumen del reproductor"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
-msgstr "A lejátszási lista szélessége"
+msgstr "Ancho de la lista de reproducción"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
-msgstr ""
+msgstr "Mostrar la lista de reproducción"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
-msgstr ""
+msgstr "Dirección de la ultima carpeta accedida"
#: data/io.github.GnomeMpv.gschema.xml:10
msgid ""
"Whether the settings has already been migrated from the previous version"
-msgstr ""
+msgstr "Se ha efectuado una migración de preferencias de la última version"
#: data/io.github.GnomeMpv.gschema.xml:28
msgid "Whether or not to use floating controls in windowed mode"
+msgstr "Usar controles flotantes en modo ventana"
+
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Több példány engedélyezése"
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr "Habilitar soporte MPRIS"
-#: data/io.github.GnomeMpv.gschema.xml:105
-msgid "Show or not show the controls"
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr "Habilitar teclas multimedia de Gnome"
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
msgstr ""
+#: data/io.github.GnomeMpv.gschema.xml:123
+msgid "Show or not show the controls"
+msgstr "Mostrar los controles"
+
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
#: data/io.github.GnomeMpv.appdata.xml.in:8
#: data/io.github.GnomeMpv.desktop.in:5
msgid "GTK+ frontend for mpv"
-msgstr "GTK+ felület az mpv-hez"
+msgstr "Frontend de GTK+ para MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -109,634 +125,656 @@ msgid ""
"libraries. GNOME MPV also offers an option to disable client-side "
"decorations (CSD) for better compatibility with non-GNOME systems."
msgstr ""
-"A GNOME MPV egy egyszerű GTK+ felület az mpv-hez, egy rendkívül erőteljes "
-"médialejátszóhoz, amely gyakorlatilag az összes videó- és hangformátum "
-"lejátszására képes. A GNOME MPV dizájnja a GNOME HIG-en alapszik, habár nem "
-"függ egyetlen GNOME könyvtártól sem. A GNOME MPV továbbá lehetővé teszi a "
-"kliensoldali díszítések letiltását a GNOME-tól eltérő rendszerekkel való "
-"jobb kompatibilitás érdekében."
-
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+"GNOME MPV es un frontend simple de GTK+ para MPV, un poderoso reproductor "
+"multimedia capaz de reproducir virtualmente todos los formatos de audio y "
+"video. El diseño de MPV esta basado en GNOME HIG, aunque no depende de "
+"ninguna librería de GNOME. Además, GNOME MPV ofrece una opción para "
+"deshabilitar decoraciones del lado del cliente (CSD) para mejorar la "
+"compatibilidad para sistemas no basados en GNOME. "
+
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
-msgstr "Funkciók:"
+msgstr "Características:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
-msgstr "Fogd és vidd lejátszási lista"
+msgstr "Arrastrar y soltar a la playlist"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
-msgstr "Külső mpv konfigurációs fájlok betöltése"
+msgstr "Cargar archivos de configuración externos de MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
-msgstr "MPRIS2 D-Bus interfész"
+msgstr "Interfaz MPRIS2 D-Bus"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
-msgstr "A főablak letiltott díszítésekkel"
+msgstr ""
+"La ventana principal con decoraciones del lado del cliente deshabilitadas"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
-msgstr "A főablak megnyitott lejátszási listával"
+msgstr "La ventana principal con la lista de reproducción abierta"
#. Translators: This is an icon name, don't translate!
#: data/io.github.GnomeMpv.desktop.in:8
msgid "gnome-mpv"
-msgstr ""
+msgstr "gnome-mpv"
+
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr "Nueva Ventana"
-#: src/gmpv_application.c:464
+#: src/gmpv_application.c:370
msgid "Playing"
-msgstr ""
+msgstr "Reproduciendo"
-#: src/gmpv_application.c:532
-#, fuzzy
+#: src/gmpv_application.c:415
msgid "Show release version"
-msgstr "Kiadási verzió megjelenítése"
+msgstr "Mostrar versión"
-#: src/gmpv_application.c:540
-#, fuzzy
+#: src/gmpv_application.c:423
msgid "Enqueue"
-msgstr "Sorba állítás"
+msgstr "Encolar"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr "Crear nueva ventana"
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
-msgstr "Ne csatlakozzon egy már futó példányhoz"
+msgstr "No conectarse a una instancia que ya se está ejecutando"
+
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pausa"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
-msgstr "Lejátszás"
+msgstr "Reproducir"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
-msgstr "Megállítás"
+msgstr "Deneter"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
-msgstr "Előretekerés"
+msgstr "Adelantar"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
-msgstr "Visszatekerés"
+msgstr "Rebobinar"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
-msgstr "Következő fejezet"
+msgstr "Capítulo siguiente"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
-msgstr "Előző fejezet"
+msgstr "Capítulo anterior"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
-msgstr "Átváltás teljes képernyőre"
-
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Szünet"
+msgstr "Pantalla completa"
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
-msgstr "Hiba"
+msgstr "Error"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
-msgstr "_Mégse"
+msgstr "_Cancelar"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
-msgstr "_Megnyitás"
+msgstr "_Abrir"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
-msgstr ""
+msgstr "Todos los archivos"
#: src/gmpv_file_chooser.c:143
msgid "Media Files"
-msgstr ""
+msgstr "Archivos multimedia"
#: src/gmpv_file_chooser.c:154
msgid "Audio Files"
-msgstr ""
+msgstr "Archivos de Audio"
#: src/gmpv_file_chooser.c:162
msgid "Video Files"
-msgstr ""
+msgstr "Archivos de video"
#: src/gmpv_file_chooser.c:170
msgid "Image Files"
-msgstr ""
+msgstr "Archivos de imágen"
#: src/gmpv_file_chooser.c:180
msgid "Subtitle Files"
-msgstr ""
+msgstr "Archivos de subtítulo"
#: src/gmpv_menu.c:102
msgid "None"
-msgstr "Egyik sem"
+msgstr "Ninguno"
#. For simplicity, also dup the default string used when the
#. * track has no title.
#: src/gmpv_menu.c:117
msgid "Unknown"
-msgstr "Ismeretlen"
+msgstr "Desconocido"
#: src/gmpv_menu.c:150
msgid "_Load External…"
-msgstr "_Külső betöltése..."
+msgstr "Cargar externo..."
#: src/gmpv_menu.c:243
msgid "_File"
-msgstr "_Fájl"
+msgstr "Archivo"
#: src/gmpv_menu.c:245 src/gmpv_menu.c:322
msgid "Open _Location"
-msgstr "_Hely megnyitása"
+msgstr "Abrir _Localización"
#: src/gmpv_menu.c:246 src/gmpv_menu.c:296
msgid "_Save Playlist"
-msgstr "Lejátszási lista _mentése"
+msgstr "Abrir lista de reproducción"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
-msgstr "_Kilépés"
+msgstr "Salir"
#: src/gmpv_menu.c:248
msgid "_Edit"
-msgstr "_Szerkesztés"
+msgstr "_Editar"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
-msgstr "_Beállítások"
+msgstr "_Preferencias"
#: src/gmpv_menu.c:250 src/gmpv_menu.c:298
msgid "_Video Track"
-msgstr "_Videósáv"
+msgstr "Pista de _video"
#: src/gmpv_menu.c:251 src/gmpv_menu.c:299
msgid "_Audio Track"
-msgstr "_Hangsáv"
+msgstr "Pista de _audio"
#: src/gmpv_menu.c:252 src/gmpv_menu.c:300
msgid "S_ubtitle Track"
-msgstr "F_eliratsáv"
+msgstr "Pista de S_ubtítulo"
#: src/gmpv_menu.c:253
msgid "_View"
-msgstr "_Nézet"
+msgstr "_Vista"
#: src/gmpv_menu.c:254 src/gmpv_menu.c:293
msgid "_Toggle Controls"
-msgstr "_Vezérlők be-/kikapcsolása"
+msgstr "Habilitar con_troles"
#: src/gmpv_menu.c:255 src/gmpv_menu.c:295
msgid "_Toggle Playlist"
-msgstr "_Lejátszási lista be-/kikapcsolása"
+msgstr "Habilitar lista de reproducción"
#: src/gmpv_menu.c:256
msgid "_Fullscreen"
-msgstr "_Teljes képernyő"
+msgstr "Pantalla completa"
#: src/gmpv_menu.c:257 src/gmpv_menu.c:302
msgid "_Normal Size"
-msgstr "_Normál méret"
+msgstr "Tamaño _normal"
#: src/gmpv_menu.c:258 src/gmpv_menu.c:303
msgid "_Double Size"
-msgstr "_Kétszeres méret"
+msgstr "Tamaño _doble"
#: src/gmpv_menu.c:259 src/gmpv_menu.c:304
msgid "_Half Size"
-msgstr "_Fele méret"
+msgstr "Mitad de tamaño"
#: src/gmpv_menu.c:260
msgid "_Help"
-msgstr "_Súgó"
+msgstr "Ayuda"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
-msgstr "_Billentyűkombinációk"
+msgstr "Atajos de teclado"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
-msgstr "_Névjegy"
+msgstr "_Acerda de"
-#: src/gmpv_mpv.c:408
-#, fuzzy, c-format
-msgid "Playback was terminated abnormally. Reason: %s."
-msgstr "A lejátszás nem megfelelően lett leállítva. Ok: %s."
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Egy vagy több MPV beállítás alkalmazása nem sikerült"
+#: src/gmpv_mpv.c:216
+#, fuzzy, fuzzy, fuzzy, c-format
+msgid "Playback was terminated abnormally. Reason: %s."
+msgstr "La reproducción ha terminado abruptamente. Razón: %s."
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
-msgstr "Hely:"
+msgstr "Localización:"
+
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Fallo al aplicar uno o más opciones de MPV."
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
-msgstr "_Hozzáadás..."
+msgstr "_Agregar..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
-msgstr "_Hely hozzáadása..."
+msgstr "Agregar _Localización"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Ismétlés"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr "_Mezclar"
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr "Repetir"
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
-msgstr "Lejátszási lista"
+msgstr "Lista de reproducción"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
-msgstr "Lua parancsfájl hozzáadása"
+msgstr "Agregar Script Lua"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
-msgstr "Lua parancsfájlok"
+msgstr "Scripts de Lua"
-#: src/gmpv_plugins_manager.c:300
-#, fuzzy, c-format
+#: src/gmpv_plugins_manager.c:299
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
-msgstr "A fájl másolása innen: „%s\", ide: „%s\" nem sikerült. Ok: %s"
+msgstr "Fallo al copiar de '%s' a '%s'. Razón: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
-msgstr "Nem található Lua parancsfájl"
+msgstr "No se encontró Lua Script"
#: src/gmpv_plugins_manager_item.c:69
msgid "Remove"
-msgstr "Eltávolítás"
+msgstr "Quitar"
#: src/gmpv_plugins_manager_item.c:163
msgid ""
"Are you sure you want to remove this script? This action cannot be undone."
msgstr ""
-"Biztosan el akarja távolítani ezt a parancsfájlt? Ez a művelet nem vonható "
-"vissza."
+"Seguro que quieres quitar este script? Esta acción no se puede deshacer."
#: src/gmpv_plugins_manager_item.c:184
-#, fuzzy, c-format
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
-msgstr "„%s\" fájl törlése nem sikerült. Ok: %s"
+msgstr "Fallo en eliminar archivo '%s'. Razón: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
-msgstr "<b>Felhasználói felület</b>"
+msgstr "<b>Interfaz de usuario</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
-msgstr "Kliensoldali díszítések engedélyezése"
+msgstr "Habilitar decoraciones del lado del cliente"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
-msgstr "Sötét téma engedélyezése"
+msgstr "Habilitar tema oscuro"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
-msgstr ""
+msgstr "Usar controles flotantes en modo ventana"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
-msgstr "Az utolsó fájl pozíciójának megjegyzése"
+msgstr "Recordar ubicación del último archivo"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
-msgstr "<b>MPV konfiguráció</b>"
+msgstr "<b>Configuración de MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
-msgstr "MPV konfigurációs fájl betöltése"
+msgstr "Cargar archivo de configuración de MPV:"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
-msgstr "MPV konfigurációs fájl:"
+msgstr "Archivo de configuración de MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
-msgstr "<b>Gyorsbillentyűk</b>"
+msgstr "</b>Atajos<b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
-msgstr "MPV beviteli konfigurációs fájl betöltése"
+msgstr "Cargar archivo de configuración de entrada de MVP"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
-msgstr "MPV beviteli konfigurációs fájl:"
+msgstr "Archivo de configuración de entrada de MPV"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
-msgstr "<b>Egyéb</b>"
+msgstr "<b>Misceláneo</b>"
+
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr "Habilitar soporte MPRIS"
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr "Habilitar teclas multimedia"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
-msgstr "Extra MPV beállítások:"
+msgstr "Opciones extra de MPV:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
-msgstr "Általános"
+msgstr "General"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
-msgstr "_Mentés"
+msgstr "Guardar"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
-msgstr "Beállítások"
+msgstr "Preferencias"
#: src/gmpv_shortcuts_window.c:56
msgid "Open file"
-msgstr "Fájl megnyitása"
+msgstr "Abrir archivo"
#: src/gmpv_shortcuts_window.c:57
msgid "Open location"
-msgstr "Hely megnyitása"
+msgstr "Abrir ubicación"
#: src/gmpv_shortcuts_window.c:58
msgid "Add file to playlist"
-msgstr ""
+msgstr "Agregar archivo a la lista de reproducción"
#: src/gmpv_shortcuts_window.c:59
msgid "Add location to playlist"
-msgstr ""
+msgstr "Añadir ubicación a la lista de reproducción"
#: src/gmpv_shortcuts_window.c:60
msgid "Show preferences dialog"
-msgstr "Beállítások párbeszédablak mutatása"
+msgstr "Mostrar diálogo de preferencias"
#: src/gmpv_shortcuts_window.c:61
msgid "Toggle controls"
-msgstr "Vezérlők be-/kikapcsolása"
+msgstr "Habilitar controles"
#: src/gmpv_shortcuts_window.c:62
msgid "Toggle playlist"
-msgstr "Lejátszási lista be-/kikapcsolása"
+msgstr "Habilitar lista de reproducción"
#: src/gmpv_shortcuts_window.c:63
msgid "Toggle fullscreen mode"
-msgstr "Teljes képernyős mód be-/kikapcsolása"
+msgstr "Habitlitar pantalla completa"
#: src/gmpv_shortcuts_window.c:64
msgid "Leave fullscreen mode"
-msgstr "Kilépés a teljes képernyős módból"
+msgstr "Dejar pantalla completa"
#: src/gmpv_shortcuts_window.c:65
msgid "Toggle OSD states between normal and playback time/duration"
-msgstr "Váltás a normál és a lejátszási idő/hossz OSD között"
+msgstr "Habilitar estados del OSD entre normal y tiempo/duraciónreproducción "
#: src/gmpv_shortcuts_window.c:66
msgid "Show filename on the OSD"
-msgstr "Fájlnév megjelenítése az OSD-n"
+msgstr "Mostrar nombre de archivo en el OSD"
#: src/gmpv_shortcuts_window.c:67
msgid "Show progress, elapsed time, and duration on the OSD"
-msgstr ""
+msgstr "Mostrar progreso, tiempo transcurrido y duración en el OSD"
#: src/gmpv_shortcuts_window.c:70
-#, fuzzy
msgid "Seek backward/forward 5 seconds"
-msgstr "Visszatekerés/előretekerés 5 másodperccel"
+msgstr "Desplazarse atrás/adelante 5 segundos"
#: src/gmpv_shortcuts_window.c:71
-#, fuzzy
msgid "Exact seek backward/forward 1 second"
-msgstr "Visszatekerés/előretekerés pontosan 1 másodperccel"
+msgstr "Desplazarse atrás/adelante exactamente 1 segundo"
#: src/gmpv_shortcuts_window.c:72
-#, fuzzy
msgid "Seek backward/forward 1 minute"
-msgstr "Visszatekerés/előretekerés 1 perccel"
+msgstr "Desplazarse atrás/adelante 1 minuto"
#: src/gmpv_shortcuts_window.c:73
-#, fuzzy
msgid "Exact seek backward/forward 5 seconds"
-msgstr "Visszatekerés/előretekerés pontosan 5 másodperccel"
+msgstr "Desplazarse atrás/adelante exactamente 5 segundos"
#: src/gmpv_shortcuts_window.c:74
-#, fuzzy
msgid "Seek to previous/next subtitle"
-msgstr "Ugrás az előző/következő felirathoz"
+msgstr "Desplazarse al subtítulo previo/siguiente"
#: src/gmpv_shortcuts_window.c:75
-#, fuzzy
msgid "Step backward/forward a single frame"
-msgstr "Visszalépés/előrelépés egy képkockával"
+msgstr "Desplazarse atrás/adelante un solo cuadro"
#: src/gmpv_shortcuts_window.c:76
-#, fuzzy
msgid "Seek to the beginning of the previous/next chapter"
-msgstr "Ugrás az előző/következő fejezet elejére"
+msgstr "Ir al principio del siguiente/anterior capítulo"
#: src/gmpv_shortcuts_window.c:79
-#, fuzzy
msgid "Decrease/increase playback speed by 10%"
-msgstr "Lejátszási sebesség csökkentése/növelése 10%-kal"
+msgstr "Aumentar/Disminuir velocidad de reproducción un 10%"
#: src/gmpv_shortcuts_window.c:80
-#, fuzzy
msgid "Halve/double current playback speed"
-msgstr "Jelenlegi lejátszási sebesség felezése/duplázása"
+msgstr "Reducir a la mitad/Duplicar velocidad de reproducción"
#: src/gmpv_shortcuts_window.c:81
-#, fuzzy
msgid "Reset playback speed to normal"
-msgstr "Normál lejátszási sebesség visszaállítása"
+msgstr "Normalizar velocidad de reproducción"
#: src/gmpv_shortcuts_window.c:82
msgid "Go backward/forward in the playlist"
-msgstr "Ugrás előre/hátra a lejátszási listában"
+msgstr "Ir atrás/adelante en la lista de reproducción"
#: src/gmpv_shortcuts_window.c:83
msgid "Remove selected playlist item"
-msgstr "Kiválasztott lejátszási elem eltávolítása"
+msgstr "Quitar item seleccionado de lista de reproducción"
#: src/gmpv_shortcuts_window.c:84
msgid "Save playlist"
-msgstr "Lejátszási lista mentése"
+msgstr "Guardar lista de reproducción"
#: src/gmpv_shortcuts_window.c:85
msgid "Set/clear A-B loop points"
-msgstr "A-B ismétlési szakasz beállítása/törlése"
+msgstr "Fijar/eliminar puntos A-B de la repetición"
#: src/gmpv_shortcuts_window.c:86
msgid "Toggle infinite looping"
-msgstr "Végtelen ismétlés be-/kikapcsolása"
+msgstr "Habilitar repetición infinita"
#: src/gmpv_shortcuts_window.c:87
msgid "Pause or unpause"
-msgstr "Szünet vagy folytatás"
+msgstr "Pausar o despausar"
#: src/gmpv_shortcuts_window.c:88
msgid "Quit"
-msgstr "Kilépés"
+msgstr "Quitar"
#: src/gmpv_shortcuts_window.c:89
msgid "Save current playback position and quit"
-msgstr "Jelenlegi lejátszási pozíció mentése és kilépés"
+msgstr "Guardar posición actual de reproducción y salir"
#: src/gmpv_shortcuts_window.c:92
msgid "Cycle through audio tracks"
-msgstr "Váltás a hangsávok között"
+msgstr "Ciclar a través de las pistas de audio"
#: src/gmpv_shortcuts_window.c:93 src/gmpv_shortcuts_window.c:94
msgid "Decrease/increase volume"
-msgstr "Hangerő csökkentése/növelése"
+msgstr "Disminuir/aumentar volumen"
#: src/gmpv_shortcuts_window.c:95
msgid "Mute or unmute"
-msgstr "Némítás be-/kikapcsolása"
+msgstr "Silenciar/No silenciar"
#: src/gmpv_shortcuts_window.c:96
msgid "Adjust audio delay by +/- 0.1 seconds"
-msgstr "Hangsáv eltolásának beállítása 0,1 mp időközökkel"
+msgstr "Ajustar retraso de audio +/- 0.1 segundos"
#: src/gmpv_shortcuts_window.c:99
msgid "Toggle subtitle visibility"
-msgstr "Felirat láthatóságának be-/kikapcsolása"
+msgstr "Habilitar visibilidad del subtítulo"
#: src/gmpv_shortcuts_window.c:100
msgid "Cycle through available subtitles"
-msgstr "Váltás az elérhető feliratok között"
+msgstr "Ciclar a través de los subtitulos disponibles"
#: src/gmpv_shortcuts_window.c:101
msgid "Adjust subtitle delay by +/- 0.1 seconds"
-msgstr "Feliratok eltolásának beállítása 0,1 mp időközökkel"
+msgstr "Ajustar retraso de subtitulos +/- 0.1 segundos"
#: src/gmpv_shortcuts_window.c:102
msgid "Toggle SSA/ASS subtitles style override"
-msgstr "SSA/ASS feliratstílus felülbírálásának be-/kikapcsolása"
+msgstr "Habilitar soreescritura de estilo de subtitulos SSA/ASS "
#: src/gmpv_shortcuts_window.c:103
msgid "Move subtitles up/down"
-msgstr "Feliratok mozgatása fel/le"
+msgstr "Mover subtitulos arriba/abajo"
#: src/gmpv_shortcuts_window.c:104
msgid "Toggle VSFilter aspect compatibility mode"
-msgstr "VSFilter képarány-kompatibilitási mód be-/kikapcsolása"
+msgstr "Habilitar modo de compatibilidad de aspecto de VSFilter"
#: src/gmpv_shortcuts_window.c:107
msgid "Cycle through video tracks"
-msgstr "Váltás a videósávok között"
+msgstr "Ciclar a traves de las pistas de video"
#: src/gmpv_shortcuts_window.c:108
msgid "Decrease/increase pan-and-scan range"
-msgstr "Pan-and-scan tartomány csökkentése/növelése"
+msgstr "Disminuir/aumentar rango de pan-and-scan"
#: src/gmpv_shortcuts_window.c:109
msgid "Take a screenshot"
-msgstr "Képernyőkép készítése"
+msgstr "Tomar una captura de pantalla"
#: src/gmpv_shortcuts_window.c:110
msgid "Take a screenshot, without subtitles"
-msgstr "Képernyőkép készítése feliratok nélkül"
+msgstr "Tomar una captura de pantalla, sin subtitulos"
#: src/gmpv_shortcuts_window.c:111
msgid "Take a screenshot, as the window shows it"
-msgstr "Képernyőkép készítése az ablak tartalmáról"
+msgstr "Tomar una captura de pantalla, tal como se muestra en la ventana"
#: src/gmpv_shortcuts_window.c:112
msgid "Resize video to half its original size"
-msgstr "Videó átméretezése az eredeti méret felére"
+msgstr "Cambiar tamaño de video a la mitad del original"
#: src/gmpv_shortcuts_window.c:113
msgid "Resize video to its original size"
-msgstr "Videó átméretezése az eredeti méretre"
+msgstr "Cambiar tamaño de video a su tamaño original"
#: src/gmpv_shortcuts_window.c:114
msgid "Resize video to double its original size"
-msgstr "Videó átméretezése az eredeti méret kétszeresére"
+msgstr "Cambiar tamaño de video a l doble del original"
#: src/gmpv_shortcuts_window.c:115
msgid "Adjust contrast"
-msgstr "Kontraszt beállítása"
+msgstr "Ajustar contraste"
#: src/gmpv_shortcuts_window.c:116
msgid "Adjust brightness"
-msgstr "Világosság beállítása"
+msgstr "Ajustar brillo"
#: src/gmpv_shortcuts_window.c:117
msgid "Adjust gamma"
-msgstr "Gamma beállítása"
+msgstr "Ajustar gamma"
#: src/gmpv_shortcuts_window.c:118
msgid "Adjust saturation"
-msgstr "Telítettség beállítása"
+msgstr "Ajustar saturación"
#: src/gmpv_shortcuts_window.c:119
msgid "Activate or deactivate deinterlacer"
-msgstr "Váltottsorosság-mentesítés be-/kikapcsolása"
+msgstr "Activar/Desactivar interlacer"
#: src/gmpv_shortcuts_window.c:120
msgid "Cycle aspect ratio override"
-msgstr ""
+msgstr "Ciclar relación de aspecto"
#: src/gmpv_shortcuts_window.c:123
msgid "User Interface"
-msgstr "Felhasználói felület"
+msgstr "Interfaz de usuario"
#: src/gmpv_shortcuts_window.c:124
msgid "Video"
-msgstr "Videó"
+msgstr "Video"
#: src/gmpv_shortcuts_window.c:125
msgid "Audio"
-msgstr "Hang"
+msgstr "Audio"
#: src/gmpv_shortcuts_window.c:126
msgid "Subtitle"
-msgstr "Felirat"
+msgstr "Subtítulo"
#: src/gmpv_shortcuts_window.c:127
msgid "Playback"
-msgstr "Lejátszás"
+msgstr "Reproducción"
#: src/gmpv_shortcuts_window.c:128
msgid "Seeking"
-msgstr "Tekerés"
+msgstr "Buscando"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
+"Habilitar o deshabilitar decoraciones del lado de cliente requiere reiniciar"
+" para tomar efecto "
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
-msgstr "Fájl hozzáadása a lejátszási listához"
+msgstr "Agregar archivo a la lista de reproducción"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
-msgstr "Fájl megnyitása"
+msgstr "Abrir archivo"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
-msgstr "Hely hozzáadása a lejátszási listához"
+msgstr "Agregar ubicación de la lista de reproducción"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
-msgstr "Hely megnyitása"
+msgstr "Abrir ubicación"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
-msgstr ""
+msgstr "Cargar Pista de Audio..."
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
-msgstr ""
+msgstr "Cargar Pista de Subtitulos..."
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
-msgstr "Lejátszási lista mentése"
+msgstr "Guardar lista de reproducción"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
-msgstr "Egy GTK felület az MPV-hez"
+msgstr "Una interfaz GTK para MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
-msgstr ""
+msgstr "Sergio D. Márquez <marquez.sergio.d at gmail.com>"
diff --git a/po/fr.po b/po/fr.po
index 3693c0b..743a9e3 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -3,21 +3,21 @@
# Copyright (C) 2015 The gnome-mpv'u copyright holder
# This file is distributed under the same license as the gnome-mpv package.
# Harenome Ranaivorarivony Razanajato <harenome at hareno.me>, 2015.
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2015. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2015. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: gnome-mpv 0.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-23 10:58-0500\n"
-"PO-Revision-Date: 2017-02-25 03:55-0500\n"
-"Last-Translator: gnome-mpv <gnome-mpv at openmailbox.org>\n"
+"PO-Revision-Date: 2017-08-02 12:10-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Français\n"
+"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Zanata 3.9.6\n"
"X-Poedit-Basepath: ../src\n"
@@ -57,27 +57,27 @@ msgstr ""
msgid "Load or don't load mpv input configuration file"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Largeur de la fenêtre"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Hauteur de la fenêtre"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Afficher ou cacher la liste de lecture"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr ""
@@ -90,17 +90,30 @@ msgstr ""
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Autoriser plusieures instances"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Afficher ou cacher les contrôles"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -109,7 +122,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "Interface en GTK+ pour mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -118,27 +131,27 @@ msgid ""
"decorations (CSD) for better compatibility with non-GNOME systems."
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Fonctionnalités"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr ""
@@ -147,69 +160,77 @@ msgstr ""
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "En cours de lecture"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr ""
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr ""
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr ""
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pause"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Lecture"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Arret"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Avancer"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Reculer"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Chapitre suivant"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Chapitre précédant"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Plein écran"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pause"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Erreur"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Annuler"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Ouvrir"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -259,7 +280,7 @@ msgstr "Ouvrir un _répertoire"
msgid "_Save Playlist"
msgstr "_Enregistrer la liste de lecture"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Quitter"
@@ -267,7 +288,7 @@ msgstr "_Quitter"
msgid "_Edit"
msgstr "É_diter"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Préférences"
@@ -315,59 +336,67 @@ msgstr "Taille _Moitié"
msgid "_Help"
msgstr "_Aide"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Raccourcis clavier"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "À _propos"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "La lecture a été interrompue pour la raison suivante : %s"
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr ""
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Emplacement:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Ajouter"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Ajouter un _Emplacement"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Lire en boucle"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Liste de lecture"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Ajouter un script Lua"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Scripts Lua"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr ""
"Impossible de copier le fichier de '%s' vers '%s' pour la raison suivante : "
"%s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Aucun script Lua trouvé"
@@ -386,67 +415,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Impossible de supprimer le fichier '%s' pour la raison suivante : %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Interface utilisateur</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Activer les décorations fenêtre"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Activer le thème sombre"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Se souvenir de l'emplacement du dernier fichier ouvert"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Configuration MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Charger un fichier de configuration MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "Fichier de configuration MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Raccourcis clavier</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Charger un fichier de configuration des raccourcis clavier MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Fichier de configuration des raccourcis clavier MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Divers</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Options supplémentaires pour MPV"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Général"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Enregistrer"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Préférences"
@@ -690,46 +735,46 @@ msgstr "Lecture"
msgid "Seeking"
msgstr ""
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
#, fuzzy
msgid "Add File to Playlist"
msgstr "_Afficher la liste de lecture"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Ouvrir un fichier"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Ajouter l'emplacement à la liste de lecture"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Ouvrir un emplacement"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
#, fuzzy
msgid "Save Playlist"
msgstr "_Enregistrer la liste de lecture"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Une interface GTK pour MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Harenome Ranaivorarivony Razanajato"
diff --git a/po/hu.po b/po/hu.po
index aa2b8ff..69f6a2a 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,18 +1,19 @@
# Bendegúz Gyönki <gyonkibendeguz at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
# Bendegúz Gyönki <gyonkibendeguz at gmail.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-16 23:25+0700\n"
-"PO-Revision-Date: 2017-01-19 05:43-0500\n"
-"Last-Translator: Bendegúz Gyönki <gyonkibendeguz at gmail.com>\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Hungarian\n"
+"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -49,27 +50,27 @@ msgstr "Az mpv bemeneti konfigurációs fájl útvonala"
msgid "Load or don't load mpv input configuration file"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Az ablak szélessége"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Az ablak magassága"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "A lejátszó hangereje"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "A lejátszási lista szélessége"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr ""
@@ -82,17 +83,30 @@ msgstr ""
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Több példány engedélyezése"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr ""
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -101,7 +115,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "GTK+ felület az mpv-hez"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -116,27 +130,27 @@ msgstr ""
"kliensoldali díszítések letiltását a GNOME-tól eltérő rendszerekkel való "
"jobb kompatibilitás érdekében."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Funkciók:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Fogd és vidd lejátszási lista"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Külső mpv konfigurációs fájlok betöltése"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "MPRIS2 D-Bus interfész"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "A főablak letiltott díszítésekkel"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "A főablak megnyitott lejátszási listával"
@@ -145,71 +159,79 @@ msgstr "A főablak megnyitott lejátszási listával"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr ""
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
#, fuzzy
msgid "Show release version"
msgstr "Kiadási verzió megjelenítése"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
#, fuzzy
msgid "Enqueue"
msgstr "Sorba állítás"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Ne csatlakozzon egy már futó példányhoz"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Szünet"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Lejátszás"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Megállítás"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Előretekerés"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Visszatekerés"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Következő fejezet"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Előző fejezet"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Átváltás teljes képernyőre"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Szünet"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Hiba"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Mégse"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Megnyitás"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -259,7 +281,7 @@ msgstr "_Hely megnyitása"
msgid "_Save Playlist"
msgstr "Lejátszási lista _mentése"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Kilépés"
@@ -267,7 +289,7 @@ msgstr "_Kilépés"
msgid "_Edit"
msgstr "_Szerkesztés"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Beállítások"
@@ -315,57 +337,65 @@ msgstr "_Fele méret"
msgid "_Help"
msgstr "_Súgó"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Billentyűkombinációk"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_Névjegy"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "A lejátszás nem megfelelően lett leállítva. Ok: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Egy vagy több MPV beállítás alkalmazása nem sikerült"
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Hely:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Egy vagy több MPV beállítás alkalmazása nem sikerült"
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Hozzáadás..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "_Hely hozzáadása..."
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Ismétlés"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Lejátszási lista"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Lua parancsfájl hozzáadása"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua parancsfájlok"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "A fájl másolása innen: „%s\", ide: „%s\" nem sikerült. Ok: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Nem található Lua parancsfájl"
@@ -385,67 +415,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "„%s\" fájl törlése nem sikerült. Ok: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Felhasználói felület</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Kliensoldali díszítések engedélyezése"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Sötét téma engedélyezése"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Az utolsó fájl pozíciójának megjegyzése"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV konfiguráció</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "MPV konfigurációs fájl betöltése"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV konfigurációs fájl:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Gyorsbillentyűk</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "MPV beviteli konfigurációs fájl betöltése"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "MPV beviteli konfigurációs fájl:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Egyéb</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Extra MPV beállítások:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Általános"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Mentés"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Beállítások"
@@ -699,44 +745,44 @@ msgstr "Lejátszás"
msgid "Seeking"
msgstr "Tekerés"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Fájl hozzáadása a lejátszási listához"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Fájl megnyitása"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Hely hozzáadása a lejátszási listához"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Hely megnyitása"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Lejátszási lista mentése"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Egy GTK felület az MPV-hez"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr ""
diff --git a/po/it.po b/po/it.po
index 66b08f3..c396c95 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,18 +1,18 @@
# Dino Trevisani <c3v90 at libero.it>, 2016. #zanata
# Luca <Walach1949 at jourrapide.com>, 2017. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-16 23:25+0700\n"
-"PO-Revision-Date: 2017-05-05 01:06-0400\n"
-"Last-Translator: Luca <Walach1949 at jourrapide.com>\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Italian\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -49,27 +49,27 @@ msgstr "Percorso del file di configurazione dell'input di MPV"
msgid "Load or don't load mpv input configuration file"
msgstr "Carica il file di configurazione dell'input di MPV"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Larghezza finestra"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Altezza finestra"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Volume"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Larghezza della playlist"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Mostra o meno la playlist"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "Percorso dell'ultima cartella visualizzata"
@@ -84,17 +84,30 @@ msgstr ""
msgid "Whether or not to use floating controls in windowed mode"
msgstr "Mostra o meno i controlli fluttuanti in modalità finestra"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Permetti istanze multiple"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Mostra o meno i controlli"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -103,7 +116,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "Un frontend in GTK+ per MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -118,27 +131,27 @@ msgstr ""
" le decorazioni client-side (CSD) per una migliore compatibilità con i "
"sistemi che non usano GNOME."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Caratteristiche:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Drag and drop della playlist"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Carica un file di configurazione di MPV esterno"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "Interfaccia MPRIS2 D-Bus"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "La finestra principale con le decorazioni client-side disattivate"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "La finestra principale con la playlist visualizzata"
@@ -147,69 +160,77 @@ msgstr "La finestra principale con la playlist visualizzata"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "In riproduzione"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Mostra versione della release"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "Accoda"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Non usare un'istanza già in esecuzione"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pausa"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Riproduci"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Ferma"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Vai avanti"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Torna indietro"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Capitolo successivo"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Capitolo precedente"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Attiva la modalità a schermo intero"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pausa"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Errore"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "Annulla"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "Apri"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr "Tutti i file"
@@ -259,7 +280,7 @@ msgstr "Apri posizione"
msgid "_Save Playlist"
msgstr "Salva la playlist"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "Esci"
@@ -267,7 +288,7 @@ msgstr "Esci"
msgid "_Edit"
msgstr "Modifica"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "Preferenze"
@@ -315,57 +336,65 @@ msgstr "Dimensioni dimezzate"
msgid "_Help"
msgstr "Aiuto"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "Scorciatoie da tastiera"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "Informazioni"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "La riproduzione si è interrota in modo anomalo. Motivo: %s"
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Impossibile applicare una o più opzioni di MPV"
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Posizione:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Impossibile applicare una o più opzioni di MPV"
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "Aggiungi"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Aggiungi posizione"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Loop"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Playlist"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Aggiungi script in Lua"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Scritps in Lua"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Impossibile copiare file da '%s' a '%s'. Motivo: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Nessuno script in Lua trovato"
@@ -385,67 +414,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Impossible cancellare '%s'. Motivo: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Interfaccia utente</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Attiva le decorazioni client-side"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Attiva tema scuro"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr "Mostra i controlli fluttuanti in modalità finestra"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Ricorda l'ultimo percorso dei file"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Configurazione di MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Carica il file di configurazione di MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "File di configurazione di MPV"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Scorciatoie da tastiera</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Carica il file di configurazione dell'input di MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "File di configurazione dell'input di MPV"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Varie</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Opzioni extra per MPV"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Generale"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "Salva"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Preferenze"
@@ -689,44 +734,44 @@ msgstr "Riproduzione"
msgid "Seeking"
msgstr "Ricerca"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Aggiungi file alla playlist"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Apri file"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Aggiungi posizione alla playlist"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Apri posizione"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Salva la playlist"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Un frontend in GTK+ per MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Dino Trevisani"
diff --git a/po/ja.po b/po/ja.po
index 317363d..016777a 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -3,21 +3,21 @@
# Copyright (C) 2015 THE gnome-mpv'S COPYRIGHT HOLDER
# This file is distributed under the same license as the gnome-mpv package.
# Tista <tista.gma500 at gmail.com>, 2015.
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2015. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2015. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: gnome-mpv 0.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-23 10:58-0500\n"
-"PO-Revision-Date: 2017-06-04 08:35-0400\n"
-"Last-Translator: gnome-mpv <gnome-mpv at openmailbox.org>\n"
+"PO-Revision-Date: 2017-10-08 08:36-0400\n"
+"Last-Translator: gnome-mpv <gnome-mpv at teknik.io>\n"
"Language-Team: Japanese <>\n"
+"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Zanata 3.9.6\n"
@@ -59,27 +59,29 @@ msgstr "MPV入力設定ファイル"
msgid "Load or don't load mpv input configuration file"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
+#, fuzzy
msgid "Width of the window"
-msgstr ""
+msgstr "ウィンドウの横幅"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
+#, fuzzy
msgid "Height of the window"
-msgstr ""
+msgstr "ウィンドウの高さ"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr ""
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr ""
@@ -92,26 +94,39 @@ msgstr ""
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr ""
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
#: data/io.github.GnomeMpv.appdata.xml.in:8
#: data/io.github.GnomeMpv.desktop.in:5
msgid "GTK+ frontend for mpv"
-msgstr ""
+msgstr "MPVのGTKフロントエンド"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -120,27 +135,27 @@ msgid ""
"decorations (CSD) for better compatibility with non-GNOME systems."
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr ""
@@ -149,71 +164,84 @@ msgstr ""
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr "新しいウィンドウ"
+
+#: src/gmpv_application.c:370
+#, fuzzy
msgid "Playing"
-msgstr ""
+msgstr "プレイ中"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr ""
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr ""
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+#, fuzzy
+msgid "Create a new window"
+msgstr "新しいウィンドウを開きます"
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr ""
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+#, fuzzy
+msgid "Pause"
+msgstr "一時停止"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
+#, fuzzy
msgid "Play"
-msgstr ""
+msgstr "プレー"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
+#, fuzzy
msgid "Stop"
-msgstr ""
+msgstr "停止"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr ""
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr ""
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr ""
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr ""
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
#, fuzzy
msgid "Toggle Fullscreen"
msgstr "全面表示を切換える"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr ""
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
#, fuzzy
msgid "Error"
msgstr "エラー"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "キャンセル(_C)"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "開く(_O)"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
#, fuzzy
msgid "All Files"
msgstr "全てのファイル"
@@ -270,7 +298,7 @@ msgstr "開く場所(_L)"
msgid "_Save Playlist"
msgstr "プレイリストの保存(_S)"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "終了(_Q)"
@@ -278,7 +306,7 @@ msgstr "終了(_Q)"
msgid "_Edit"
msgstr "編集(_E)"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "設定(_P)"
@@ -287,8 +315,9 @@ msgid "_Video Track"
msgstr ""
#: src/gmpv_menu.c:251 src/gmpv_menu.c:299
+#, fuzzy
msgid "_Audio Track"
-msgstr ""
+msgstr "音声トラック (_A)"
#: src/gmpv_menu.c:252 src/gmpv_menu.c:300
msgid "S_ubtitle Track"
@@ -326,58 +355,67 @@ msgstr "半分のサイズ(_H)"
msgid "_Help"
msgstr "ヘルプ(_H)"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
#, fuzzy
msgid "_Keyboard Shortcuts"
msgstr "ショートカット"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "このアプリケーションについて(_A)"
-#: src/gmpv_mpv.c:408
-#, fuzzy, c-format
-msgid "Playback was terminated abnormally. Reason: %s."
+#: src/gmpv_menu.c:332
+msgid "_New Window"
msgstr ""
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
+#: src/gmpv_mpv.c:216
+#, fuzzy, fuzzy, fuzzy, c-format
+msgid "Playback was terminated abnormally. Reason: %s."
msgstr ""
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "場所:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr ""
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr ""
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "プレイリスト"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr ""
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
+#, fuzzy
msgid "Lua Scripts"
-msgstr ""
+msgstr "lua スクリプト"
-#: src/gmpv_plugins_manager.c:300
-#, fuzzy, c-format
+#: src/gmpv_plugins_manager.c:299
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr ""
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr ""
@@ -393,71 +431,88 @@ msgid ""
msgstr "このスクリプトを削除してもよろしいですか?このアクションを元に戻すことはできません。"
#: src/gmpv_plugins_manager_item.c:184
-#, fuzzy, c-format
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
msgstr ""
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr ""
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "CSDを有効にする"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "暗いテーマを有効にする"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr ""
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPVの設定</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "MPV設定ファイルをロードする"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV設定ファイル:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>キーバインド</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "MPV入力設定ファイルをロードする"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "MPV入力設定ファイル:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>その他</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "その他のMPVオプション:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
+#, fuzzy
msgid "General"
-msgstr ""
+msgstr "全般"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "保存(_S)"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "設定"
@@ -472,8 +527,9 @@ msgid "Open location"
msgstr "場所を開く"
#: src/gmpv_shortcuts_window.c:58
+#, fuzzy
msgid "Add file to playlist"
-msgstr ""
+msgstr "プレイリストにファイルを追加"
#: src/gmpv_shortcuts_window.c:59
msgid "Add location to playlist"
@@ -709,47 +765,47 @@ msgstr ""
msgid "Seeking"
msgstr ""
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
#, fuzzy
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr "CSDの有効・無効は再起動が必要です。"
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "プレイリストの表示・非表示"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "ファイルを開く"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr ""
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "場所を開く"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
#, fuzzy
msgid "Load Subtitle Track…"
msgstr "字幕をロードする"
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
#, fuzzy
msgid "Save Playlist"
msgstr "_プレイリストの保存"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "MPVのGTKフロントエンド"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Tista"
diff --git a/po/nl.po b/po/nl.po
index bcf2381..9391cb6 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,17 +1,18 @@
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
# wb9688 <wbertrums at gmail.com>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-16 23:25+0700\n"
-"PO-Revision-Date: 2016-11-03 05:23-0400\n"
+"PO-Revision-Date: 2017-08-02 12:10-0400\n"
"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Dutch\n"
+"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -53,28 +54,28 @@ msgstr "Pad naar mpv input configuratiebestand"
msgid "Load or don't load mpv input configuration file"
msgstr "Laad mpv input configuratiebestand wel of niet"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Breedte van het venster"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Hoogte van het venster"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
#, fuzzy
msgid "Volume of player"
msgstr "Volume van de speler"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Breedte van de afspeellijst"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Geef de afspeellijst wel of niet weer"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "URI van de map die het laatst is geraadpleegd"
@@ -88,19 +89,31 @@ msgstr "Of de instellingen al gemigreerd zijn van een vorige versie"
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-#, fuzzy
-msgid "Allow multiple instances"
-msgstr "Sta meerdere instanties to"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
#, fuzzy
msgid "Show or not show the controls"
msgstr "Geef de controls wel of niet weer"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -109,7 +122,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "GTK+ frontend voor mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -123,28 +136,28 @@ msgstr ""
" bibliotheken. GNOME MPV heeft ook een optie om client-side decoraties (CSD)"
" uit te zetten voor betere compatibiliteit met niet-GNOME systemen"
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Functies:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
#, fuzzy
msgid "Drag and drop playlist"
msgstr "Drag and drop afspeellijst"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Externe mpv configuratiebestanden laden"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Het hoofdvenster met CSD uitgeschakeld"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Het hoofdvenster met een afspeellijst open"
@@ -153,71 +166,79 @@ msgstr "Het hoofdvenster met een afspeellijst open"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "Afspelen"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Toon release versie"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
#, fuzzy
msgid "Enqueue"
msgstr "Voeg toe aan wachtrij"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
#, fuzzy
msgid "Don't connect to an already-running instance"
msgstr "Verbind niet met instanties die al draaien"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pauze"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Speel af"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Stop"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Voorwaards"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Achterwaards"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Volgend Hoofdstuk"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Vorig Hoofdstuk"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr ""
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pauze"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Fout"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Annuleren"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Open"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -267,7 +288,7 @@ msgstr "Open _Locatie"
msgid "_Save Playlist"
msgstr "_Sla Afspeellijst op"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Afsluiten"
@@ -275,7 +296,7 @@ msgstr "_Afsluiten"
msgid "_Edit"
msgstr "_Bewerken"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Instellingen"
@@ -323,58 +344,65 @@ msgstr "_Halve Grootte"
msgid "_Help"
msgstr "_Help"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr ""
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_Over"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Afspelen werd abnormaal beëindigd. Reden: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Het toepassen van een of meerdere MPV opties is mislukt."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Locatie:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Het toepassen van een of meerdere MPV opties is mislukt."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Voeg Toe…"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr ""
-#: src/gmpv_playlist_widget.c:537
-#, fuzzy
-msgid "Loop"
-msgstr "Lus"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Afspeellijst"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Voeg Lua Script toe"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua Scripts"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Bestand van '%s' naar '%s' kopiëren mislukt. Reden: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Geen Lua script gevonden"
@@ -394,69 +422,85 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Bestand '%s' verwijderen mislukt. Reden: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Gebruikersomgeving</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Schakel client-side decoratie in"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Schakel donker thema in"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Onthoud de locatie van het laatste bestand"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV Configuratie</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Laad MPV configuratiebestand"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV configuratiebestand:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Sneltoetsen</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
#, fuzzy
msgid "Load MPV input configuration file"
msgstr "Laad MPV input configuratiebestand"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
#, fuzzy
msgid "MPV input configuration file:"
msgstr "MPV input configuratiebestand:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Diversen</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Extra MPV opties:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Algemeen"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Opslaan"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Instellingen"
@@ -703,44 +747,44 @@ msgstr "Afspelen"
msgid "Seeking"
msgstr "Zoeken"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Voeg Bestand toe aan Afspeellijst"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Open Bestand"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr ""
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Open Locatie"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Sla Afspeellijst op"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Een GTK frontend voor MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr ""
diff --git a/po/pl.po b/po/pl.po
index 20e6fe2..d6ba93e 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,17 +1,18 @@
# Piotr Sokół <psokol.l10n at gmail.com>, 2016.
# Piotr Sokół <psokol.l10n at gmail.com>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
-"Project-Id-Version: gnome-mpv 0.11\n"
+"Project-Id-Version: gnome-mpv 0.12\n"
"Report-Msgid-Bugs-To: https://github.com/gnome-mpv/gnome-mpv/issues\n"
-"POT-Creation-Date: 2017-06-04 19:07+0700\n"
-"PO-Revision-Date: 2016-10-09 04:02-0400\n"
-"Last-Translator: Piotr Sokół <psokol.l10n at gmail.com>\n"
+"POT-Creation-Date: 2017-10-08 17:16-0700\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: polski <>\n"
+"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: pl\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Zanata 3.9.6\n"
@@ -50,27 +51,27 @@ msgstr "Wskazuje ścieżkę pliku konfiguracyjnego skrótów programu mpv"
msgid "Load or don't load mpv input configuration file"
msgstr "Przełącza wczytywanie pliku konfiguracyjnego skrótów programu mpv"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Określa szerokość okna"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Określa wysokość okna"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Ustala głośność odtwarzania dźwięku"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Określa szerokość listy odtwarzania"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Przełącza wyświetlanie listy odtwarzania"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "Przechowuje adres URI ostatnio używanego katalogu"
@@ -84,17 +85,30 @@ msgstr ""
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Wielokrotne wystąpienia programu"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Przełącza wyświetlanie przycisków sterujących"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -103,7 +117,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "Wykorzystuje interfejs GTK do obsługi programu MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -118,27 +132,27 @@ msgstr ""
"stronie klienta (CDS) dla lepszej integracji z systemami bez środowiska "
"GNOME."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Cechy:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "lista odtwarzania obsługująca przeciąganie plików,"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "wczytywanie zewnętrznych plików konfiguracyjnych programu mpv,"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "obsluga interfejsu D-Bus MPRIS2."
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Głowne okno programu z wyłączonym obramowaniem po stronie klienta"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Główne okno programu z listą odtwarzania"
@@ -147,69 +161,77 @@ msgstr "Główne okno programu z listą odtwarzania"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "Odtwarzanie"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Wypisuje informacje o wersji"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "Dodaje do kolejki odtwarzania"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Nie łączy z uruchomionym wystąpieniem programu"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Wstrzymuje odtwarzanie"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Rozpoczyna odtwarznie"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Zatrzymuje odtwarzanie"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Przechodzi naprzód"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Przechodzi wstecz"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Następny rozdział"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Poprzedni rozdział"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Przełącza wyświetlanie na pełnym ekranie"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Wstrzymuje odtwarzanie"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Błąd"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Anuluj"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Otwórz"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -259,7 +281,7 @@ msgstr "Otwórz położe_nie"
msgid "_Save Playlist"
msgstr "Z_apisz listę odtwarzania"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "Za_kończ"
@@ -267,7 +289,7 @@ msgstr "Za_kończ"
msgid "_Edit"
msgstr "_Edycja"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "P_referencje"
@@ -315,57 +337,65 @@ msgstr "Dwukrotnie _mniejszy rozmiar"
msgid "_Help"
msgstr "Pomo_c"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Skróty klawiszowe"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_O programie"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Zakończono odtwarzanie w nieprawidłowy sposób. Powód: %s"
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Nie udało się wprowadzić jednej lub więcej opcji MPV."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Położenie:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Nie udało się wprowadzić jednej lub więcej opcji MPV."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Dodaj..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Dodaj p_ołożenie…"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Powtarzanie"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Lista odtwarzania"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Dodawanie skryptu Lua"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Skrypty Lua"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Nie udało się skopiować pliku z położenia „%s” do „%s”. Powód: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Nie odnaleziono skryptów Lua"
@@ -383,67 +413,83 @@ msgstr "Usunąć ten skrypt? Tej czynności nie można cofnąć."
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Nie można usunąć pliku „%s”. Powód: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Interfejs użytkownika</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Obramowania okien po stronie klienta"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Ciemny styl"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Przechowywanie położenia ostatnich plików"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Konfiguracja MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Wczytywanie pliku konfiguracji MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "Plik konfiguracji MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Skróty klawiszowe</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Wczytywanie pliku konfiguracji skrótów MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Plik konfiguracji skrótów MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Różne</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Dodatkowe opcje MPV:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Ogólne"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Zapisz"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Preferencje"
@@ -687,44 +733,44 @@ msgstr "Odtwarzanie"
msgid "Seeking"
msgstr "Przeszukiwanie"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Dodawanie pliku do listy odtwarzania"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Wybór pliku"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Dodawanie położenia do listy odtwarzania"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Otwieranie położenia"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Zapisywanie listy odtwarzania"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Wykorzystuje interfejs GTK do obsługi programu MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Piotr Sokół <psokol.l10n at gmail.com>, 2016"
diff --git a/po/pt_PT.po b/po/pt_BR.po
similarity index 57%
copy from po/pt_PT.po
copy to po/pt_BR.po
index 79ee7aa..9c81c72 100644
--- a/po/pt_PT.po
+++ b/po/pt_BR.po
@@ -1,19 +1,23 @@
-# Bruno Guerreiro <american.jesus.pt at gmail.com>, 2016.
-# Bruno Guerreiro <american.jesus.pt at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
+# Israel Faustino <fds.israel at gmail.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
-"Project-Id-Version: gnome-mpv 0.11\n"
-"Report-Msgid-Bugs-To: https://github.com/gnome-mpv/gnome-mpv/issues\n"
-"POT-Creation-Date: 2017-06-04 19:07+0700\n"
-"PO-Revision-Date: 2016-11-03 05:23-0400\n"
-"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
-"Language-Team: Portuguese\n"
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-08-16 23:25+0700\n"
+"PO-Revision-Date: 2017-09-11 05:49-0400\n"
+"Last-Translator: Israel Faustino <fds.israel at gmail.com>\n"
+"Language-Team: Portuguese (Brazil)\n"
+"Language: pt-BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: pt-PT\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
#: data/org.gnome-mpv.gschema.xml:9 data/io.github.GnomeMpv.gschema.xml:16
@@ -21,87 +25,113 @@ msgid "Enable or disable dark theme"
msgstr "Ativar ou desativar tema escuro"
#: data/org.gnome-mpv.gschema.xml:15 data/io.github.GnomeMpv.gschema.xml:22
+#, fuzzy
msgid "Enable or disable client-side decorations"
-msgstr "Ativar ou desativar decorações do lado do cliente"
+msgstr "Ativar ou desativar decorações de janela"
#: data/org.gnome-mpv.gschema.xml:21 data/io.github.GnomeMpv.gschema.xml:34
+#, fuzzy
msgid ""
"Whether or not to make file chooser dialog remember last folder accessed"
-msgstr "Se deve ou não fazer diálogo de seleção lembrar ultima pasta acedida"
+msgstr ""
+"Se deseja ou não fazer o seletor de arquivos lembrar a última página "
+"acessada"
#: data/org.gnome-mpv.gschema.xml:27 data/io.github.GnomeMpv.gschema.xml:46
msgid "Options to pass to mpv"
-msgstr "Opções de mpv adicionais"
+msgstr ""
#: data/org.gnome-mpv.gschema.xml:33 data/io.github.GnomeMpv.gschema.xml:52
+#, fuzzy
msgid "Path to mpv configuration file"
-msgstr "Localização do ficheiro de configuração mpv"
+msgstr "Caminho para o arquivo de configuração do mpv"
#: data/org.gnome-mpv.gschema.xml:39 data/io.github.GnomeMpv.gschema.xml:58
+#, fuzzy
msgid "Load or don't load mpv configuration file"
-msgstr "Carregar ou não o ficheiro de configuração mpv"
+msgstr "Carregar ou não carregar o arquivo de configuração do mpv"
#: data/org.gnome-mpv.gschema.xml:45 data/io.github.GnomeMpv.gschema.xml:64
msgid "Path to mpv input configuration file"
-msgstr "Localização do ficheiro input mpv"
+msgstr "Caminho para o arquivo de atalhos do mpv"
#: data/org.gnome-mpv.gschema.xml:51 data/io.github.GnomeMpv.gschema.xml:70
+#, fuzzy
msgid "Load or don't load mpv input configuration file"
-msgstr "Carregar ou não ficheiro input mpv"
+msgstr "Carregar ou não carregar o arquivo de atalhos do mpv"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Largura da janela"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Altura da janela"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
-msgstr "Volume da aplicação"
+msgstr "Volume do reprodutor"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Largura da lista de reprodução"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
-msgstr "Mostrar ou não lista de reprodução"
+msgstr "Mostrar ou não mostrar a lista de reprodução"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
-msgstr "URI da última pasta acedida"
+msgstr "URI da última pasta acessada"
#: data/io.github.GnomeMpv.gschema.xml:10
+#, fuzzy
msgid ""
"Whether the settings has already been migrated from the previous version"
-msgstr "Se as configurações já foi migrado da versão anterior"
+msgstr "Se as configurações já migraram da versão anterior"
#: data/io.github.GnomeMpv.gschema.xml:28
+#, fuzzy
msgid "Whether or not to use floating controls in windowed mode"
+msgstr "Usar ou não usar controles flutuantes no modo janela"
+
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr "Ativar ou desativar suporte para MPRIS"
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+#, fuzzy
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
msgstr ""
+"Ativar ou desativar suporte para comandos de mídia do GNOME-Settings-Daemon"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
-msgstr ""
+msgstr "Mostrar ou não mostrar os controles"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
#: data/io.github.GnomeMpv.appdata.xml.in:8
#: data/io.github.GnomeMpv.desktop.in:5
+#, fuzzy
msgid "GTK+ frontend for mpv"
-msgstr "Interface GTK+ para mpv"
+msgstr "Interface em GTK+ para o mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
+#, fuzzy
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -109,127 +139,141 @@ msgid ""
"libraries. GNOME MPV also offers an option to disable client-side "
"decorations (CSD) for better compatibility with non-GNOME systems."
msgstr ""
-"GNOME MPV é um interface simples em GTK+ para mpv, que é um poderoso "
-"reprodutor multimédia capaz de reproduzir praticamente todos os formatos de "
-"vídeo e áudio. O projeto do GNOME MPV é baseada em GNOME HIG, embora não "
-"seja dependente de todas as bibliotecas do GNOME. GNOME MPV também oferece "
-"uma opção para desativar decorações do lado do cliente (CSD) para melhor "
-"compatibilidade com os sistemas não-GNOME."
+"GNOME MPV é uma interface simples em GTK+ para o mpv, que é um poderoso "
+"reprodutor de mídia capaz de reproduzir praticamente todos os formatos de "
+"audio e vídeo. O design do GNOME MPV é baseado no GNOME HIG, mas não "
+"depende de nenhuma biblioteca GNOME. GNOME MPV também oferece a opção de "
+"desativar as decorações de janelas independentes (client-side "
+"decorations[CSD]) para uma melhor compatibiidade com sistemas que não usam "
+"GNOME."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
-msgstr "Características:"
+msgstr "Funcionalidades:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
+#, fuzzy
msgid "Drag and drop playlist"
-msgstr "Arrastar e soltar lista de reprodução"
+msgstr "Arrastar e largar lista de reprodução"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
+#, fuzzy
msgid "Loading external mpv configuration files"
-msgstr "A carregar ficheiros de configuração mpv externos"
+msgstr "Carregar arquivos de configuração externos do mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
-msgstr "Interface MPRIS2 D-Bus"
+msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
-msgstr "Janela principal com CSD desativada"
+msgstr ""
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
-msgstr "Janela principal com lista de reprodução aberta"
+msgstr "Janela principal com a lista de reprodução aberta"
#. Translators: This is an icon name, don't translate!
#: data/io.github.GnomeMpv.desktop.in:8
msgid "gnome-mpv"
-msgstr ""
+msgstr "gnome-mpv"
+
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr "Nova Janela"
-#: src/gmpv_application.c:464
+#: src/gmpv_application.c:370
msgid "Playing"
-msgstr "A reproduzir"
+msgstr "Reproduzindo"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
+#, fuzzy
msgid "Show release version"
-msgstr ""
+msgstr "Mostrar versão"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
-msgstr ""
+msgstr "Enfileirar"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr "Criar uma nova janela"
+
+#: src/gmpv_application.c:439
+#, fuzzy
msgid "Don't connect to an already-running instance"
-msgstr ""
+msgstr "Não conectar a uma instância já em execução"
+
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pausar"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
-msgstr "Reproduzir"
+msgstr "reproduzir"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Parar"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Avançar"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
-msgstr "Recuar"
+msgstr "Retroceder"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
-msgstr "Próximo capítulo"
+msgstr "Próximo Capítulo"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
-msgstr "Capítulo anterior"
+msgstr "Capítulo Anterior"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
+#, fuzzy
msgid "Toggle Fullscreen"
-msgstr "Alternar ecrã completo"
-
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pausa"
+msgstr "Alternar Tela Cheia"
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Erro"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Cancelar"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Abrir"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
-msgstr ""
+msgstr "Todos os Arquivos"
#: src/gmpv_file_chooser.c:143
msgid "Media Files"
-msgstr ""
+msgstr "Arquivos de mídia"
#: src/gmpv_file_chooser.c:154
msgid "Audio Files"
-msgstr ""
+msgstr "Arquivos de Áudio"
#: src/gmpv_file_chooser.c:162
msgid "Video Files"
-msgstr ""
+msgstr "Arquivos de Vídeo"
#: src/gmpv_file_chooser.c:170
msgid "Image Files"
-msgstr ""
+msgstr "Arquivos de Imagem"
#: src/gmpv_file_chooser.c:180
msgid "Subtitle Files"
-msgstr ""
+msgstr "Arquivos de Legendas"
#: src/gmpv_menu.c:102
msgid "None"
@@ -242,22 +286,23 @@ msgid "Unknown"
msgstr "Desconhecido"
#: src/gmpv_menu.c:150
+#, fuzzy
msgid "_Load External…"
-msgstr "_Abrir Externo…"
+msgstr "Carregar Externo..."
#: src/gmpv_menu.c:243
msgid "_File"
-msgstr "_Ficheiro"
+msgstr "_Arquivo"
#: src/gmpv_menu.c:245 src/gmpv_menu.c:322
msgid "Open _Location"
-msgstr "Abrir _Localização"
+msgstr "Abrir_Pasta"
#: src/gmpv_menu.c:246 src/gmpv_menu.c:296
msgid "_Save Playlist"
-msgstr "_Guardar Lista de Reprodução"
+msgstr "_Salvar Lista de Reprodução"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Sair"
@@ -265,107 +310,121 @@ msgstr "_Sair"
msgid "_Edit"
msgstr "_Editar"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Preferências"
#: src/gmpv_menu.c:250 src/gmpv_menu.c:298
msgid "_Video Track"
-msgstr "_Faixa de vídeo"
+msgstr "_Faixa de Vídeo"
#: src/gmpv_menu.c:251 src/gmpv_menu.c:299
msgid "_Audio Track"
-msgstr "_Faixa de áudio"
+msgstr "_Faixa de Áudio"
#: src/gmpv_menu.c:252 src/gmpv_menu.c:300
+#, fuzzy
msgid "S_ubtitle Track"
-msgstr "Faixa de legendas"
+msgstr "_Legendas"
#: src/gmpv_menu.c:253
msgid "_View"
-msgstr "_Ver"
+msgstr "_Exibir"
#: src/gmpv_menu.c:254 src/gmpv_menu.c:293
msgid "_Toggle Controls"
-msgstr ""
+msgstr "_Exibir Controles"
#: src/gmpv_menu.c:255 src/gmpv_menu.c:295
+#, fuzzy
msgid "_Toggle Playlist"
-msgstr "_Alternar Lista de Reprodução"
+msgstr "_Exibir Lista de Reprodução"
#: src/gmpv_menu.c:256
msgid "_Fullscreen"
-msgstr "_Ecrã completo"
+msgstr "_Tela Cheia"
#: src/gmpv_menu.c:257 src/gmpv_menu.c:302
msgid "_Normal Size"
msgstr "_Tamanho Normal"
#: src/gmpv_menu.c:258 src/gmpv_menu.c:303
+#, fuzzy
msgid "_Double Size"
-msgstr "_Duplo Tamanho"
+msgstr "_Dobro"
#: src/gmpv_menu.c:259 src/gmpv_menu.c:304
+#, fuzzy
msgid "_Half Size"
-msgstr "_Metade do tamanho"
+msgstr "_Metade"
#: src/gmpv_menu.c:260
msgid "_Help"
msgstr "_Ajuda"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
+#, fuzzy
msgid "_Keyboard Shortcuts"
-msgstr ""
+msgstr "_Teclas de Atalho"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_Sobre"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
-msgstr "A reprodução foi terminada de forma anormal. Motivo: %s."
+msgstr "A reprodução foi encerrada de forma inesperada. Motivo: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Falha ao aplicar uma ou mais opções de MPV."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
-msgstr "Localização:"
+msgstr "Local:"
+
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Falha ao aplicar uma ou mais opções do MPV."
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
-msgstr "_Adicionar…"
+msgstr "_Adicionar..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
+#, fuzzy
msgid "Add _Location…"
-msgstr ""
+msgstr "Adicionar _Pasta"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Ciclo"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr "_Aleatório"
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr "Repetir"
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
-msgstr "Lista de reprodução"
+msgstr "Lista de Reprodução"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
-msgstr ""
+msgstr "Adicionar Script em Lua"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Scripts Lua"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
-msgstr "Falha ao copiar ficheiro de '%s' para '%s'. Motivo: %s"
+msgstr "Falha ao copiar arquivo de '%s' para '%s'. Motivo: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
-msgstr "Nenhum script lua encontrado"
+msgstr "nenhum script Lua encontrado"
#: src/gmpv_plugins_manager_item.c:69
msgid "Remove"
@@ -375,148 +434,173 @@ msgstr "Remover"
msgid ""
"Are you sure you want to remove this script? This action cannot be undone."
msgstr ""
-"Tem certeza que deseja remover este script? Essa ação não pode ser desfeita."
+"Tem certeza que deseja remover este script? Esta ação não poderá ser "
+"desfeita."
#: src/gmpv_plugins_manager_item.c:184
#, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
-msgstr "Falha ao excluir ficheiro '%s'. Motivo: %s"
+msgstr "Falha au deletar o arquivo %s. Motivo: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
-msgstr "<b>Interface de Utilizador<b>"
+msgstr "<b>Interface de Usuário</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
-msgstr "Ativar decorações do lado do cliente"
+msgstr "Ativar decorações de janela independentes"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Ativar tema escuro"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
-msgstr ""
+msgstr "Usar controles flutuantes no modo janela"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
-msgstr "Lembrar localizações dos últimos ficheiros"
+msgstr "Lembrar o local do último arquivo"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
-msgstr "<b>Configuração do MPV</b>"
+msgstr "<b>Configurações MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
-msgstr "Carregar ficheiro de configuração do MPV"
+msgstr "Carregar arquivo de configuração MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
-msgstr "Ficheiro de configuração do MPV:"
+msgstr "Arquivo de configuração MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
+#, fuzzy
msgid "<b>Keybindings</b>"
-msgstr "<b>Teclas de atalho</b>"
+msgstr "<b>Atalhos</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
-msgstr "Carregar ficheiro input do MPV"
+msgstr "Carregar arquivo de comandos MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
-msgstr "Ficheiro input do MPV:"
+msgstr "Arquivo de configuração MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
+#, fuzzy
msgid "<b>Miscellaneous</b>"
-msgstr "<b>Outras</b>"
+msgstr "<b>Diversos</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr "Ativar suporte para MPRIS"
+
+#: src/gmpv_preferences_dialog.c:335
+#, fuzzy
+msgid "Enable media keys support"
+msgstr "Ativar suporte para atalhos de mídia"
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
-msgstr "Opções extra do MPV:"
+msgstr "Opções MPV"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Geral"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
-msgstr "_Gravar"
+msgstr "_Salvar"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Preferências"
#: src/gmpv_shortcuts_window.c:56
msgid "Open file"
-msgstr "Abrir ficheiro"
+msgstr "Abrir arquivo"
#: src/gmpv_shortcuts_window.c:57
msgid "Open location"
-msgstr "Abrir localização"
+msgstr "Abrir pasta"
#: src/gmpv_shortcuts_window.c:58
msgid "Add file to playlist"
-msgstr ""
+msgstr "Adicionar arquivo à lista de reprodução"
#: src/gmpv_shortcuts_window.c:59
msgid "Add location to playlist"
-msgstr ""
+msgstr "Adicionar pasta à lista de reprodução"
#: src/gmpv_shortcuts_window.c:60
msgid "Show preferences dialog"
-msgstr "Mostrar dialogo de preferências"
+msgstr "Mostrar janela de preferências"
#: src/gmpv_shortcuts_window.c:61
msgid "Toggle controls"
-msgstr ""
+msgstr "_Exibir controles"
#: src/gmpv_shortcuts_window.c:62
msgid "Toggle playlist"
-msgstr "Alternar lista de reprodução"
+msgstr "_Mostrar lista de reprodução"
#: src/gmpv_shortcuts_window.c:63
msgid "Toggle fullscreen mode"
-msgstr "Alternar modo ecrã completo"
+msgstr "Alternar modo tela cheia"
#: src/gmpv_shortcuts_window.c:64
msgid "Leave fullscreen mode"
-msgstr "Deixa modo ecrã completo"
+msgstr "Sair do modo tela cheia"
#: src/gmpv_shortcuts_window.c:65
+#, fuzzy
msgid "Toggle OSD states between normal and playback time/duration"
msgstr ""
+"Aternar modos de sobreposição de tela (OSD) entre normal e tempo "
+"decorrido/duração"
#: src/gmpv_shortcuts_window.c:66
+#, fuzzy
msgid "Show filename on the OSD"
-msgstr ""
+msgstr "Exibir o nome do arquivo na tela (OSD)"
#: src/gmpv_shortcuts_window.c:67
+#, fuzzy
msgid "Show progress, elapsed time, and duration on the OSD"
-msgstr ""
+msgstr "Mostrar progresso, tempo decorrido, e a duração na tela (OSD)"
#: src/gmpv_shortcuts_window.c:70
msgid "Seek backward/forward 5 seconds"
-msgstr ""
+msgstr "Avançar/retroceder 5 segundos"
#: src/gmpv_shortcuts_window.c:71
msgid "Exact seek backward/forward 1 second"
-msgstr ""
+msgstr "Avançar/retroceder exatamente 1 segundo"
#: src/gmpv_shortcuts_window.c:72
msgid "Seek backward/forward 1 minute"
-msgstr ""
+msgstr "Avançar/retroceder 1 minuto"
#: src/gmpv_shortcuts_window.c:73
msgid "Exact seek backward/forward 5 seconds"
-msgstr ""
+msgstr "Avançar/retroceder 5 minutos"
#: src/gmpv_shortcuts_window.c:74
msgid "Seek to previous/next subtitle"
-msgstr ""
+msgstr "Alternar"
#: src/gmpv_shortcuts_window.c:75
msgid "Step backward/forward a single frame"
-msgstr ""
+msgstr "Avançar/retroceder um único quadro"
#: src/gmpv_shortcuts_window.c:76
msgid "Seek to the beginning of the previous/next chapter"
@@ -524,7 +608,7 @@ msgstr ""
#: src/gmpv_shortcuts_window.c:79
msgid "Decrease/increase playback speed by 10%"
-msgstr ""
+msgstr "Aumentar/diminuir a velocidade de reprodução em 10%"
#: src/gmpv_shortcuts_window.c:80
msgid "Halve/double current playback speed"
@@ -536,27 +620,29 @@ msgstr ""
#: src/gmpv_shortcuts_window.c:82
msgid "Go backward/forward in the playlist"
-msgstr ""
+msgstr "Avançar/retroceder na lista de reprodução"
#: src/gmpv_shortcuts_window.c:83
msgid "Remove selected playlist item"
-msgstr "Remover item de lista de reprodução selecionada"
+msgstr "Remover item selecionado da lista de reprodução"
#: src/gmpv_shortcuts_window.c:84
msgid "Save playlist"
-msgstr "Guardar lista de reprodução"
+msgstr "Salvar lista de reprodução"
#: src/gmpv_shortcuts_window.c:85
msgid "Set/clear A-B loop points"
msgstr ""
#: src/gmpv_shortcuts_window.c:86
+#, fuzzy
msgid "Toggle infinite looping"
-msgstr ""
+msgstr "Alternar modo de repetição infinita"
#: src/gmpv_shortcuts_window.c:87
+#, fuzzy
msgid "Pause or unpause"
-msgstr ""
+msgstr "Pausar"
#: src/gmpv_shortcuts_window.c:88
msgid "Quit"
@@ -564,7 +650,7 @@ msgstr "Sair"
#: src/gmpv_shortcuts_window.c:89
msgid "Save current playback position and quit"
-msgstr ""
+msgstr "Salvar posição de reprodução e sair"
#: src/gmpv_shortcuts_window.c:92
msgid "Cycle through audio tracks"
@@ -572,7 +658,7 @@ msgstr ""
#: src/gmpv_shortcuts_window.c:93 src/gmpv_shortcuts_window.c:94
msgid "Decrease/increase volume"
-msgstr ""
+msgstr "Aumentar/diminuir volume"
#: src/gmpv_shortcuts_window.c:95
msgid "Mute or unmute"
@@ -686,44 +772,44 @@ msgstr ""
msgid "Seeking"
msgstr ""
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
-msgstr "Adicionar ficheiro a lista de reprodução"
+msgstr ""
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
-msgstr "Abrir Ficheiro"
+msgstr ""
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr ""
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
-msgstr "Abrir Localização"
+msgstr ""
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
-msgstr "Guardar Lista de Reprodução"
+msgstr ""
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
-msgstr "Uma interface GTK para MPV"
+msgstr ""
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
-msgstr "Bruno Guerreiro"
+msgstr ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 79ee7aa..30fd391 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -1,18 +1,19 @@
# Bruno Guerreiro <american.jesus.pt at gmail.com>, 2016.
# Bruno Guerreiro <american.jesus.pt at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
-"Project-Id-Version: gnome-mpv 0.11\n"
+"Project-Id-Version: gnome-mpv 0.12\n"
"Report-Msgid-Bugs-To: https://github.com/gnome-mpv/gnome-mpv/issues\n"
-"POT-Creation-Date: 2017-06-04 19:07+0700\n"
-"PO-Revision-Date: 2016-11-03 05:23-0400\n"
+"POT-Creation-Date: 2017-10-08 17:16-0700\n"
+"PO-Revision-Date: 2017-08-02 12:10-0400\n"
"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Portuguese\n"
+"Language: pt-PT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: pt-PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Zanata 3.9.6\n"
@@ -49,27 +50,27 @@ msgstr "Localização do ficheiro input mpv"
msgid "Load or don't load mpv input configuration file"
msgstr "Carregar ou não ficheiro input mpv"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Largura da janela"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Altura da janela"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Volume da aplicação"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Largura da lista de reprodução"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Mostrar ou não lista de reprodução"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "URI da última pasta acedida"
@@ -82,17 +83,30 @@ msgstr "Se as configurações já foi migrado da versão anterior"
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr ""
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -101,7 +115,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "Interface GTK+ para mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -116,27 +130,27 @@ msgstr ""
"uma opção para desativar decorações do lado do cliente (CSD) para melhor "
"compatibilidade com os sistemas não-GNOME."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Características:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Arrastar e soltar lista de reprodução"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "A carregar ficheiros de configuração mpv externos"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "Interface MPRIS2 D-Bus"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Janela principal com CSD desativada"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Janela principal com lista de reprodução aberta"
@@ -145,69 +159,77 @@ msgstr "Janela principal com lista de reprodução aberta"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "A reproduzir"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr ""
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr ""
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr ""
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pausa"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Reproduzir"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Parar"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Avançar"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Recuar"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Próximo capítulo"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Capítulo anterior"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Alternar ecrã completo"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pausa"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Erro"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Cancelar"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Abrir"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -257,7 +279,7 @@ msgstr "Abrir _Localização"
msgid "_Save Playlist"
msgstr "_Guardar Lista de Reprodução"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Sair"
@@ -265,7 +287,7 @@ msgstr "_Sair"
msgid "_Edit"
msgstr "_Editar"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Preferências"
@@ -313,57 +335,65 @@ msgstr "_Metade do tamanho"
msgid "_Help"
msgstr "_Ajuda"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr ""
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_Sobre"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "A reprodução foi terminada de forma anormal. Motivo: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Falha ao aplicar uma ou mais opções de MPV."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Localização:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Falha ao aplicar uma ou mais opções de MPV."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Adicionar…"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr ""
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Ciclo"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Lista de reprodução"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr ""
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Scripts Lua"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Falha ao copiar ficheiro de '%s' para '%s'. Motivo: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Nenhum script lua encontrado"
@@ -382,67 +412,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Falha ao excluir ficheiro '%s'. Motivo: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Interface de Utilizador<b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Ativar decorações do lado do cliente"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Ativar tema escuro"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Lembrar localizações dos últimos ficheiros"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Configuração do MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Carregar ficheiro de configuração do MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "Ficheiro de configuração do MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Teclas de atalho</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Carregar ficheiro input do MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Ficheiro input do MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Outras</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Opções extra do MPV:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Geral"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Gravar"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Preferências"
@@ -686,44 +732,44 @@ msgstr ""
msgid "Seeking"
msgstr ""
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Adicionar ficheiro a lista de reprodução"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Abrir Ficheiro"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr ""
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Abrir Localização"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Guardar Lista de Reprodução"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "Uma interface GTK para MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Bruno Guerreiro"
diff --git a/po/ru.po b/po/ru.po
index e73d19e..17e6946 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,18 +1,19 @@
# Maxim Orlov <murmansksity at gmail.com>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
# Maxim Orlov <murmansksity at gmail.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: 0.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-01-04 00:00+0700\n"
-"PO-Revision-Date: 2017-06-01 12:32-0400\n"
-"Last-Translator: Maxim Orlov <murmansksity at gmail.com>\n"
+"PO-Revision-Date: 2017-08-02 12:10-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Russian\n"
+"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: ru\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -49,27 +50,27 @@ msgstr "Путь к файлу конфигурации ввода MPV"
msgid "Load or don't load mpv input configuration file"
msgstr "Загрузить файл конфигурации ввода MPV"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Ширина окна"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Высота окна"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Громкость плеера"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Ширина списка воспроизведения"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Показать или скрыть список воспроизведения"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "Адрес последнего открытого файла"
@@ -82,17 +83,30 @@ msgstr "Перенос (миграция) пользовательских на
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Разрешить запуск нескольких экземпляров"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Показать или не показывать элементы управления"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -101,7 +115,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "GTK+ интерфейс для MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -115,27 +129,27 @@ msgstr ""
"предлагает опцию, чтобы отключить декорирование на стороне клиента (CSD) для"
" лучшей совместимости с системами, отличными от GNOME."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Возможности:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Поддержка Drag'n'Drop"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Загрузка внешних конфигурационных файлов MPV"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "Интерфейс MPRIS2 D-Bus"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Главное окно с отключённым CSD"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Главное окно с открытым списком воспроизведения"
@@ -144,69 +158,77 @@ msgstr "Главное окно с открытым списком воспро
msgid "gnome-mpv"
msgstr "gnome-mpv"
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "Воспроизводится"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Показать версию релиза"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "Поставить в очередь"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Не подключаться к уже работающему экземпляру"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Приостановить"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Воспроизвести"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Остановить"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Перемотать вперёд"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Перемотать назад"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Следующая глава"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Предыдущая глава"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Переход в полноэкранный режим и обратно"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Приостановить"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Ошибка"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Отмена"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Открыть"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr "Все файлы"
@@ -256,7 +278,7 @@ msgstr "Открыть _адрес"
msgid "_Save Playlist"
msgstr "_Сохранить список воспроизведения"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Выйти"
@@ -264,7 +286,7 @@ msgstr "_Выйти"
msgid "_Edit"
msgstr "_Правка"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Настройки"
@@ -312,57 +334,65 @@ msgstr "_Половинный размер"
msgid "_Help"
msgstr "_Справка"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "Комбинации клавиш"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_О программе"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Воспроизведение было прекращено. Причина: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Не удалось применить одну или несколько опций MPV."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Адрес:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Не удалось применить одну или несколько опций MPV."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Добавить…"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Добавить _Адрес…"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Повторить"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Список воспроизведения"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Добавить Lua скрипт"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua скрипты"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Не удалось скопировать файл из '%s' в '%s'. Причина: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Пусто"
@@ -382,67 +412,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Не удалось удалить файл '%s'. Причина: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Пользовательский интерфейс</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Включить декорирование на стороне клиента"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Использовать тёмный вариант темы"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Запомнить последнее расположение файла(ов)"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>Конфигурация MPV</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Загрузить файл конфигурации MPV"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "Файл конфигурации MPV:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Комбинации клавиш</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Загрузить файл конфигурации ввода MPV"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "Файл конфигурации ввода MPV:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Разное</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Дополнительные опции MPV:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Общие"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Сохранить"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Настройки"
@@ -686,44 +732,44 @@ msgstr "Воспроизведение"
msgid "Seeking"
msgstr "Переход"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Добавить файл в список воспроизведения"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Открыть файл"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Добавить адрес в список воспроизведения"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Открыть адрес"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr "Загрузить звуковую дорожку…"
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr "Загрузить субтитры…"
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Сохранить список воспроизведения"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "GTK интерфейс для MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Maxim Orlov <murmansksity at gmail.com>, 2016."
diff --git a/po/sr_RS.po b/po/sr.po
similarity index 84%
rename from po/sr_RS.po
rename to po/sr.po
index 670a63a..8bc3c6a 100644
--- a/po/sr_RS.po
+++ b/po/sr.po
@@ -1,16 +1,16 @@
-# leipero <lei.pero at gmail.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
-"Project-Id-Version: gnome-mpv 0.11\n"
+"Project-Id-Version: gnome-mpv 0.12\n"
"Report-Msgid-Bugs-To: https://github.com/gnome-mpv/gnome-mpv/issues\n"
-"POT-Creation-Date: 2017-06-04 19:07+0700\n"
-"PO-Revision-Date: 2017-02-23 05:55-0500\n"
-"Last-Translator: leipero <lei.pero at gmail.com>\n"
+"POT-Creation-Date: 2017-07-12 12:38+0700\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Serbian (Cyrillic)\n"
+"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: sr-Cyrl\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -49,27 +49,27 @@ msgstr "Путања до mpv конфигурационе датотеке ун
msgid "Load or don't load mpv input configuration file"
msgstr "Дозвољава учитавање mpv конфигурационе датотеке уноса"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Ширина прозора"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Висина прозора"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Јачина звука"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Ширина листе пуштања"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Прикажи листу пуштања"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "URI последње приступљеног директоријума"
@@ -82,17 +82,30 @@ msgstr "Да ли су поставке већ пренете из претхо
msgid "Whether or not to use floating controls in windowed mode"
msgstr "Користи пливајуће контроле у режиму прозора"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Дозволи вишеструке примерке"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Дозвољава приказ контрола"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -101,7 +114,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "GTK+ прочеље за mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -115,27 +128,27 @@ msgstr ""
"GNOME MPV такође нуди опцију онемогућавања декорација клијента (CSD) због "
"компатибилности с другим окружењима."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Могућности:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Превуци и отпусти листу пуштања"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Учитавам спољне mpv конфигурационе датотеке"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "MPRIS2 D-Bus сучеље"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Главни прозор са онемогућеним CSD-ом"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Главни прозор са отвореном листом пуштања"
@@ -144,69 +157,77 @@ msgstr "Главни прозор са отвореном листом пушт
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "Репродукција"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Прикажи верзију издања"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "Нанижи"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Не повезуј на већ покренут примерак"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Паузирај"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Пусти"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Заустави"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Напред"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Назад"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Следеће Поглавље"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Претходно Поглавље"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Цео Екран"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Паузирај"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Грешка"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Откажи"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Отвори"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr "Све Датотеке"
@@ -256,7 +277,7 @@ msgstr "Отвори_Локацију"
msgid "_Save Playlist"
msgstr "_Сачувај Листу Пуштања"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Напусти"
@@ -264,7 +285,7 @@ msgstr "_Напусти"
msgid "_Edit"
msgstr "_Уреди"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Поставке"
@@ -312,57 +333,65 @@ msgstr "_Упола Величине"
msgid "_Help"
msgstr "_Помоћ"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Пречице Тастатуре"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_О Нама"
-#: src/gmpv_mpv.c:408
-#, fuzzy, c-format
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Репродукција је неправилно окончана. Разлог: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Неуспешна примена једне или више MPV опција."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Локација:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Неуспешна примена једне или више MPV опција."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Додај..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Додај_Локацију..."
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Понављај"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Листа Пуштања"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Додај Lua Скрипту"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua Скрипте"
-#: src/gmpv_plugins_manager.c:300
-#, fuzzy, c-format
+#: src/gmpv_plugins_manager.c:299
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Неуспешно копирање датотеке из '%s' у '%s'. Разлог: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Lua скрипта није нађена"
@@ -377,71 +406,87 @@ msgstr ""
"Сигурно желите да уклоните ову скрипту? Овај поступак не може бити опозван."
#: src/gmpv_plugins_manager_item.c:184
-#, fuzzy, c-format
+#, fuzzy, fuzzy, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Неуспешно брисање датотеке '%s'. Разлог: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Корисничко Сучеље</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Омогући украсе клијента"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Омогући тамну тему"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr "Користи пливајуће контроле у режиму прозора"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Упамти локацију последње датотеке"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV Конфигурација</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Учитај MPV конфигурациону датотеку"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV конфигурациона датотека:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Поставке Уноса</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Учитај MPV конфигурациону датотеку уноса"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "MPV конфигурациона датотека уноса:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Остало</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Додатне MPV опције:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Опште"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Сачувај"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Поставке"
@@ -686,44 +731,44 @@ msgstr "Репродукција"
msgid "Seeking"
msgstr "Трагање"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Додај Датотеку у Листу Пуштања"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Отвори Датотеку"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Додај Локацију у Листу Пуштања"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Отвори Локацију"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Сачувај Листу Пуштања"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "GTK прочеље за MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Срђан С."
diff --git a/po/sr_RS at latin.po b/po/sr at latin.po
similarity index 81%
copy from po/sr_RS at latin.po
copy to po/sr at latin.po
index 5fa80cd..cb86c70 100644
--- a/po/sr_RS at latin.po
+++ b/po/sr at latin.po
@@ -1,16 +1,16 @@
-# leipero <lei.pero at gmail.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
-"Project-Id-Version: gnome-mpv 0.11\n"
+"Project-Id-Version: gnome-mpv 0.12\n"
"Report-Msgid-Bugs-To: https://github.com/gnome-mpv/gnome-mpv/issues\n"
-"POT-Creation-Date: 2017-06-04 19:07+0700\n"
-"PO-Revision-Date: 2017-02-23 05:54-0500\n"
-"Last-Translator: leipero <lei.pero at gmail.com>\n"
+"POT-Creation-Date: 2017-07-12 12:38+0700\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: Serbian (Latin)\n"
+"Language: sr at latin\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: sr-Latn\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
"X-Generator: Zanata 3.9.6\n"
@@ -49,27 +49,27 @@ msgstr "Putanja do mpv konfiguracione datoteke unosa"
msgid "Load or don't load mpv input configuration file"
msgstr "Dozvoljava učitavanje mpv konfiguracione datoteke unosa"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "Širina prozora"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "Visina prozora"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "Jačina zvuka"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "Širina liste puštanja"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "Prikaži listu puštanja"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "URI poslednje pristupljenog direktorijuma"
@@ -82,17 +82,30 @@ msgstr "Da li su postavke već prenete iz prethodne verzije"
msgid "Whether or not to use floating controls in windowed mode"
msgstr "Koristiti plivajuće kontrole u režimu prozora"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Dozvoli višestruke primerke"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "Dozvoljava prikaz kontrola"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -101,7 +114,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "GTK+ pročelje za mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -115,27 +128,27 @@ msgstr ""
"biblioteke. GNOME MPV takođe nudi opciju onemogućavanja dekoracija klijenta "
"(CSD) zbog kompatibilnosti s drugim okruženjima."
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "Mogućnosti:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "Prevuci i otpusti listu puštanja"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "Učitavam spoljne mpv konfiguracione datoteke"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "MPRIS2 D-Bus sučelje"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "Glavni prozor sa onemogućenim CSD-om"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "Glavni prozor sa otvorenom listom puštanja"
@@ -144,69 +157,77 @@ msgstr "Glavni prozor sa otvorenom listom puštanja"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "Reprodukcija"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "Prikaži verziju izdanja"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "Naniži"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "Ne povezuj na već pokrenut primerak"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Pauziraj"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "Pusti"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "Zaustavi"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "Napred"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "Nazad"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "Sledeće Poglavlje"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "Prethodno Poglavlje"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "Ceo Ekran"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pauziraj"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "Greška"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "_Otkaži"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "_Otvori"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr "Sve Datoteke"
@@ -256,7 +277,7 @@ msgstr "Otvori_Lokaciju"
msgid "_Save Playlist"
msgstr "_Sačuvaj Listu Puštanja"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "_Napusti"
@@ -264,7 +285,7 @@ msgstr "_Napusti"
msgid "_Edit"
msgstr "_Uredi"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "_Postavke"
@@ -312,57 +333,65 @@ msgstr "_Upola Veličine"
msgid "_Help"
msgstr "_Pomoć"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "_Prečice Tastature"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "_O Nama"
-#: src/gmpv_mpv.c:408
-#, fuzzy, c-format
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
+#, fuzzy, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "Reprodukcija je nepravilno okončana. Razlog: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Neuspešna primena jedne ili više MPV opcija."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "Lokacija:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Neuspešna primena jedne ili više MPV opcija."
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "_Dodaj..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "Dodaj_Lokaciju..."
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Ponavljaj"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "Lista Puštanja"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "Dodaj Lua Skriptu"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua Skripte"
-#: src/gmpv_plugins_manager.c:300
-#, fuzzy, c-format
+#: src/gmpv_plugins_manager.c:299
+#, fuzzy, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "Neuspešno kopiranje datoteke iz '%s' u '%s'. Razlog: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "Lua skripta nije nađena"
@@ -377,71 +406,87 @@ msgstr ""
"Sigurno želite da uklonite ovu skriptu? Ovaj postupak ne može biti opozvan."
#: src/gmpv_plugins_manager_item.c:184
-#, fuzzy, c-format
+#, fuzzy, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "Neuspešno brisanje datoteke '%s'. Razlog: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>Korisničko Sučelje</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "Omogući ukrase klijenta"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "Omogući tamnu temu"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr "Koristi plivajuće kontrole u režimu prozora"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "Upamti lokaciju poslednje datoteke"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV Konfiguracija</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "Učitaj MPV konfiguracionu datoteku"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV konfiguraciona datoteka:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>Postavke Unosa</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "Učitaj MPV konfiguracionu datoteku"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "MPV konfiguraciona datoteka unosa:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>Ostalo</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "Dodatne MPV opcije:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "Opšte"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "_Sačuvaj"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "Postavke"
@@ -686,44 +731,44 @@ msgstr "Reprodukcija"
msgid "Seeking"
msgstr "Traganje"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "Dodaj Datoteku u Listu Puštanja"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "Otvori Datoteku"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "Dodaj Lokaciju u Listu Puštnja"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "Otvori Lokaciju"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "Sačuvaj Listu Puštanja"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "GTK pročelje za MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr "Srđan S."
diff --git a/po/sr_RS at latin.po b/po/sv.po
similarity index 51%
rename from po/sr_RS at latin.po
rename to po/sv.po
index 5fa80cd..6117256 100644
--- a/po/sr_RS at latin.po
+++ b/po/sv.po
@@ -1,107 +1,122 @@
-# leipero <lei.pero at gmail.com>, 2017. #zanata
+# Patrik Nilsson <translation at hembas.se>, 2017. #zanata
msgid ""
msgstr ""
-"Project-Id-Version: gnome-mpv 0.11\n"
+"Project-Id-Version: gnome-mpv 0.12\n"
"Report-Msgid-Bugs-To: https://github.com/gnome-mpv/gnome-mpv/issues\n"
-"POT-Creation-Date: 2017-06-04 19:07+0700\n"
-"PO-Revision-Date: 2017-02-23 05:54-0500\n"
-"Last-Translator: leipero <lei.pero at gmail.com>\n"
-"Language-Team: Serbian (Latin)\n"
+"POT-Creation-Date: 2017-10-08 17:16-0700\n"
+"PO-Revision-Date: 2017-09-14 08:54-0400\n"
+"Last-Translator: Patrik Nilsson <translation at hembas.se>\n"
+"Language-Team: Swedish\n"
+"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: sr-Latn\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Zanata 3.9.6\n"
#: data/org.gnome-mpv.gschema.xml:9 data/io.github.GnomeMpv.gschema.xml:16
msgid "Enable or disable dark theme"
-msgstr "Omogući ili onemogući tamnu temu"
+msgstr "Aktivera eller inaktivera mörkt tema"
#: data/org.gnome-mpv.gschema.xml:15 data/io.github.GnomeMpv.gschema.xml:22
msgid "Enable or disable client-side decorations"
-msgstr "Omogući ili onemogući ukrase klijenta"
+msgstr "Aktivera eller inaktivera fönsterdekorationer i klienten"
#: data/org.gnome-mpv.gschema.xml:21 data/io.github.GnomeMpv.gschema.xml:34
msgid ""
"Whether or not to make file chooser dialog remember last folder accessed"
msgstr ""
-"Dozvoljava dijalogu birača datoteka da upamti poslednje pristupljen "
-"direktorijum"
+"Om dialogrutan för val av filer ska komma ihåg den senast använda mappen "
+"eller inte"
#: data/org.gnome-mpv.gschema.xml:27 data/io.github.GnomeMpv.gschema.xml:46
msgid "Options to pass to mpv"
-msgstr "Opcije koje treba preneti na mpv"
+msgstr "Alternativ att skicka vidare till mpv"
#: data/org.gnome-mpv.gschema.xml:33 data/io.github.GnomeMpv.gschema.xml:52
msgid "Path to mpv configuration file"
-msgstr "Putanja do mpv konfiguracione datoteke"
+msgstr "Sökväg till mpv konfigurationsfil"
#: data/org.gnome-mpv.gschema.xml:39 data/io.github.GnomeMpv.gschema.xml:58
msgid "Load or don't load mpv configuration file"
-msgstr "Dozvoljava učitavanje mpv konfiguracione datoteke"
+msgstr "Läs eller läs ej in mpv konfigurationsfil"
#: data/org.gnome-mpv.gschema.xml:45 data/io.github.GnomeMpv.gschema.xml:64
msgid "Path to mpv input configuration file"
-msgstr "Putanja do mpv konfiguracione datoteke unosa"
+msgstr "Sökväg till konfigurationsfil för mpv tangentbindningar"
#: data/org.gnome-mpv.gschema.xml:51 data/io.github.GnomeMpv.gschema.xml:70
msgid "Load or don't load mpv input configuration file"
-msgstr "Dozvoljava učitavanje mpv konfiguracione datoteke unosa"
+msgstr "Läs eller läs ej in konfigurationsfil för mpv tangentbindningar"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
-msgstr "Širina prozora"
+msgstr "Fönsterbredd"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
-msgstr "Visina prozora"
+msgstr "Fönsterhöjd"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
-msgstr "Jačina zvuka"
+msgstr "Volym för spelaren"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
-msgstr "Širina liste puštanja"
+msgstr "Spellistans bredd"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
-msgstr "Prikaži listu puštanja"
+msgstr "Visa eller visa ej spellistan"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
-msgstr "URI poslednje pristupljenog direktorijuma"
+msgstr "URI för den senast använda mappen"
#: data/io.github.GnomeMpv.gschema.xml:10
msgid ""
"Whether the settings has already been migrated from the previous version"
-msgstr "Da li su postavke već prenete iz prethodne verzije"
+msgstr "Om inställningarna redan har migrerats från den föregående versionen"
#: data/io.github.GnomeMpv.gschema.xml:28
msgid "Whether or not to use floating controls in windowed mode"
-msgstr "Koristiti plivajuće kontrole u režimu prozora"
+msgstr "Om flytande kontroller ska aktiveras i fönsterläge eller inte"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "Dozvoli višestruke primerke"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr "Om stöd för MPRIS ska aktiveras eller inte"
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+"Om stöd för GNOME-Settings-Daemon-baserade media knappar ska aktiveras eller"
+" inte"
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
-msgstr "Dozvoljava prikaz kontrola"
+msgstr "Visa eller visa ej kontrollerna"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
#: data/io.github.GnomeMpv.appdata.xml.in:8
#: data/io.github.GnomeMpv.desktop.in:5
msgid "GTK+ frontend for mpv"
-msgstr "GTK+ pročelje za mpv"
+msgstr "GTK+ gränssnitt för mpv"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -109,562 +124,595 @@ msgid ""
"libraries. GNOME MPV also offers an option to disable client-side "
"decorations (CSD) for better compatibility with non-GNOME systems."
msgstr ""
-"GNOME MPV je jednostavno GTK+ pročelje za mpv, koji je veoma moćan "
-"prikazivač sposoban da pusti praktično sve video i audio formate. Dizajn "
-"GNOME MPV-a je baziran na GNOME HIG, ali je nezavistan od bilo koje GNOME "
-"biblioteke. GNOME MPV takođe nudi opciju onemogućavanja dekoracija klijenta "
-"(CSD) zbog kompatibilnosti s drugim okruženjima."
-
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+"GNOME MPV är ett enkelt GTK+ drivet gränssnitt för mpv, som är en väldigt "
+"kraftfull mediaspelare kapabel att spela upp i princip alla video och ljud "
+"format. Utformningen av GNOME MPV är baserat på GNOME HIG, dock är det inte "
+"beroende av några GNOME bibliotek. GNOME MPV erbjuder även som alternativ "
+"att inaktivera fönsterdekorationer i klienten (CSD) för bättre "
+"kompatibilitet med icke-GNOME system. "
+
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
-msgstr "Mogućnosti:"
+msgstr "Funktioner:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
-msgstr "Prevuci i otpusti listu puštanja"
+msgstr "Dra och släpp spellista"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
-msgstr "Učitavam spoljne mpv konfiguracione datoteke"
+msgstr "Läser in externa mpv konfigurationsfiler"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
-msgstr "MPRIS2 D-Bus sučelje"
+msgstr "MPRIS2 D-Bus gränssnitt"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
-msgstr "Glavni prozor sa onemogućenim CSD-om"
+msgstr "Huvudfönstret med CSD inaktiverat"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
-msgstr "Glavni prozor sa otvorenom listom puštanja"
+msgstr "Huvudfönstret med spellista öppen"
#. Translators: This is an icon name, don't translate!
#: data/io.github.GnomeMpv.desktop.in:8
msgid "gnome-mpv"
-msgstr ""
+msgstr "gnome-mpv"
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr "Nytt fönster"
+
+#: src/gmpv_application.c:370
msgid "Playing"
-msgstr "Reprodukcija"
+msgstr "Spelar"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
-msgstr "Prikaži verziju izdanja"
+msgstr "Visa utgivningsversion"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
-msgstr "Naniži"
+msgstr "Lägg till i kö"
+
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr "Skapa ett nytt fönster"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
-msgstr "Ne povezuj na već pokrenut primerak"
+msgstr "Anslut inte till en instans som redan körs"
+
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "Paus"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
-msgstr "Pusti"
+msgstr "Spela upp"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
-msgstr "Zaustavi"
+msgstr "Stopp"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
-msgstr "Napred"
+msgstr "Framåt"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
-msgstr "Nazad"
+msgstr "Spola tillbaka"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
-msgstr "Sledeće Poglavlje"
+msgstr "Nästa kapitel"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
-msgstr "Prethodno Poglavlje"
+msgstr "Föregående kapitel"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
-msgstr "Ceo Ekran"
+msgstr "Växla helskärm"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "Pauziraj"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
-msgstr "Greška"
+msgstr "Fel"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
-msgstr "_Otkaži"
+msgstr "_Avbryt"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
-msgstr "_Otvori"
+msgstr "_Öppna"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
-msgstr "Sve Datoteke"
+msgstr "Alla filer"
#: src/gmpv_file_chooser.c:143
msgid "Media Files"
-msgstr ""
+msgstr "Mediefiler"
#: src/gmpv_file_chooser.c:154
msgid "Audio Files"
-msgstr ""
+msgstr "Ljudfiler"
#: src/gmpv_file_chooser.c:162
msgid "Video Files"
-msgstr ""
+msgstr "Videofiler"
#: src/gmpv_file_chooser.c:170
msgid "Image Files"
-msgstr ""
+msgstr "Bildfiler"
#: src/gmpv_file_chooser.c:180
msgid "Subtitle Files"
-msgstr ""
+msgstr "Undertextfiler"
#: src/gmpv_menu.c:102
msgid "None"
-msgstr "Nijedan"
+msgstr "Inga"
#. For simplicity, also dup the default string used when the
#. * track has no title.
#: src/gmpv_menu.c:117
msgid "Unknown"
-msgstr "Nepoznato"
+msgstr "Okänd"
#: src/gmpv_menu.c:150
msgid "_Load External…"
-msgstr "_Učitaj Spoljne..."
+msgstr "_Öppna externt..."
#: src/gmpv_menu.c:243
msgid "_File"
-msgstr "_Datoteka"
+msgstr "_Fil"
#: src/gmpv_menu.c:245 src/gmpv_menu.c:322
msgid "Open _Location"
-msgstr "Otvori_Lokaciju"
+msgstr "Öppna _Plats"
#: src/gmpv_menu.c:246 src/gmpv_menu.c:296
msgid "_Save Playlist"
-msgstr "_Sačuvaj Listu Puštanja"
+msgstr "_Spara spellista"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
-msgstr "_Napusti"
+msgstr "_Avsluta"
#: src/gmpv_menu.c:248
msgid "_Edit"
-msgstr "_Uredi"
+msgstr "_Redigera"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
-msgstr "_Postavke"
+msgstr "_Inställningar"
#: src/gmpv_menu.c:250 src/gmpv_menu.c:298
msgid "_Video Track"
-msgstr "_Video Snimak"
+msgstr "_Videospår"
#: src/gmpv_menu.c:251 src/gmpv_menu.c:299
msgid "_Audio Track"
-msgstr "_Audio Snimak"
+msgstr "_Ljudspår"
#: src/gmpv_menu.c:252 src/gmpv_menu.c:300
msgid "S_ubtitle Track"
-msgstr "_Prevod"
+msgstr "_Undertext-spår"
#: src/gmpv_menu.c:253
msgid "_View"
-msgstr "_Pregled"
+msgstr "_Visa"
#: src/gmpv_menu.c:254 src/gmpv_menu.c:293
msgid "_Toggle Controls"
-msgstr "_Prikaži Kontrole"
+msgstr "_Visa/dölj kontroller"
#: src/gmpv_menu.c:255 src/gmpv_menu.c:295
msgid "_Toggle Playlist"
-msgstr "_Prikaži Listu Puštanja"
+msgstr "Visa/dölj _spellista"
#: src/gmpv_menu.c:256
msgid "_Fullscreen"
-msgstr "_Ceo Ekran"
+msgstr "_Helskärm"
#: src/gmpv_menu.c:257 src/gmpv_menu.c:302
msgid "_Normal Size"
-msgstr "_Normalna Veličina"
+msgstr "_Normal storlek"
#: src/gmpv_menu.c:258 src/gmpv_menu.c:303
msgid "_Double Size"
-msgstr "_Dvostruka Veličina"
+msgstr "_Dubbel storlek"
#: src/gmpv_menu.c:259 src/gmpv_menu.c:304
msgid "_Half Size"
-msgstr "_Upola Veličine"
+msgstr "_Halv storlek"
#: src/gmpv_menu.c:260
msgid "_Help"
-msgstr "_Pomoć"
+msgstr "_Hjälp"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
-msgstr "_Prečice Tastature"
+msgstr "_Kortkommandon"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
-msgstr "_O Nama"
+msgstr "_Om"
+
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
-#: src/gmpv_mpv.c:408
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
-msgstr "Reprodukcija je nepravilno okončana. Razlog: %s."
+msgstr "Där uppstod ett onormalt avbrott under uppspelningen. Anledning: %s."
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "Neuspešna primena jedne ili više MPV opcija."
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
-msgstr "Lokacija:"
+msgstr "Plats:"
+
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "Misslyckades att tillämpa en eller flera MPV alternativ."
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
-msgstr "_Dodaj..."
+msgstr "_Lägg till..."
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
-msgstr "Dodaj_Lokaciju..."
+msgstr "Lägg till _plats:"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "Ponavljaj"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr "_Blanda"
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr "_Upprepa"
+
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
-msgstr "Lista Puštanja"
+msgstr "Spellista"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
-msgstr "Dodaj Lua Skriptu"
+msgstr "Lägg till lua-skript"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
-msgstr "Lua Skripte"
+msgstr "Lua-skript"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
-msgstr "Neuspešno kopiranje datoteke iz '%s' u '%s'. Razlog: %s"
+msgstr "Misslyckades att kopiera filen från '%s' till '%s'. Anledning: %s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
-msgstr "Lua skripta nije nađena"
+msgstr "Inget lua-skript hittades"
#: src/gmpv_plugins_manager_item.c:69
msgid "Remove"
-msgstr "Ukloni"
+msgstr "Ta bort"
#: src/gmpv_plugins_manager_item.c:163
msgid ""
"Are you sure you want to remove this script? This action cannot be undone."
msgstr ""
-"Sigurno želite da uklonite ovu skriptu? Ovaj postupak ne može biti opozvan."
+"Är du säker på att du vill ta bort detta skriptet? Denna åtgärden kan inte "
+"ångras."
#: src/gmpv_plugins_manager_item.c:184
#, fuzzy, c-format
msgid "Failed to delete file '%s'. Reason: %s"
-msgstr "Neuspešno brisanje datoteke '%s'. Razlog: %s"
+msgstr "Misslyckades att radera filen '%s'. Anledning: %s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
-msgstr "<b>Korisničko Sučelje</b>"
+msgstr "<b>Användargränssnitt</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
-msgstr "Omogući ukrase klijenta"
+msgstr "Aktivera fönsterdekorationer i klienten"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
-msgstr "Omogući tamnu temu"
+msgstr "Aktivera mörkt tema"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
-msgstr "Koristi plivajuće kontrole u režimu prozora"
+msgstr "Använd flytande kontroller i fönsterläge"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
-msgstr "Upamti lokaciju poslednje datoteke"
+msgstr "Kom ihåg senaste filens plats"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
-msgstr "<b>MPV Konfiguracija</b>"
+msgstr "<b>MPV Konfiguration</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
-msgstr "Učitaj MPV konfiguracionu datoteku"
+msgstr "Öppna MPV konfigurationsfil"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
-msgstr "MPV konfiguraciona datoteka:"
+msgstr "MPV konfigurationsfil:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
-msgstr "<b>Postavke Unosa</b>"
+msgstr "<b>Tangentbindningar</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
-msgstr "Učitaj MPV konfiguracionu datoteku"
+msgstr "Öppna MPV konfigurationsfil för tangentbindningar"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
-msgstr "MPV konfiguraciona datoteka unosa:"
+msgstr "MPV konfigurationsfil för tangentbindningar:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
-msgstr "<b>Ostalo</b>"
+msgstr "<b>Diverse</b>"
+
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr "Aktivera stöd för MPRIS"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr "Aktivera stöd för media knappar"
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
-msgstr "Dodatne MPV opcije:"
+msgstr "Extra MPV alternativ:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
-msgstr "Opšte"
+msgstr "Allmänt"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
-msgstr "_Sačuvaj"
+msgstr "_Spara"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
-msgstr "Postavke"
+msgstr "Inställningar"
#: src/gmpv_shortcuts_window.c:56
msgid "Open file"
-msgstr "Otvori datoteku"
+msgstr "Öppna fil"
#: src/gmpv_shortcuts_window.c:57
msgid "Open location"
-msgstr "Otvori lokaciju"
+msgstr "Öppna plats"
#: src/gmpv_shortcuts_window.c:58
msgid "Add file to playlist"
-msgstr ""
+msgstr "Lägg till fil i spellista"
#: src/gmpv_shortcuts_window.c:59
msgid "Add location to playlist"
-msgstr ""
+msgstr "Lägg till plats i spellista"
#: src/gmpv_shortcuts_window.c:60
msgid "Show preferences dialog"
-msgstr "Prikaži dijalog postavki"
+msgstr "Visa dialogrutan för alternativ"
#: src/gmpv_shortcuts_window.c:61
msgid "Toggle controls"
-msgstr "Prikaži kontrole"
+msgstr "Visa/dölj kontroller"
#: src/gmpv_shortcuts_window.c:62
msgid "Toggle playlist"
-msgstr "Prikaži listu puštanja"
+msgstr "Visa/dölj spellista"
#: src/gmpv_shortcuts_window.c:63
msgid "Toggle fullscreen mode"
-msgstr "Prikaži u režimu celog ekrana"
+msgstr "Växla helskärmsläge"
#: src/gmpv_shortcuts_window.c:64
msgid "Leave fullscreen mode"
-msgstr "Napusti režim celog ekrana"
+msgstr "Lämna helskärmsläge"
#: src/gmpv_shortcuts_window.c:65
msgid "Toggle OSD states between normal and playback time/duration"
-msgstr "Promeni OSD prikaz između normalnog i vreme puštanja/dužina"
+msgstr "Växla OSD-lägen mellan normal och uppspelningstid/speltid"
#: src/gmpv_shortcuts_window.c:66
msgid "Show filename on the OSD"
-msgstr "Prikaži ime datoteke u OSD"
+msgstr "Visa filnamn i OSD vyn"
#: src/gmpv_shortcuts_window.c:67
msgid "Show progress, elapsed time, and duration on the OSD"
-msgstr "Prikaži napredak, proteklo vreme i dužinu na OSD"
+msgstr "Visa förlopp, förfluten tid och speltid i OSD vyn"
#: src/gmpv_shortcuts_window.c:70
msgid "Seek backward/forward 5 seconds"
-msgstr "Prebaci 5 sekundi unazad/unapred"
+msgstr "Sök bakåt/framåt med 5 sekunder"
#: src/gmpv_shortcuts_window.c:71
msgid "Exact seek backward/forward 1 second"
-msgstr "Prebaci tačno 1 sekund unazad/unapred"
+msgstr "Sök exakt bakåt/framåt med 1 sekund"
#: src/gmpv_shortcuts_window.c:72
msgid "Seek backward/forward 1 minute"
-msgstr "Prebaci 1 minut unazad/unapred"
+msgstr "Sök bakåt/framåt med 1 minut"
#: src/gmpv_shortcuts_window.c:73
msgid "Exact seek backward/forward 5 seconds"
-msgstr "Prebaci tačno 5 sekundi unazad/unapred"
+msgstr "Sök exakt bakåt/framåt med 5 sekunder"
#: src/gmpv_shortcuts_window.c:74
msgid "Seek to previous/next subtitle"
-msgstr "Prebaci na prethodni/sledeći podnatpis"
+msgstr "Sök fram till föregående/nästa undertext"
#: src/gmpv_shortcuts_window.c:75
msgid "Step backward/forward a single frame"
-msgstr "Korak za jednu sliku unazad/unapred"
+msgstr "Gå bakåt/framåt med en bildruta"
#: src/gmpv_shortcuts_window.c:76
msgid "Seek to the beginning of the previous/next chapter"
-msgstr "Prebaci na početak prethodnog/sledećeg poglavlja"
+msgstr "Sök fram till början av föregående/nästa kapitel"
#: src/gmpv_shortcuts_window.c:79
msgid "Decrease/increase playback speed by 10%"
-msgstr "Uspori/ubrzaj reprodukciju za 10%"
+msgstr "Minska/öka uppspelningshastighet med 10%"
#: src/gmpv_shortcuts_window.c:80
msgid "Halve/double current playback speed"
-msgstr "Prepolovi/udvostruči trenutnu brzinu reprodukcije"
+msgstr "Halvera/dubbla nuvarande uppspelningshastighet"
#: src/gmpv_shortcuts_window.c:81
msgid "Reset playback speed to normal"
-msgstr "Povrati normalnu brzinu reprodukcije"
+msgstr "Återställ uppspelningshastighet till normal"
#: src/gmpv_shortcuts_window.c:82
msgid "Go backward/forward in the playlist"
-msgstr "Idi unazad/unapred u listi puštanja"
+msgstr "Gå bakåt/framåt i spellistan"
#: src/gmpv_shortcuts_window.c:83
msgid "Remove selected playlist item"
-msgstr "Izbaci označenu stavku iz liste puštanja"
+msgstr "Ta bort markerat objekt från spellista"
#: src/gmpv_shortcuts_window.c:84
msgid "Save playlist"
-msgstr "Sačuvaj listu puštanja"
+msgstr "Spara spellista"
#: src/gmpv_shortcuts_window.c:85
msgid "Set/clear A-B loop points"
-msgstr "Postavi/očisti A-B tačke ponavljanja"
+msgstr "Sätt/rensa A-B punkter för repeterad uppspelning"
#: src/gmpv_shortcuts_window.c:86
msgid "Toggle infinite looping"
-msgstr "Uključi beskonačno ponavljanje"
+msgstr "Växla oändlig återuppspelning"
#: src/gmpv_shortcuts_window.c:87
msgid "Pause or unpause"
-msgstr "Pauziraj ili nastavi"
+msgstr "Pausa eller fortsätt"
#: src/gmpv_shortcuts_window.c:88
msgid "Quit"
-msgstr "Napusti"
+msgstr "Avsluta"
#: src/gmpv_shortcuts_window.c:89
msgid "Save current playback position and quit"
-msgstr "Sačuvaj trenutnu poziciju reprodukcije i napusti"
+msgstr "Spara nuvarande uppspelningsposition och avsluta"
#: src/gmpv_shortcuts_window.c:92
msgid "Cycle through audio tracks"
-msgstr "Kruži kroz audio snimke"
+msgstr "Cykla igenom ljudspår"
#: src/gmpv_shortcuts_window.c:93 src/gmpv_shortcuts_window.c:94
msgid "Decrease/increase volume"
-msgstr "Smanji/pojačaj"
+msgstr "Sänk/höj volymen"
#: src/gmpv_shortcuts_window.c:95
msgid "Mute or unmute"
-msgstr "Isključi ili uključi zvuk"
+msgstr "Slå på eller av ljud"
#: src/gmpv_shortcuts_window.c:96
msgid "Adjust audio delay by +/- 0.1 seconds"
-msgstr "Prilagodi kašnjenje zvuka za +/- 0.1 sekund"
+msgstr "Justera ljudfördröjning med +/- 0,1 sekunder"
#: src/gmpv_shortcuts_window.c:99
msgid "Toggle subtitle visibility"
-msgstr "Promeni vidljivost podnatpisa"
+msgstr "Växla synlighet av undertexter"
#: src/gmpv_shortcuts_window.c:100
msgid "Cycle through available subtitles"
-msgstr "Kruži kroz dostupne podnatpise"
+msgstr "Cykla igenom tillgängliga undertexter"
#: src/gmpv_shortcuts_window.c:101
msgid "Adjust subtitle delay by +/- 0.1 seconds"
-msgstr "Prilagodi kašnjenje podnatpisa za +/- 0.1 sekund"
+msgstr "Justera undertexters fördröjning med +/- 0,1 sekunder"
#: src/gmpv_shortcuts_window.c:102
msgid "Toggle SSA/ASS subtitles style override"
-msgstr "Izmeni SSA/ASS stil podnatpisa"
+msgstr "Växla överskridning av SSA/ASS undertexters stil"
#: src/gmpv_shortcuts_window.c:103
msgid "Move subtitles up/down"
-msgstr "Pomeri podnatpis gore/dole"
+msgstr "Flytta undertexter up/ned"
#: src/gmpv_shortcuts_window.c:104
msgid "Toggle VSFilter aspect compatibility mode"
-msgstr "Izmeni VSFilter režim usklađenosti"
+msgstr "Växla VSFilter aspekt kompatibilitetsläge"
#: src/gmpv_shortcuts_window.c:107
msgid "Cycle through video tracks"
-msgstr "Kruži kroz video snimke"
+msgstr "Cykla igenom videospår"
#: src/gmpv_shortcuts_window.c:108
-#, fuzzy
msgid "Decrease/increase pan-and-scan range"
-msgstr "Povećaj/umanji opseg skeniranja odnosa"
+msgstr "Sänk/höj panorering och scan omfång"
#: src/gmpv_shortcuts_window.c:109
msgid "Take a screenshot"
-msgstr "Napravi snimak ekrana"
+msgstr "Ta en skärmdump"
#: src/gmpv_shortcuts_window.c:110
msgid "Take a screenshot, without subtitles"
-msgstr "Napravi snimak ekrana bez podnatpisa"
+msgstr "Ta en skärmdump, utan undertexter"
#: src/gmpv_shortcuts_window.c:111
msgid "Take a screenshot, as the window shows it"
-msgstr "Napravi snimak ekrana kako ga prozor prikazuje"
+msgstr "Ta en skärmdump, så som fönstret visar det."
#: src/gmpv_shortcuts_window.c:112
msgid "Resize video to half its original size"
-msgstr "Prepolovi originalnu veličinu video snimka"
+msgstr "Ändra storlek på videon till hälften av originalformatet"
#: src/gmpv_shortcuts_window.c:113
msgid "Resize video to its original size"
-msgstr "Povrati originalnu veličinu video snimka"
+msgstr "Återställ videon till sin ursprungliga storlek"
#: src/gmpv_shortcuts_window.c:114
msgid "Resize video to double its original size"
-msgstr "Udvostruči originalnu veličinu video snimka"
+msgstr "Ändra storlek på videon till det dubbla av dess original storlek"
#: src/gmpv_shortcuts_window.c:115
msgid "Adjust contrast"
-msgstr "Prilagodi kontrast"
+msgstr "Justera kontrast"
#: src/gmpv_shortcuts_window.c:116
msgid "Adjust brightness"
-msgstr "Prilagodi osvetljenost"
+msgstr "Justera ljusstyrka"
#: src/gmpv_shortcuts_window.c:117
msgid "Adjust gamma"
-msgstr "Prilagodi gamu"
+msgstr "Justera gamma"
#: src/gmpv_shortcuts_window.c:118
msgid "Adjust saturation"
-msgstr "Prilagodi zasićenje"
+msgstr "Justera färgmättnad"
#: src/gmpv_shortcuts_window.c:119
msgid "Activate or deactivate deinterlacer"
-msgstr "Omogući ili onemogući preplitanje"
+msgstr "Aktivera eller inaktivera deinterlacer"
#: src/gmpv_shortcuts_window.c:120
msgid "Cycle aspect ratio override"
-msgstr "Kruži kroz promenu razmere"
+msgstr "Cykla överskridning av bildförhållande"
#: src/gmpv_shortcuts_window.c:123
msgid "User Interface"
-msgstr "Korisničko Sučelje"
+msgstr "Användargränssnitt"
#: src/gmpv_shortcuts_window.c:124
msgid "Video"
@@ -672,58 +720,60 @@ msgstr "Video"
#: src/gmpv_shortcuts_window.c:125
msgid "Audio"
-msgstr "Audio"
+msgstr "Ljud"
#: src/gmpv_shortcuts_window.c:126
msgid "Subtitle"
-msgstr "Podnatpis"
+msgstr "Undertext"
#: src/gmpv_shortcuts_window.c:127
msgid "Playback"
-msgstr "Reprodukcija"
+msgstr "Uppspelning"
#: src/gmpv_shortcuts_window.c:128
msgid "Seeking"
-msgstr "Traganje"
+msgstr "Söker"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
+"Aktivering eller inaktivering av fönsterdekorationer i klienten kräver en "
+"omstart innan det träder i kraft."
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
-msgstr "Dodaj Datoteku u Listu Puštanja"
+msgstr "Lägg till fil i spellista"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
-msgstr "Otvori Datoteku"
+msgstr "Öppna fil"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
-msgstr "Dodaj Lokaciju u Listu Puštnja"
+msgstr "Lägg till plats till spellista"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
-msgstr "Otvori Lokaciju"
+msgstr "Öppna plats"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
-msgstr ""
+msgstr "Öppna ljudspår..."
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
-msgstr ""
+msgstr "Öppna undertext spår..."
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
-msgstr "Sačuvaj Listu Puštanja"
+msgstr "Spara spellista"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
-msgstr "GTK pročelje za MPV"
+msgstr "Ett GTK gränssnitt för MPV"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
-msgstr "Srđan S."
+msgstr "Patrik Nilsson <translation at hembas.se>"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index ab76e89..46c3a58 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -4,21 +4,22 @@
# This file is distributed under the same license as the gnome-mpv package.
# sun <warmsun0220 at gmail.com>, 2015.
# Mingye Wang <arthur2e5 at aosc.xyz>, 2015.
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2015. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2015. #zanata
# Mingye Wang <arthur2e5 at aosc.xyz>, 2016. #zanata
# Huang Jiayao <huangjiayao_1992 at 163.com>, 2017. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: gnome-mpv 0.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-16 21:24+0800\n"
-"PO-Revision-Date: 2017-03-27 03:58-0400\n"
-"Last-Translator: Huang Jiayao <huangjiayao_1992 at 163.com>\n"
+"PO-Revision-Date: 2017-08-02 12:11-0400\n"
+"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: AOSC zh_CN <aosc at member.fsf.org>\n"
+"Language: zh-CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: zh-CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Zanata 3.9.6\n"
@@ -55,27 +56,27 @@ msgstr "mpv 输入配置文件的路径"
msgid "Load or don't load mpv input configuration file"
msgstr "是否载入 mpv 输入配置文件"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "窗口宽度"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "窗口高度"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "播放器音量"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "播放列表宽度"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "是否显示播放列表"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "最近访问的文件夹 URI"
@@ -88,17 +89,30 @@ msgstr "是否已从上一个版本迁移设置"
msgid "Whether or not to use floating controls in windowed mode"
msgstr "是否在窗口模式下启用浮动控制"
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
-msgstr "允许多实例"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr "是否显示控制栏"
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -107,7 +121,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "MPV 的 GTK 前端程序"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -119,27 +133,27 @@ msgstr ""
" GNOME 库,GNOME MPV 是一个基于 GNOME HIG(人机界面准则)设计的程序。GNOME MPV "
"还提供禁用客户端装饰(CSD)的选项以为不运行 GNOME 的系统提供更好的兼容性。"
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "特性:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "拖放播放列表"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "正在载入外部 mpv 配置文件"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "MPRIS2 D-Bus 界面"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "关闭了 CSD 的主窗口"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "打开了播放列表的主窗口"
@@ -148,69 +162,77 @@ msgstr "打开了播放列表的主窗口"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "正在播放"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr "显示发布版本号"
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr "加入队列"
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr "不要连接到已经运行中的实例"
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr "暂停"
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr "播放"
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr "停止"
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr "快进"
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr "快退"
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr "下一章节"
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr "上一章节"
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr "切换全屏"
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr "暂停"
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "错误"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "取消(_C)"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "打开(_O)"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr "所有文件"
@@ -260,7 +282,7 @@ msgstr "打开位置(_L)"
msgid "_Save Playlist"
msgstr "保存播放列表(_S)"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "退出(_Q)"
@@ -268,7 +290,7 @@ msgstr "退出(_Q)"
msgid "_Edit"
msgstr "编辑(_E)"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "首选项(_P)"
@@ -316,57 +338,65 @@ msgstr "一半尺寸(_H)"
msgid "_Help"
msgstr "帮助(_F)"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr "快捷键(_K)"
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "关于(_A)"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "回放被异常终止。原因:%s。"
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "应用一个或多个 MPV 选项失败。"
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "位置:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "应用一个或多个 MPV 选项失败。"
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "添加(_A)…"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr "添加位置(_L)"
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "循环"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "播放列表"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr "添加 Lua 脚本"
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr "Lua 脚本"
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr "从 '%s' 拷贝文件到 '%s' 失败。原因:%s"
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr "未找到 Lua 脚本"
@@ -384,67 +414,83 @@ msgstr "您确定移除此脚本吗?该操作无法被撤销。"
msgid "Failed to delete file '%s'. Reason: %s"
msgstr "删除文件 '%s' 失败。原因:%s"
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr "<b>用户界面</b>"
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "启用客户端装饰"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "启用暗色主题"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr "在窗口模式下启用浮动控制"
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "记住最后一次打开位置"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV 配置</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "加载 MPV 配置文件"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV 配置文件:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>键绑定</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "加载 MPV 输入配置文件"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "MPV 输入配置文件:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>杂项</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "额外的 MPV 选项:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr "通用"
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "保存(_S)"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "首选项"
@@ -688,45 +734,45 @@ msgstr "音频"
msgid "Seeking"
msgstr "跳转"
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "添加文件到播放列表"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "打开文件"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr "添加位置到播放列表"
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "打开位置"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "保存播放列表"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "MPV 的 GTK 前端程序"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr ""
"Mingye Wang <arthur2e5 at aosc.xyz>, 2015, 2016.\n"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index eebd32d..3fde939 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -4,21 +4,22 @@
# This file is distributed under the same license as the gnome-mpv package.
# sun <warmsun0220 at gmail.com>, 2015.
# Mingye Wang <arthur2e5 at aosc.xyz>, 2015.
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2015. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2015. #zanata
# Mingye Wang <arthur2e5 at aosc.xyz>, 2016. #zanata
-# gnome-mpv <gnome-mpv at openmailbox.org>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2016. #zanata
+# gnome-mpv <gnome-mpv at teknik.io>, 2017. #zanata
msgid ""
msgstr ""
"Project-Id-Version: gnome-mpv 0.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-16 21:24+0800\n"
-"PO-Revision-Date: 2016-11-03 05:23-0400\n"
+"PO-Revision-Date: 2017-08-02 12:10-0400\n"
"Last-Translator: Copied by Zanata <copied-by-zanata at zanata.org>\n"
"Language-Team: zh_Hant <chinese-l10n at googlegroups.com>\n"
+"Language: zh-TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: zh-TW\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Zanata 3.9.6\n"
@@ -55,27 +56,27 @@ msgstr "mpv 輸入配置檔的路徑"
msgid "Load or don't load mpv input configuration file"
msgstr "是否載入 mpv 輸入配置檔"
-#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:80
+#: data/org.gnome-mpv.gschema.xml:61 data/io.github.GnomeMpv.gschema.xml:98
msgid "Width of the window"
msgstr "視窗寬度"
-#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:86
+#: data/org.gnome-mpv.gschema.xml:67 data/io.github.GnomeMpv.gschema.xml:104
msgid "Height of the window"
msgstr "視窗高度"
-#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:93
+#: data/org.gnome-mpv.gschema.xml:73 data/io.github.GnomeMpv.gschema.xml:111
msgid "Volume of player"
msgstr "播放器音量"
-#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:99
+#: data/org.gnome-mpv.gschema.xml:79 data/io.github.GnomeMpv.gschema.xml:117
msgid "Width of the playlist"
msgstr "播放列表寬度"
-#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:111
+#: data/org.gnome-mpv.gschema.xml:85 data/io.github.GnomeMpv.gschema.xml:129
msgid "Show or not show the playlist"
msgstr "是否顯示播放列表"
-#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:117
+#: data/org.gnome-mpv.gschema.xml:91 data/io.github.GnomeMpv.gschema.xml:135
msgid "URI of the last folder accessed"
msgstr "最近訪問的資料夾 URI"
@@ -88,17 +89,30 @@ msgstr ""
msgid "Whether or not to use floating controls in windowed mode"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:40 src/gmpv_pref_dialog.c:322
-msgid "Allow multiple instances"
+#: data/io.github.GnomeMpv.gschema.xml:40
+msgid "Whether or not to create new windows when there is already an instance"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:76
+msgid "Whether or not to enable MPRIS support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:82
+msgid ""
+"Whether or not to enable GNOME-Settings-Daemon-based media keys support"
+msgstr ""
+
+#: data/io.github.GnomeMpv.gschema.xml:88
+msgid "Whether or not to prefetch metadata for non-current playlist entries"
msgstr ""
-#: data/io.github.GnomeMpv.gschema.xml:105
+#: data/io.github.GnomeMpv.gschema.xml:123
msgid "Show or not show the controls"
msgstr ""
#: data/io.github.GnomeMpv.appdata.xml.in:7
-#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:410
-#: src/gmpv_view.c:994
+#: data/io.github.GnomeMpv.desktop.in:4 src/gmpv_application.c:330
+#: src/gmpv_view.c:955
msgid "GNOME MPV"
msgstr "GNOME MPV"
@@ -107,7 +121,7 @@ msgstr "GNOME MPV"
msgid "GTK+ frontend for mpv"
msgstr "MPV 之 GTK 前端程式"
-#: data/io.github.GnomeMpv.appdata.xml.in:11
+#: data/io.github.GnomeMpv.appdata.xml.in:12
msgid ""
"GNOME MPV is a simple GTK+ frontend for mpv, which is a very powerful media "
"player capable of playing virtually all video and audio formats. The design "
@@ -119,27 +133,27 @@ msgstr ""
" GNOME 庫,GNOME MPV 是一個基於 GNOME HIG(人機介面準則)設計的程式。GNOME MPV "
"還提供禁用客戶端裝飾(CSD)的選項以為不執行 GNOME 的系統提供更好的相容性。"
-#: data/io.github.GnomeMpv.appdata.xml.in:18
+#: data/io.github.GnomeMpv.appdata.xml.in:19
msgid "Features:"
msgstr "特性:"
-#: data/io.github.GnomeMpv.appdata.xml.in:20
+#: data/io.github.GnomeMpv.appdata.xml.in:21
msgid "Drag and drop playlist"
msgstr "拖放播放列表"
-#: data/io.github.GnomeMpv.appdata.xml.in:21
+#: data/io.github.GnomeMpv.appdata.xml.in:22
msgid "Loading external mpv configuration files"
msgstr "正在載入外部 mpv 配置檔"
-#: data/io.github.GnomeMpv.appdata.xml.in:22
+#: data/io.github.GnomeMpv.appdata.xml.in:23
msgid "MPRIS2 D-Bus interface"
msgstr "MPRIS2 D-Bus 介面"
-#: data/io.github.GnomeMpv.appdata.xml.in:32
+#: data/io.github.GnomeMpv.appdata.xml.in:36
msgid "The main window with CSD disabled"
msgstr "關閉了 CSD 的主視窗"
-#: data/io.github.GnomeMpv.appdata.xml.in:36
+#: data/io.github.GnomeMpv.appdata.xml.in:40
msgid "The main window with playlist open"
msgstr "打開了播放列表的主視窗"
@@ -148,69 +162,77 @@ msgstr "打開了播放列表的主視窗"
msgid "gnome-mpv"
msgstr ""
-#: src/gmpv_application.c:464
+#: data/io.github.GnomeMpv.desktop.in:19
+msgid "New Window"
+msgstr ""
+
+#: src/gmpv_application.c:370
msgid "Playing"
msgstr "正在播放"
-#: src/gmpv_application.c:532
+#: src/gmpv_application.c:415
msgid "Show release version"
msgstr ""
-#: src/gmpv_application.c:540
+#: src/gmpv_application.c:423
msgid "Enqueue"
msgstr ""
-#: src/gmpv_application.c:548
+#: src/gmpv_application.c:431
+msgid "Create a new window"
+msgstr ""
+
+#: src/gmpv_application.c:439
msgid "Don't connect to an already-running instance"
msgstr ""
-#: src/gmpv_control_box.c:271 src/gmpv_control_box.c:422
+#: src/gmpv_control_box.c:286
+msgid "Pause"
+msgstr ""
+
+#: src/gmpv_control_box.c:286 src/gmpv_control_box.c:433
msgid "Play"
msgstr ""
-#: src/gmpv_control_box.c:274
+#: src/gmpv_control_box.c:436
msgid "Stop"
msgstr ""
-#: src/gmpv_control_box.c:277
+#: src/gmpv_control_box.c:439
msgid "Forward"
msgstr ""
-#: src/gmpv_control_box.c:280
+#: src/gmpv_control_box.c:442
msgid "Rewind"
msgstr ""
-#: src/gmpv_control_box.c:283
+#: src/gmpv_control_box.c:445
msgid "Next Chapter"
msgstr ""
-#: src/gmpv_control_box.c:286
+#: src/gmpv_control_box.c:448
msgid "Previous Chapter"
msgstr ""
-#: src/gmpv_control_box.c:289 src/gmpv_header_bar.c:89
+#: src/gmpv_control_box.c:451 src/gmpv_header_bar.c:89
msgid "Toggle Fullscreen"
msgstr ""
-#: src/gmpv_control_box.c:422
-msgid "Pause"
-msgstr ""
-
-#: src/gmpv_controller.c:675 src/gmpv_view.c:1416
+#: src/gmpv_controller.c:715 src/gmpv_view.c:1400
msgid "Error"
msgstr "錯誤"
-#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:126
-#: src/gmpv_pref_dialog.c:365
+#: src/gmpv_file_chooser.c:90 src/gmpv_open_location_dialog.c:127
+#: src/gmpv_preferences_dialog.c:378
msgid "_Cancel"
msgstr "取消(_C)"
#: src/gmpv_file_chooser.c:92 src/gmpv_menu.c:244 src/gmpv_menu.c:321
-#: src/gmpv_open_location_dialog.c:128
+#: src/gmpv_open_location_dialog.c:129
msgid "_Open"
msgstr "開啟(_O)"
-#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:149
+#: src/gmpv_file_chooser.c:135 src/gmpv_plugins_manager.c:148
msgid "All Files"
msgstr ""
@@ -260,7 +282,7 @@ msgstr "開啟位置(_L)"
msgid "_Save Playlist"
msgstr "儲存播放列表(_S)"
-#: src/gmpv_menu.c:247 src/gmpv_menu.c:336
+#: src/gmpv_menu.c:247 src/gmpv_menu.c:338
msgid "_Quit"
msgstr "退出(_Q)"
@@ -268,7 +290,7 @@ msgstr "退出(_Q)"
msgid "_Edit"
msgstr "編輯(_E)"
-#: src/gmpv_menu.c:249 src/gmpv_menu.c:332
+#: src/gmpv_menu.c:249 src/gmpv_menu.c:334
msgid "_Preferences"
msgstr "偏好設定(_P)"
@@ -316,57 +338,65 @@ msgstr "一半尺寸(_H)"
msgid "_Help"
msgstr "幫助(_F)"
-#: src/gmpv_menu.c:261 src/gmpv_menu.c:334
+#: src/gmpv_menu.c:261 src/gmpv_menu.c:336
msgid "_Keyboard Shortcuts"
msgstr ""
-#: src/gmpv_menu.c:262 src/gmpv_menu.c:335
+#: src/gmpv_menu.c:262 src/gmpv_menu.c:337
msgid "_About"
msgstr "關於(_A)"
-#: src/gmpv_mpv.c:408
+#: src/gmpv_menu.c:332
+msgid "_New Window"
+msgstr ""
+
+#: src/gmpv_mpv.c:216
#, fuzzy, c-format
msgid "Playback was terminated abnormally. Reason: %s."
msgstr "回放被異常終止。原因:%s。"
-#: src/gmpv_mpv.c:1047
-msgid "Failed to apply one or more MPV options."
-msgstr "套用一個或多個 MPV 選項失敗。"
-
-#: src/gmpv_open_location_dialog.c:122
+#: src/gmpv_open_location_dialog.c:123
msgid "Location:"
msgstr "位置:"
-#: src/gmpv_playlist_widget.c:531
+#: src/gmpv_player.c:493
+msgid "Failed to apply one or more MPV options."
+msgstr "套用一個或多個 MPV 選項失敗。"
+
+#: src/gmpv_playlist_widget.c:533
msgid "_Add…"
msgstr "新增(_A)…"
-#: src/gmpv_playlist_widget.c:535
+#: src/gmpv_playlist_widget.c:537
msgid "Add _Location…"
msgstr ""
-#: src/gmpv_playlist_widget.c:537
-msgid "Loop"
-msgstr "迴圈"
+#: src/gmpv_playlist_widget.c:539
+msgid "_Shuffle"
+msgstr ""
+
+#: src/gmpv_playlist_widget.c:540
+msgid "L_oop"
+msgstr ""
-#: src/gmpv_playlist_widget.c:650
+#: src/gmpv_playlist_widget.c:654
msgid "Playlist"
msgstr "播放列表"
-#: src/gmpv_plugins_manager.c:142 src/gmpv_plugins_manager.c:373
+#: src/gmpv_plugins_manager.c:141 src/gmpv_plugins_manager.c:372
msgid "Add Lua Script"
msgstr ""
-#: src/gmpv_plugins_manager.c:154 src/gmpv_pref_dialog.c:362
+#: src/gmpv_plugins_manager.c:153 src/gmpv_preferences_dialog.c:375
msgid "Lua Scripts"
msgstr ""
-#: src/gmpv_plugins_manager.c:300
+#: src/gmpv_plugins_manager.c:299
#, fuzzy, c-format
msgid "Failed to copy file from '%s' to '%s'. Reason: %s"
msgstr ""
-#: src/gmpv_plugins_manager.c:349
+#: src/gmpv_plugins_manager.c:348
msgid "No Lua script found"
msgstr ""
@@ -384,67 +414,83 @@ msgstr ""
msgid "Failed to delete file '%s'. Reason: %s"
msgstr ""
-#: src/gmpv_pref_dialog.c:286
+#: src/gmpv_preferences_dialog.c:290
msgid "<b>User Interface</b>"
msgstr ""
-#: src/gmpv_pref_dialog.c:289
+#: src/gmpv_preferences_dialog.c:293
msgid "Enable client-side decorations"
msgstr "啟用客戶端裝飾"
-#: src/gmpv_pref_dialog.c:292
+#: src/gmpv_preferences_dialog.c:296
msgid "Enable dark theme"
msgstr "啟用暗色主題"
-#: src/gmpv_pref_dialog.c:295
+#: src/gmpv_preferences_dialog.c:299
msgid "Use floating controls in windowed mode"
msgstr ""
-#: src/gmpv_pref_dialog.c:298
+#: src/gmpv_preferences_dialog.c:302
msgid "Remember last file's location"
msgstr "記住最後一次開啟位置"
-#: src/gmpv_pref_dialog.c:301
+#: src/gmpv_preferences_dialog.c:305
msgid "<b>MPV Configuration</b>"
msgstr "<b>MPV 配置</b>"
-#: src/gmpv_pref_dialog.c:304
+#: src/gmpv_preferences_dialog.c:308
msgid "Load MPV configuration file"
msgstr "載入 MPV 配置檔"
-#: src/gmpv_pref_dialog.c:307
+#: src/gmpv_preferences_dialog.c:311
msgid "MPV configuration file:"
msgstr "MPV 配置檔:"
-#: src/gmpv_pref_dialog.c:310
+#: src/gmpv_preferences_dialog.c:314
msgid "<b>Keybindings</b>"
msgstr "<b>鍵繫結</b>"
-#: src/gmpv_pref_dialog.c:313
+#: src/gmpv_preferences_dialog.c:317
msgid "Load MPV input configuration file"
msgstr "載入 MPV 輸入配置檔"
-#: src/gmpv_pref_dialog.c:316
+#: src/gmpv_preferences_dialog.c:320
msgid "MPV input configuration file:"
msgstr "MPV 輸入配置檔:"
-#: src/gmpv_pref_dialog.c:319
+#: src/gmpv_preferences_dialog.c:323
msgid "<b>Miscellaneous</b>"
msgstr "<b>雜項</b>"
-#: src/gmpv_pref_dialog.c:325
+#: src/gmpv_preferences_dialog.c:326
+msgid "Always open new window"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:329
+msgid "Prefetch metadata"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:332
+msgid "Enable MPRIS support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:335
+msgid "Enable media keys support"
+msgstr ""
+
+#: src/gmpv_preferences_dialog.c:338
msgid "Extra MPV options:"
msgstr "額外的 MPV 選項:"
-#: src/gmpv_pref_dialog.c:358
+#: src/gmpv_preferences_dialog.c:371
msgid "General"
msgstr ""
-#: src/gmpv_pref_dialog.c:367
+#: src/gmpv_preferences_dialog.c:380
msgid "_Save"
msgstr "儲存(_S)"
-#: src/gmpv_pref_dialog.c:384
+#: src/gmpv_preferences_dialog.c:397
msgid "Preferences"
msgstr "偏好設定"
@@ -688,45 +734,45 @@ msgstr ""
msgid "Seeking"
msgstr ""
-#: src/gmpv_view.c:742
+#: src/gmpv_view.c:711
msgid ""
"Enabling or disabling client-side decorations requires restarting to take "
"effect."
msgstr ""
-#: src/gmpv_view.c:1296
+#: src/gmpv_view.c:1280
msgid "Add File to Playlist"
msgstr "新增檔案到播放列表"
-#: src/gmpv_view.c:1297
+#: src/gmpv_view.c:1281
msgid "Open File"
msgstr "開啟檔案"
-#: src/gmpv_view.c:1324
+#: src/gmpv_view.c:1308
msgid "Add Location to Playlist"
msgstr ""
-#: src/gmpv_view.c:1325
+#: src/gmpv_view.c:1309
msgid "Open Location"
msgstr "開啟位置"
-#: src/gmpv_view.c:1346
+#: src/gmpv_view.c:1330
msgid "Load Audio Track…"
msgstr ""
-#: src/gmpv_view.c:1365
+#: src/gmpv_view.c:1349
msgid "Load Subtitle Track…"
msgstr ""
-#: src/gmpv_view.c:1390
+#: src/gmpv_view.c:1374
msgid "Save Playlist"
msgstr "儲存播放列表"
-#: src/gmpv_view.c:1455
+#: src/gmpv_view.c:1439
msgid "A GTK frontend for MPV"
msgstr "MPV 的 GTK 前端程式"
-#: src/gmpv_view.c:1465
+#: src/gmpv_view.c:1449
msgid "translator-credits"
msgstr ""
"Mingye Wang\n"
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ee2028..15da5db 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,27 +40,27 @@ BUILT_SOURCES = $(mpris_generated) $(marshal_generated) $(authors_generated)
gnome_mpv_SOURCES = gmpv_main.c gmpv_def.h \
gmpv_application.c gmpv_application.h \
- gmpv_application_private.h \
- gmpv_application_action.c gmpv_application_action.h \
gmpv_common.c gmpv_common.h \
gmpv_controller.c gmpv_controller.h \
+ gmpv_controller_actions.c gmpv_controller_actions.h \
gmpv_controller_private.h \
gmpv_controller_input.c gmpv_controller_input.h \
gmpv_control_box.c gmpv_control_box.h \
gmpv_file_chooser.c gmpv_file_chooser.h \
- gmpv_geometry.h \
gmpv_header_bar.c gmpv_header_bar.h \
gmpv_main_window.c gmpv_main_window.h \
gmpv_menu.c gmpv_menu.h \
+ gmpv_metadata_cache.c gmpv_metadata_cache.h \
gmpv_model.c gmpv_model.h \
gmpv_mpv.c gmpv_mpv.h \
gmpv_mpv_private.h \
- gmpv_mpv_opt.c gmpv_mpv_opt.h \
gmpv_open_location_dialog.c gmpv_open_location_dialog.h \
+ gmpv_player.c gmpv_player.h \
+ gmpv_player_options.c gmpv_player_options.h \
gmpv_playlist_widget.c gmpv_playlist_widget.h \
gmpv_plugins_manager.c gmpv_plugins_manager.h \
gmpv_plugins_manager_item.c gmpv_plugins_manager_item.h \
- gmpv_pref_dialog.c gmpv_pref_dialog.h \
+ gmpv_preferences_dialog.c gmpv_preferences_dialog.h \
gmpv_seek_bar.c gmpv_seek_bar.h \
gmpv_video_area.c gmpv_video_area.h \
gmpv_view.c gmpv_view.h \
diff --git a/src/gmpv_application.c b/src/gmpv_application.c
index 06344a5..04f70f2 100644
--- a/src/gmpv_application.c
+++ b/src/gmpv_application.c
@@ -24,22 +24,32 @@
#include <locale.h>
#include "gmpv_application.h"
-#include "gmpv_application_private.h"
-#include "gmpv_application_action.h"
+#include "gmpv_controller.h"
#include "gmpv_mpv_wrapper.h"
#include "gmpv_common.h"
-#include "gmpv_menu.h"
#include "gmpv_def.h"
-#include "mpris/gmpv_mpris.h"
-#include "media_keys/gmpv_media_keys.h"
+
+struct _GmpvApplication
+{
+ GtkApplication parent;
+ GSList *controllers;
+ gboolean enqueue;
+ gboolean new_window;
+ guint inhibit_cookie;
+};
+
+struct _GmpvApplicationClass
+{
+ GtkApplicationClass parent_class;
+};
static void migrate_config(void);
-static void activate_action_string(GmpvApplication *app, const gchar *str);
-static void update_track_id( GmpvApplication *app,
- const gchar *action_name,
- const gchar *prop );
static void initialize_gui(GmpvApplication *app);
+static void create_dirs(void);
static gboolean shutdown_signal_handler(gpointer data);
+static void new_window_handler( GSimpleAction *simple,
+ GVariant *parameter,
+ gpointer data );
static void activate_handler(GApplication *gapp, gpointer data);
static void open_handler( GApplication *gapp,
GFile **files,
@@ -53,22 +63,9 @@ static gint command_line_handler( GApplication *gapp,
GApplicationCommandLine *cli,
gpointer data );
static void startup_handler(GApplication *gapp, gpointer data);
-static void aid_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data );
-static void vid_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data );
-static void sid_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data );
static void idle_handler( GObject *object,
GParamSpec *pspec,
gpointer data );
-static void ready_handler(GObject *object, GParamSpec *pspec, gpointer data);
-static void message_handler( GmpvController *controller,
- const gchar *message,
- gpointer data );
static void shutdown_handler(GmpvController *controller, gpointer data);
static void gmpv_application_class_init(GmpvApplicationClass *klass);
static void gmpv_application_init(GmpvApplication *app);
@@ -113,148 +110,59 @@ static void migrate_config()
g_object_unref(new_settings);
}
-static void activate_action_string(GmpvApplication *app, const gchar *str)
-{
- GActionMap *map = G_ACTION_MAP(app);
- GAction *action = NULL;
- gchar *name = NULL;
- GVariant *param = NULL;
- gboolean param_match = FALSE;
-
- g_action_parse_detailed_name(str, &name, ¶m, NULL);
-
- if(name)
- {
- const GVariantType *action_ptype;
- const GVariantType *given_ptype;
-
- action = g_action_map_lookup_action(map, name);
- action_ptype = g_action_get_parameter_type(action);
- given_ptype = param?g_variant_get_type(param):NULL;
-
- param_match = (action_ptype == given_ptype) ||
- ( given_ptype &&
- g_variant_type_is_subtype_of
- (action_ptype, given_ptype) );
- }
-
- if(action && param_match)
- {
- g_debug("Activating action %s", str);
- g_action_activate(action, param);
- }
- else
- {
- g_warning("Failed to activate action \"%s\"", str);
- }
-}
-
-static void update_track_id( GmpvApplication *app,
- const gchar *action_name,
- const gchar *prop )
-{
- GActionMap *action_map = G_ACTION_MAP(app);
- GAction *action = g_action_map_lookup_action(action_map, action_name);
- gint64 id = 0;
-
- g_object_get(app->controller, prop, &id, NULL);
-
- if(id >= 0 && action)
- {
- GVariant *value = g_variant_new_int64(id);
-
- g_action_change_state(action, value);
- }
- else if(!action)
- {
- g_warning("Cannot find action: %s", action_name);
- }
-}
-
static void initialize_gui(GmpvApplication *app)
{
- GSettings *settings = g_settings_new(CONFIG_ROOT);
- gboolean csd_enable;
- gboolean always_floating;
- gint64 wid;
- gchar *mpvinput;
-
- csd_enable = g_settings_get_boolean
- (settings, "csd-enable");
- always_floating = g_settings_get_boolean
- (settings, "always-use-floating-controls");
- mpvinput = g_settings_get_string
- (settings, "mpv-input-config-file");
-
- app->gui = GMPV_MAIN_WINDOW(gmpv_main_window_new(app, always_floating));
+ GmpvController *controller;
+ GmpvView *view;
+ GSettings *settings;
migrate_config();
- if(csd_enable)
- {
- GMenu *app_menu = g_menu_new();
-
- gmpv_menu_build_app_menu(app_menu);
- gtk_application_set_app_menu
- (GTK_APPLICATION(app), G_MENU_MODEL(app_menu));
-
- gmpv_main_window_enable_csd(app->gui);
- }
- else
- {
- GMenu *full_menu = g_menu_new();
-
- gmpv_menu_build_full(full_menu, NULL);
- gtk_application_set_app_menu(GTK_APPLICATION(app), NULL);
-
- gtk_application_set_menubar
- (GTK_APPLICATION(app), G_MENU_MODEL(full_menu));
- }
-
- app->view = gmpv_view_new(app->gui);
- wid = gmpv_video_area_get_xid(gmpv_main_window_get_video_area(app->gui));
- app->mpv = gmpv_mpv_new(wid);
- app->model = gmpv_model_new(app->mpv);
- app->controller = gmpv_controller_new(app->model, app->view);
+ controller = gmpv_controller_new(app);
+ view = gmpv_controller_get_view(controller);
+ settings = g_settings_new(CONFIG_ROOT);
+ app->controllers = g_slist_prepend(app->controllers, controller);
g_unix_signal_add(SIGHUP, shutdown_signal_handler, app);
g_unix_signal_add(SIGINT, shutdown_signal_handler, app);
g_unix_signal_add(SIGTERM, shutdown_signal_handler, app);
- g_signal_connect( app->controller,
- "notify::aid",
- G_CALLBACK(aid_handler),
- app );
- g_signal_connect( app->controller,
- "notify::vid",
- G_CALLBACK(vid_handler),
- app );
- g_signal_connect( app->controller,
- "notify::sid",
- G_CALLBACK(sid_handler),
- app );
- g_signal_connect( app->controller,
+ g_signal_connect( controller,
"notify::idle",
G_CALLBACK(idle_handler),
app );
- g_signal_connect( app->controller,
- "notify::ready",
- G_CALLBACK(ready_handler),
- app );
- g_signal_connect( app->controller,
- "message",
- G_CALLBACK(message_handler),
- app );
- g_signal_connect( app->controller,
+ g_signal_connect( controller,
"shutdown",
G_CALLBACK(shutdown_handler),
app );
- gmpv_application_action_add_actions(app);
- gmpv_mpris_init(app);
- gmpv_media_keys_init(app);
+ g_settings_bind( settings,
+ "always-use-floating-controls",
+ gmpv_view_get_main_window(view),
+ "always-use-floating-controls",
+ G_SETTINGS_BIND_GET );
+ g_settings_bind( settings,
+ "dark-theme-enable",
+ gtk_settings_get_default(),
+ "gtk-application-prefer-dark-theme",
+ G_SETTINGS_BIND_GET );
+
+ g_object_unref(settings);
+}
+
+static void create_dirs()
+{
+ gchar *config_dir = get_config_dir_path();
+ gchar *scripts_dir = get_scripts_dir_path();
+ gchar *watch_dir = get_watch_dir_path();
+
+ g_mkdir_with_parents(config_dir, 0600);
+ g_mkdir_with_parents(scripts_dir, 0700);
+ g_mkdir_with_parents(watch_dir, 0600);
- g_free(mpvinput);
+ g_free(config_dir);
+ g_free(scripts_dir);
+ g_free(watch_dir);
}
static gboolean shutdown_signal_handler(gpointer data)
@@ -265,16 +173,21 @@ static gboolean shutdown_signal_handler(gpointer data)
return FALSE;
}
+static void new_window_handler( GSimpleAction *simple,
+ GVariant *parameter,
+ gpointer data )
+{
+ initialize_gui(data);
+}
+
static void activate_handler(GApplication *gapp, gpointer data)
{
GmpvApplication *app = data;
- if(!app->gui)
+ if(!app->controllers)
{
initialize_gui(app);
}
-
- gmpv_controller_present(GMPV_APPLICATION(data)->controller);
}
static void open_handler( GApplication *gapp,
@@ -284,41 +197,35 @@ static void open_handler( GApplication *gapp,
gpointer data )
{
GmpvApplication *app = data;
- gboolean ready = FALSE;
+ GSettings *settings = g_settings_new(CONFIG_ROOT);
- if(app->controller)
+ /* Only activate new-window if always-open-new-window is set. It is not
+ * necessary to handle --new-window here since options_handler() would
+ * have activated new-window already if it were set.
+ */
+ if(g_settings_get_boolean(settings, "always-open-new-window"))
{
- g_object_get(app->controller, "ready", &ready, NULL);
+ activate_action_string(G_ACTION_MAP(gapp), "new-window");
}
- app->enqueue = (g_strcmp0(hint, "enqueue") == 0);
+ g_application_activate(gapp);
- if(n_files > 0)
+ for(gint i = 0; i < n_files; i++)
{
- if(ready)
- {
- for(gint i = 0; i < n_files; i++)
- {
- gchar *uri = g_file_get_uri(((GFile **)files)[i]);
-
- gmpv_controller_open
- (app->controller, uri, i != 0 || app->enqueue);
+ GtkApplication *gtkapp = GTK_APPLICATION(gapp);
+ GtkWindow *window = gtk_application_get_active_window(gtkapp);
+ GActionMap *map = G_ACTION_MAP(window);
+ gchar *uri = g_file_get_uri(((GFile **)files)[i]);
+ gboolean append = i != 0 || app->enqueue;
+ GVariant *param = g_variant_new("(sb)", uri, append);
+ GAction *action = g_action_map_lookup_action(map, "open");
- g_free(uri);
- }
- }
- else
- {
- app->files = g_malloc(sizeof(GFile *)*(gsize)(n_files+1));
-
- for(gint i = 0; i < n_files; i++)
- {
- app->files[i] = g_file_get_uri(((GFile **)files)[i]);
- }
+ g_action_activate(action, param);
- app->files[n_files] = NULL;
- }
+ g_free(uri);
}
+
+ g_object_unref(settings);
}
static gint options_handler( GApplication *gapp,
@@ -335,20 +242,14 @@ static gint options_handler( GApplication *gapp,
}
else
{
- GmpvApplication *app = GMPV_APPLICATION(gapp);
- GSettings *settings = g_settings_new(CONFIG_ROOT);
+ gboolean no_existing_session = FALSE;
g_variant_dict_lookup( options,
"no-existing-session",
"b",
- &app->no_existing_session );
+ &no_existing_session );
- app->no_existing_session
- |= g_settings_get_boolean
- ( settings,
- "multiple-instances-enable" );
-
- if(app->no_existing_session)
+ if(no_existing_session)
{
GApplicationFlags flags = g_application_get_flags(gapp);
@@ -356,8 +257,6 @@ static gint options_handler( GApplication *gapp,
g_application_set_flags
(gapp, flags|G_APPLICATION_NON_UNIQUE);
}
-
- g_clear_object(&settings);
}
return version?0:-1;
@@ -367,14 +266,22 @@ static gint command_line_handler( GApplication *gapp,
GApplicationCommandLine *cli,
gpointer data )
{
+ GmpvApplication *app = data;
gint argc = 1;
gchar **argv = g_application_command_line_get_arguments(cli, &argc);
GVariantDict *options = g_application_command_line_get_options_dict(cli);
- gboolean enqueue = FALSE;
+ GSettings *settings = g_settings_new(CONFIG_ROOT);
+ gboolean always_open_new_window = FALSE;
const gint n_files = argc-1;
GFile *files[n_files];
- g_variant_dict_lookup(options, "enqueue", "b", &enqueue);
+ app->enqueue = FALSE;
+ app->new_window = FALSE;
+ always_open_new_window = g_settings_get_boolean
+ (settings, "always-open-new-window");
+
+ g_variant_dict_lookup(options, "enqueue", "b", &app->enqueue);
+ g_variant_dict_lookup(options, "new-window", "b", &app->new_window);
for(gint i = 0; i < n_files; i++)
{
@@ -382,16 +289,28 @@ static gint command_line_handler( GApplication *gapp,
(cli, argv[i+1]);
}
- if(n_files > 0)
+ /* If always-open-new-window is set, only activate the new-window action
+ * if there are no files to be opened. If there are files,
+ * open_handler() will activate the action by itself. This is necessary
+ * because when opening files from file managers, files to be opened may
+ * be sent in the form of DBus message, bypassing this function
+ * entirely.
+ */
+ if(app->new_window || (n_files == 0 && always_open_new_window))
{
- g_application_open(gapp, files, n_files, enqueue?"enqueue":"");
+ activate_action_string(G_ACTION_MAP(gapp), "new-window");
}
-
- if(n_files == 0 || !GMPV_APPLICATION(gapp)->gui)
+ else if(n_files == 0 || !app->controllers)
{
g_application_activate(gapp);
}
+ if(n_files > 0)
+ {
+ g_application_open
+ (gapp, files, n_files, app->enqueue?"enqueue":"");
+ }
+
for(gint i = 0; i < n_files; i++)
{
g_object_unref(files[i]);
@@ -399,6 +318,7 @@ static gint command_line_handler( GApplication *gapp,
gdk_notify_startup_complete();
+ g_object_unref(settings);
g_strfreev(argv);
return 0;
@@ -413,53 +333,39 @@ static void startup_handler(GApplication *gapp, gpointer data)
bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
+ create_dirs();
g_info("Starting GNOME MPV " VERSION);
}
-static void aid_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- update_track_id(data, "set-audio-track", "aid");
-}
-
-static void vid_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- GmpvController *controller = GMPV_APPLICATION(data)->controller;
- GAction *action = g_action_map_lookup_action(data, "set-video-size");
- gint vid = 0;
-
- g_object_get(controller, "vid", &vid, NULL);
- g_simple_action_set_enabled(G_SIMPLE_ACTION(action), vid > 0);
-
- update_track_id(data, "set-video-track", "vid");
-}
-
-static void sid_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- update_track_id(data, "set-subtitle-track", "sid");
-}
-
static void idle_handler( GObject *object,
GParamSpec *pspec,
gpointer data )
{
GmpvApplication *app = data;
+ GmpvController *controller = NULL;
gboolean idle = TRUE;
- g_object_get(object, "idle", &idle, NULL);
+ for( GSList *iter = app->controllers;
+ iter && idle;
+ iter = g_slist_next(iter) )
+ {
+ gboolean current = TRUE;
+
+ g_object_get(iter->data, "idle", ¤t, NULL);
+ idle &= current;
+ controller = iter->data;
+ }
if(!idle && app->inhibit_cookie == 0)
{
+ GmpvView *view = gmpv_controller_get_view(controller);
+ GmpvMainWindow *window = gmpv_view_get_main_window(view);
+
app->inhibit_cookie
= gtk_application_inhibit
( GTK_APPLICATION(app),
- GTK_WINDOW(app->gui),
+ GTK_WINDOW(window),
GTK_APPLICATION_INHIBIT_IDLE,
_("Playing") );
}
@@ -472,56 +378,33 @@ static void idle_handler( GObject *object,
}
}
-static void ready_handler(GObject *object, GParamSpec *pspec, gpointer data)
+static void shutdown_handler(GmpvController *controller, gpointer data)
{
GmpvApplication *app = data;
- gboolean ready = FALSE;
-
- g_object_get(object, "ready", &ready, NULL);
-
- if(ready && app->files)
- {
- for(gint i = 0; app->files[i]; i++)
- {
- gmpv_controller_open
- (app->controller, app->files[i], i != 0);
- }
- g_strfreev(app->files);
- app->files = NULL;
- }
-}
+ app->controllers = g_slist_remove(app->controllers, controller);
+ g_object_unref(controller);
-static void message_handler( GmpvController *controller,
- const gchar *message,
- gpointer data )
-{
- const gsize prefix_length = sizeof(ACTION_PREFIX)-1;
-
- if(message && strncmp(message, ACTION_PREFIX, prefix_length) == 0)
+ if(!app->controllers)
{
- /* Strip prefix and activate */
- activate_action_string(data, message+prefix_length+1);
+ gmpv_application_quit(data);
}
}
-static void shutdown_handler(GmpvController *controller, gpointer data)
-{
- gmpv_application_quit(data);
-}
-
static void gmpv_application_class_init(GmpvApplicationClass *klass)
{
}
static void gmpv_application_init(GmpvApplication *app)
{
+ GSimpleAction *new_window = g_simple_action_new("new-window", NULL);
+
+ app->controllers = NULL;
app->enqueue = FALSE;
- app->no_existing_session = FALSE;
- app->action_queue = g_queue_new();
- app->files = NULL;
+ app->new_window = FALSE;
app->inhibit_cookie = 0;
- app->gui = NULL;
+
+ g_action_map_add_action(G_ACTION_MAP(app), G_ACTION(new_window));
g_application_add_main_option
( G_APPLICATION(app),
@@ -541,6 +424,14 @@ static void gmpv_application_init(GmpvApplication *app)
NULL );
g_application_add_main_option
( G_APPLICATION(app),
+ "new-window",
+ '\0',
+ G_OPTION_FLAG_NONE,
+ G_OPTION_ARG_NONE,
+ _("Create a new window"),
+ NULL );
+ g_application_add_main_option
+ ( G_APPLICATION(app),
"no-existing-session",
'\0',
G_OPTION_FLAG_NONE,
@@ -549,6 +440,8 @@ static void gmpv_application_init(GmpvApplication *app)
NULL );
g_signal_connect
+ (new_window, "activate", G_CALLBACK(new_window_handler), app);
+ g_signal_connect
(app, "handle-local-options", G_CALLBACK(options_handler), app);
g_signal_connect
(app, "command-line", G_CALLBACK(command_line_handler), app);
@@ -568,16 +461,6 @@ GmpvApplication *gmpv_application_new(gchar *id, GApplicationFlags flags)
NULL ));
}
-GmpvMainWindow *gmpv_application_get_main_window(GmpvApplication *app)
-{
- return app->gui;
-}
-
-GmpvMpv *gmpv_application_get_mpv(GmpvApplication *app)
-{
- return app->mpv;
-}
-
void gmpv_application_quit(GmpvApplication *app)
{
g_application_quit(G_APPLICATION(app));
diff --git a/src/gmpv_application.h b/src/gmpv_application.h
index 5ffdae8..928a7eb 100644
--- a/src/gmpv_application.h
+++ b/src/gmpv_application.h
@@ -32,8 +32,6 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(GmpvApplication, gmpv_application, GMPV, APPLICATION, GtkApplication)
GmpvApplication *gmpv_application_new(gchar *id, GApplicationFlags flags);
-GmpvMainWindow *gmpv_application_get_main_window(GmpvApplication *app);
-GmpvMpv *gmpv_application_get_mpv(GmpvApplication *app);
void gmpv_application_quit(GmpvApplication *app);
G_END_DECLS
diff --git a/src/gmpv_application_private.h b/src/gmpv_application_private.h
deleted file mode 100644
index b68ddcb..0000000
--- a/src/gmpv_application_private.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2016-2017 gnome-mpv
- *
- * This file is part of GNOME MPV.
- *
- * GNOME MPV 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.
- *
- * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef APPLICATION_PRIVATE_H
-#define APPLICATION_PRIVATE_H
-
-#include "gmpv_controller.h"
-#include "gmpv_model.h"
-#include "gmpv_view.h"
-
-G_BEGIN_DECLS
-
-struct _GmpvApplication
-{
- GtkApplication parent;
- GmpvController *controller;
- GmpvModel *model;
- GmpvView *view;
- gboolean enqueue;
- gboolean no_existing_session;
- GmpvMpv *mpv;
- GQueue *action_queue;
- gchar **files;
- guint inhibit_cookie;
- GmpvMainWindow *gui;
-};
-
-struct _GmpvApplicationClass
-{
- GtkApplicationClass parent_class;
-};
-
-G_END_DECLS
-
-#endif
diff --git a/src/gmpv_common.c b/src/gmpv_common.c
index 44eca6a..82ee09e 100644
--- a/src/gmpv_common.c
+++ b/src/gmpv_common.c
@@ -36,8 +36,10 @@ GmpvPlaylistEntry *gmpv_playlist_entry_new( const gchar *filename,
{
GmpvPlaylistEntry *entry = g_malloc(sizeof(GmpvPlaylistEntry));
- entry->filename = g_strdup(filename);
- entry->title = g_strdup(title);
+ entry->filename = g_strdup(filename);
+ entry->title = g_strdup(title);
+ entry->metadata = g_ptr_array_new_with_free_func
+ ((GDestroyNotify)gmpv_metadata_entry_free);
return entry;
}
@@ -46,6 +48,7 @@ void gmpv_playlist_entry_free(GmpvPlaylistEntry *entry)
{
g_free(entry->filename);
g_free(entry->title);
+ g_ptr_array_free(entry->metadata, TRUE);
g_free(entry);
}
@@ -103,6 +106,14 @@ gchar *get_scripts_dir_path(void)
NULL );
}
+gchar *get_watch_dir_path(void)
+{
+ return g_build_filename( g_get_user_config_dir(),
+ CONFIG_DIR,
+ "watch_later",
+ NULL );
+}
+
gchar *get_path_from_uri(const gchar *uri)
{
GFile *file = g_vfs_get_file_for_uri(g_vfs_get_default(), uri);
@@ -183,3 +194,37 @@ gchar *strnjoinv(const gchar *separator, const gchar **str_array, gsize count)
return result;
}
+void activate_action_string(GActionMap *map, const gchar *str)
+{
+ GAction *action = NULL;
+ gchar *name = NULL;
+ GVariant *param = NULL;
+ gboolean param_match = FALSE;
+
+ g_action_parse_detailed_name(str, &name, ¶m, NULL);
+
+ if(name)
+ {
+ const GVariantType *action_ptype;
+ const GVariantType *given_ptype;
+
+ action = g_action_map_lookup_action(map, name);
+ action_ptype = g_action_get_parameter_type(action);
+ given_ptype = param?g_variant_get_type(param):NULL;
+
+ param_match = (action_ptype == given_ptype) ||
+ ( given_ptype &&
+ g_variant_type_is_subtype_of
+ (action_ptype, given_ptype) );
+ }
+
+ if(action && param_match)
+ {
+ g_debug("Activating action %s", str);
+ g_action_activate(action, param);
+ }
+ else
+ {
+ g_warning("Failed to activate action \"%s\"", str);
+ }
+}
diff --git a/src/gmpv_common.h b/src/gmpv_common.h
index 52c4362..3bae5db 100644
--- a/src/gmpv_common.h
+++ b/src/gmpv_common.h
@@ -44,6 +44,8 @@ struct _GmpvPlaylistEntry
{
gchar *filename;
gchar *title;
+ gdouble duration;
+ GPtrArray *metadata;
};
struct _GmpvMetadataEntry
@@ -73,11 +75,13 @@ void gmpv_track_free(GmpvTrack *entry);
gchar *get_config_dir_path(void);
gchar *get_scripts_dir_path(void);
+gchar *get_watch_dir_path(void);
gchar *get_path_from_uri(const gchar *uri);
gchar *get_name_from_path(const gchar *path);
gboolean extension_matches(const gchar *filename, const gchar **extensions);
void *gslist_to_array(GSList *slist);
gchar *strnjoinv(const gchar *separator, const gchar **str_array, gsize count);
+void activate_action_string(GActionMap *map, const gchar *str);
G_END_DECLS
diff --git a/src/gmpv_control_box.c b/src/gmpv_control_box.c
index 37301ce..1fd7932 100644
--- a/src/gmpv_control_box.c
+++ b/src/gmpv_control_box.c
@@ -27,6 +27,12 @@
enum
{
PROP_0,
+ PROP_CHAPTERS_ENABLED,
+ PROP_DURATION,
+ PROP_ENABLED,
+ PROP_PAUSE,
+ PROP_SHOW_FULLSCREEN_BUTTON,
+ PROP_TIME_POSITION,
PROP_VOLUME,
N_PROPERTIES
};
@@ -43,6 +49,12 @@ struct _GmpvControlBox
GtkWidget *volume_button;
GtkWidget *fullscreen_button;
GtkWidget *seek_bar;
+ gboolean chapters_enabled;
+ gdouble duration;
+ gboolean enabled;
+ gboolean pause;
+ gboolean show_fullscreen_button;
+ gdouble time_position;
gdouble volume;
};
@@ -74,6 +86,9 @@ static void volume_changed_handler( GtkVolumeButton *button,
gdouble value,
gpointer data );
static void simple_signal_handler(GtkWidget *widget, gpointer data);
+static void set_enabled(GmpvControlBox *box, gboolean enabled);
+static void set_chapter_enabled(GmpvControlBox *box, gboolean enabled);
+static void set_playing_state(GmpvControlBox *box, gboolean playing);
static void init_button( GtkWidget *button,
const gchar *icon_name,
const gchar *tooltip_text );
@@ -87,13 +102,48 @@ static void set_property( GObject *object,
{
GmpvControlBox *self = GMPV_CONTROL_BOX(object);
- if(property_id == PROP_VOLUME)
+ switch(property_id)
{
+ case PROP_CHAPTERS_ENABLED:
+ self->chapters_enabled = g_value_get_boolean(value);
+ set_chapter_enabled(self, self->chapters_enabled);
+ break;
+
+ case PROP_DURATION:
+ self->duration = g_value_get_double(value);
+
+ gmpv_seek_bar_set_duration
+ (GMPV_SEEK_BAR(self->seek_bar), self->duration);
+ break;
+
+ case PROP_ENABLED:
+ self->enabled = g_value_get_boolean(value);
+ set_enabled(self, self->enabled);
+ break;
+
+ case PROP_PAUSE:
+ self->pause = g_value_get_boolean(value);
+ set_playing_state(self, !self->pause);
+ break;
+
+ case PROP_SHOW_FULLSCREEN_BUTTON:
+ self->show_fullscreen_button = g_value_get_boolean(value);
+ break;
+
+ case PROP_TIME_POSITION:
+ self->time_position = g_value_get_double(value);
+
+ gmpv_seek_bar_set_pos
+ (GMPV_SEEK_BAR(self->seek_bar), self->time_position);
+ break;
+
+ case PROP_VOLUME:
self->volume = g_value_get_double(value);
- }
- else
- {
+ break;
+
+ default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
}
}
@@ -104,13 +154,39 @@ static void get_property( GObject *object,
{
GmpvControlBox *self = GMPV_CONTROL_BOX(object);
- if(property_id == PROP_VOLUME)
+ switch(property_id)
{
+ case PROP_CHAPTERS_ENABLED:
+ g_value_set_boolean(value, self->chapters_enabled);
+ break;
+
+ case PROP_DURATION:
+ g_value_set_double(value, self->duration);
+ break;
+
+ case PROP_ENABLED:
+ g_value_set_boolean(value, self->enabled);
+ break;
+
+ case PROP_PAUSE:
+ g_value_set_boolean(value, self->pause);
+ break;
+
+ case PROP_SHOW_FULLSCREEN_BUTTON:
+ g_value_set_boolean(value, self->show_fullscreen_button);
+ break;
+
+ case PROP_TIME_POSITION:
+ g_value_set_double(value, self->time_position);
+ break;
+
+ case PROP_VOLUME:
g_value_set_double(value, self->volume);
- }
- else
- {
+ break;
+
+ default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
}
}
@@ -159,25 +235,65 @@ static void simple_signal_handler(GtkWidget *widget, gpointer data)
{
const GtkWidget *widget;
const gchar *name;
+ const gchar *button;
}
signal_map[]
- = { {box->play_button, "play-button-clicked"},
- {box->stop_button, "stop-button-clicked"},
- {box->forward_button, "forward-button-clicked"},
- {box->rewind_button, "rewind-button-clicked"},
- {box->previous_button, "previous-button-clicked"},
- {box->next_button, "next-button-clicked"},
- {box->fullscreen_button, "fullscreen-button-clicked"},
- {NULL, NULL} };
+ = { {box->play_button, "button-clicked", "play"},
+ {box->stop_button, "button-clicked", "stop"},
+ {box->forward_button, "button-clicked", "forward"},
+ {box->rewind_button, "button-clicked", "rewind"},
+ {box->previous_button, "button-clicked", "previous"},
+ {box->next_button, "button-clicked", "next"},
+ {box->fullscreen_button, "button-clicked", "fullscreen"},
+ {NULL, NULL, NULL} };
for(i = 0; signal_map[i].name && signal_map[i].widget != widget; i++);
if(signal_map[i].name)
{
- g_signal_emit_by_name(data, signal_map[i].name);
+ g_signal_emit_by_name
+ (data, signal_map[i].name, signal_map[i].button);
}
}
+static void set_enabled(GmpvControlBox *box, gboolean enabled)
+{
+ gtk_widget_set_sensitive(box->previous_button, enabled);
+ gtk_widget_set_sensitive(box->rewind_button, enabled);
+ gtk_widget_set_sensitive(box->stop_button, enabled);
+ gtk_widget_set_sensitive(box->play_button, enabled);
+ gtk_widget_set_sensitive(box->forward_button, enabled);
+ gtk_widget_set_sensitive(box->next_button, enabled);
+}
+
+static void set_chapter_enabled(GmpvControlBox *box, gboolean enabled)
+{
+ if(enabled)
+ {
+ gtk_widget_show_all(box->previous_button);
+ gtk_widget_show_all(box->next_button);
+ }
+ else
+ {
+ gtk_widget_hide(box->previous_button);
+ gtk_widget_hide(box->next_button);
+ }
+}
+
+static void set_playing_state(GmpvControlBox *box, gboolean playing)
+{
+ GtkWidget *image = gtk_button_get_image(GTK_BUTTON(box->play_button));
+ const gchar *tooltip = playing?_("Pause"):_("Play");
+
+ gtk_image_set_from_icon_name( GTK_IMAGE(image),
+ playing?
+ "media-playback-pause-symbolic":
+ "media-playback-start-symbolic",
+ GTK_ICON_SIZE_BUTTON );
+
+ gtk_widget_set_tooltip_text(box->play_button, tooltip);
+}
+
static void init_button( GtkWidget *button,
const gchar *icon_name,
const gchar *tooltip_text )
@@ -193,21 +309,64 @@ static void init_button( GtkWidget *button,
static void gmpv_control_box_class_init(GmpvControlBoxClass *klass)
{
- /* Names of signals that have no parameter and return nothing */
- const gchar *simple_signals[] = { "play-button-clicked",
- "stop-button-clicked",
- "forward-button-clicked",
- "rewind-button-clicked",
- "previous-button-clicked",
- "next-button-clicked",
- "fullscreen-button-clicked",
- NULL };
GObjectClass *object_class = G_OBJECT_CLASS(klass);
GParamSpec *pspec = NULL;
object_class->set_property = set_property;
object_class->get_property = get_property;
+ pspec = g_param_spec_boolean
+ ( "chapters-enabled",
+ "Chapters enabled",
+ "Whether the chapter controls are enabled",
+ FALSE,
+ G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_CHAPTERS_ENABLED, pspec);
+
+ pspec = g_param_spec_double
+ ( "duration",
+ "Duration",
+ "Duration of the file",
+ 0.0,
+ G_MAXDOUBLE,
+ 0.0,
+ G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_DURATION, pspec);
+
+ pspec = g_param_spec_boolean
+ ( "enabled",
+ "Enabled",
+ "Whether the controls are enabled",
+ TRUE,
+ G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_ENABLED, pspec);
+
+ pspec = g_param_spec_boolean
+ ( "pause",
+ "Pause",
+ "Whether there is a file playing",
+ TRUE,
+ G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_PAUSE, pspec);
+
+ pspec = g_param_spec_boolean
+ ( "show-fullscreen-button",
+ "Show fullscreen button",
+ "Whether to show fullscreen button when applicable",
+ FALSE,
+ G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_SHOW_FULLSCREEN_BUTTON, pspec);
+
+ pspec = g_param_spec_double
+ ( "time-position",
+ "Time position",
+ "The current timr position in the current file",
+ 0.0,
+ G_MAXDOUBLE,
+ 0.0,
+ G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_TIME_POSITION, pspec);
+
pspec = g_param_spec_double
( "volume",
"Volume",
@@ -218,19 +377,16 @@ static void gmpv_control_box_class_init(GmpvControlBoxClass *klass)
G_PARAM_READWRITE );
g_object_class_install_property(object_class, PROP_VOLUME, pspec);
- for(gint i = 0; simple_signals[i]; i++)
- {
- g_signal_new( simple_signals[i],
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_FIRST,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0 );
- }
-
+ g_signal_new( "button-clicked",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_STRING );
g_signal_new( "seek",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
@@ -241,7 +397,6 @@ static void gmpv_control_box_class_init(GmpvControlBoxClass *klass)
G_TYPE_NONE,
1,
G_TYPE_DOUBLE );
-
g_signal_new( "volume-changed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
@@ -265,6 +420,13 @@ static void gmpv_control_box_init(GmpvControlBox *box)
box->fullscreen_button = gtk_button_new();
box->volume_button = gtk_volume_button_new();
box->seek_bar = gmpv_seek_bar_new();
+ box->chapters_enabled = FALSE;
+ box->duration = 0.0;
+ box->enabled = TRUE;
+ box->pause = TRUE;
+ box->show_fullscreen_button = FALSE;
+ box->time_position = 0.0;
+ box->volume = 0.0;
init_button( box->play_button,
"media-playback-start-symbolic",
@@ -360,30 +522,6 @@ GtkWidget *gmpv_control_box_new(void)
return GTK_WIDGET(g_object_new(gmpv_control_box_get_type(), NULL));
}
-void gmpv_control_box_set_enabled(GmpvControlBox *box, gboolean enabled)
-{
- gtk_widget_set_sensitive(box->previous_button, enabled);
- gtk_widget_set_sensitive(box->rewind_button, enabled);
- gtk_widget_set_sensitive(box->stop_button, enabled);
- gtk_widget_set_sensitive(box->play_button, enabled);
- gtk_widget_set_sensitive(box->forward_button, enabled);
- gtk_widget_set_sensitive(box->next_button, enabled);
-}
-
-void gmpv_control_box_set_chapter_enabled(GmpvControlBox *box, gboolean enabled)
-{
- if(enabled)
- {
- gtk_widget_show_all(box->previous_button);
- gtk_widget_show_all(box->next_button);
- }
- else
- {
- gtk_widget_hide(box->previous_button);
- gtk_widget_hide(box->next_button);
- }
-}
-
void gmpv_control_box_set_seek_bar_pos(GmpvControlBox *box, gdouble pos)
{
gmpv_seek_bar_set_pos(GMPV_SEEK_BAR(box->seek_bar), pos);
@@ -416,20 +554,6 @@ gboolean gmpv_control_box_get_volume_popup_visible(GmpvControlBox *box)
return gtk_widget_is_visible(gtk_scale_button_get_popup(volume_button));
}
-void gmpv_control_box_set_playing_state(GmpvControlBox *box, gboolean playing)
-{
- GtkWidget *image = gtk_button_get_image(GTK_BUTTON(box->play_button));
- const gchar *tooltip = playing?_("Pause"):_("Play");
-
- gtk_image_set_from_icon_name( GTK_IMAGE(image),
- playing?
- "media-playback-pause-symbolic":
- "media-playback-start-symbolic",
- GTK_ICON_SIZE_BUTTON );
-
- gtk_widget_set_tooltip_text(box->play_button, tooltip);
-}
-
void gmpv_control_box_set_fullscreen_state( GmpvControlBox *box,
gboolean fullscreen )
{
@@ -440,19 +564,16 @@ void gmpv_control_box_set_fullscreen_state( GmpvControlBox *box,
"view-restore-symbolic":
"view-fullscreen-symbolic",
GTK_ICON_SIZE_BUTTON );
-}
-void gmpv_control_box_set_fullscreen_button_visible( GmpvControlBox *box,
- gboolean value )
-{
- gtk_widget_set_visible(box->fullscreen_button, value);
+ gtk_widget_set_visible( box->fullscreen_button,
+ !fullscreen && box->show_fullscreen_button );
}
void gmpv_control_box_reset(GmpvControlBox *box)
{
gmpv_control_box_set_seek_bar_pos(box, 0);
gmpv_control_box_set_seek_bar_duration(box, 0);
- gmpv_control_box_set_playing_state(box, FALSE);
- gmpv_control_box_set_chapter_enabled(box, FALSE);
+ set_playing_state(box, FALSE);
+ set_chapter_enabled(box, FALSE);
gmpv_control_box_set_fullscreen_state(box, FALSE);
}
diff --git a/src/gmpv_control_box.h b/src/gmpv_control_box.h
index e5ca0bf..16a8fa1 100644
--- a/src/gmpv_control_box.h
+++ b/src/gmpv_control_box.h
@@ -32,17 +32,13 @@ G_DECLARE_FINAL_TYPE(GmpvControlBox, gmpv_control_box, GMPV, CONTROL_BOX, GtkBox
GtkWidget *gmpv_control_box_new(void);
void gmpv_control_box_set_enabled(GmpvControlBox *box, gboolean enabled);
-void gmpv_control_box_set_chapter_enabled(GmpvControlBox *box, gboolean enabled);
void gmpv_control_box_set_seek_bar_pos(GmpvControlBox *box, gdouble pos);
void gmpv_control_box_set_seek_bar_duration(GmpvControlBox *box, gint duration);
void gmpv_control_box_set_volume(GmpvControlBox *box, gdouble volume);
gdouble gmpv_control_box_get_volume(GmpvControlBox *box);
gboolean gmpv_control_box_get_volume_popup_visible(GmpvControlBox *box);
-void gmpv_control_box_set_playing_state(GmpvControlBox *box, gboolean playing);
void gmpv_control_box_set_fullscreen_state( GmpvControlBox *box,
gboolean fullscreen );
-void gmpv_control_box_set_fullscreen_button_visible( GmpvControlBox *box,
- gboolean value );
void gmpv_control_box_reset(GmpvControlBox *box);
G_END_DECLS
diff --git a/src/gmpv_controller.c b/src/gmpv_controller.c
index c09b1c8..9a1eef3 100644
--- a/src/gmpv_controller.c
+++ b/src/gmpv_controller.c
@@ -26,6 +26,7 @@
#include "gmpv_controller_private.h"
#include "gmpv_controller.h"
+#include "gmpv_controller_actions.h"
#include "gmpv_controller_input.h"
#include "gmpv_def.h"
@@ -38,6 +39,13 @@ static void get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec );
+static void dispose(GObject *object);
+static void mpris_enable_handler( GSettings *settings,
+ gchar *key,
+ gpointer data );
+static void media_keys_enable_handler( GSettings *settings,
+ gchar *key,
+ gpointer data );
static void view_ready_handler(GmpvView *view, gpointer data);
static void render_handler(GmpvView *view, gpointer data);
static void preferences_updated_handler(GmpvView *view, gpointer data);
@@ -65,22 +73,6 @@ static void playlist_reordered_handler( GmpvView *view,
gpointer data );
static void connect_signals(GmpvController *controller);
static gboolean update_seek_bar(gpointer data);
-static gboolean track_str_to_int( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data );
-static gboolean int_to_track_str( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data );
-static gboolean loop_str_to_boolean( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data );
-static gboolean boolean_to_loop_str( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data );
static gboolean is_more_than_one( GBinding *binding,
const GValue *from_value,
GValue *to_value,
@@ -91,21 +83,37 @@ static void idle_active_handler( GObject *object,
static void playlist_handler( GObject *object,
GParamSpec *pspec,
gpointer data);
+static void vid_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data);
static void model_ready_handler( GObject *object,
GParamSpec *pspec,
gpointer data );
static void frame_ready_handler(GmpvModel *model, gpointer data);
-static void autofit_handler(GmpvModel *model, gdouble multiplier, gpointer data);
+static void metadata_update_handler(GmpvModel *model, gint64 pos, gpointer data);
+static void window_resize_handler( GmpvModel *model,
+ gint64 width,
+ gint64 height,
+ gpointer data );
+static void window_move_handler( GmpvModel *model,
+ gboolean flip_x,
+ gboolean flip_y,
+ GValue *x,
+ GValue *y,
+ gpointer data );
static void message_handler(GmpvMpv *mpv, const gchar *message, gpointer data);
static void error_handler(GmpvMpv *mpv, const gchar *message, gpointer data);
static void shutdown_handler(GmpvMpv *mpv, gpointer data);
-static void post_shutdown_handler(GmpvMpv *mpv, gpointer data);
+static void fullscreen_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data );
static void play_button_handler(GtkButton *button, gpointer data);
static void stop_button_handler(GtkButton *button, gpointer data);
static void forward_button_handler(GtkButton *button, gpointer data);
static void rewind_button_handler(GtkButton *button, gpointer data);
static void next_button_handler(GtkButton *button, gpointer data);
static void previous_button_handler(GtkButton *button, gpointer data);
+static void fullscreen_button_handler(GtkButton *button, gpointer data);
static void seek_handler(GtkButton *button, gdouble value, gpointer data);
static void gmpv_controller_class_init(GmpvControllerClass *klass);
static void gmpv_controller_init(GmpvController *controller);
@@ -114,10 +122,45 @@ G_DEFINE_TYPE(GmpvController, gmpv_controller, G_TYPE_OBJECT)
static void constructed(GObject *object)
{
- GmpvController *controller = GMPV_CONTROLLER(object);
+ GmpvController *controller;
+ GmpvMainWindow *window;
+ gboolean always_floating;
+ gint64 wid;
+
+ controller = GMPV_CONTROLLER(object);
+ always_floating = g_settings_get_boolean
+ ( controller->settings,
+ "always-use-floating-controls" );
+
+ controller->view = gmpv_view_new(controller->app, always_floating);
+ window = gmpv_view_get_main_window(controller->view);
+ wid = gmpv_video_area_get_xid(gmpv_main_window_get_video_area(window));
+ controller->model = gmpv_model_new(wid);
connect_signals(controller);
+ gmpv_controller_action_register_actions(controller);
gmpv_controller_input_connect_signals(controller);
+
+ g_signal_connect( controller->settings,
+ "changed::mpris-enable",
+ G_CALLBACK(mpris_enable_handler),
+ controller );
+ g_signal_connect( controller->settings,
+ "changed::media-keys-enable",
+ G_CALLBACK(media_keys_enable_handler),
+ controller );
+
+ if(g_settings_get_boolean(controller->settings, "mpris-enable"))
+ {
+ controller->mpris = gmpv_mpris_new(controller);
+ }
+
+ if(g_settings_get_boolean(controller->settings, "media-keys-enable"))
+ {
+ controller->media_keys = gmpv_media_keys_new(controller);
+ }
+
+ G_OBJECT_CLASS(gmpv_controller_parent_class)->constructed(object);
}
static void set_property( GObject *object,
@@ -129,34 +172,14 @@ static void set_property( GObject *object,
switch(property_id)
{
- case PROP_MODEL:
- self->model = g_value_get_pointer(value);
- break;
-
- case PROP_VIEW:
- self->view = g_value_get_pointer(value);
+ case PROP_APP:
+ self->app = g_value_get_pointer(value);
break;
case PROP_READY:
self->ready = g_value_get_boolean(value);
break;
- case PROP_AID:
- self->aid = g_value_get_int(value);
- break;
-
- case PROP_VID:
- self->vid = g_value_get_int(value);
- break;
-
- case PROP_SID:
- self->sid = g_value_get_int(value);
- break;
-
- case PROP_LOOP:
- self->loop = g_value_get_boolean(value);
- break;
-
case PROP_IDLE:
self->idle = g_value_get_boolean(value);
break;
@@ -176,34 +199,14 @@ static void get_property( GObject *object,
switch(property_id)
{
- case PROP_MODEL:
- g_value_set_pointer(value, self->model);
- break;
-
- case PROP_VIEW:
- g_value_set_pointer(value, self->view);
+ case PROP_APP:
+ g_value_set_pointer(value, self->app);
break;
case PROP_READY:
g_value_set_boolean(value, self->ready);
break;
- case PROP_AID:
- g_value_set_int(value, self->aid);
- break;
-
- case PROP_VID:
- g_value_set_int(value, self->vid);
- break;
-
- case PROP_SID:
- g_value_set_int(value, self->sid);
- break;
-
- case PROP_LOOP:
- g_value_set_boolean(value, self->loop);
- break;
-
case PROP_IDLE:
g_value_set_boolean(value, self->idle);
break;
@@ -214,6 +217,62 @@ static void get_property( GObject *object,
}
}
+static void dispose(GObject *object)
+{
+ GmpvController *controller = GMPV_CONTROLLER(object);
+
+ g_clear_object(&controller->settings);
+ g_clear_object(&controller->mpris);
+ g_clear_object(&controller->media_keys);
+
+ if(controller->update_seekbar_id != 0)
+ {
+ g_source_remove(controller->update_seekbar_id);
+ controller->update_seekbar_id = 0;
+ }
+
+ if(controller->view)
+ {
+ gmpv_view_make_gl_context_current(controller->view);
+ g_clear_object(&controller->model);
+ g_clear_object(&controller->view);
+ }
+
+ G_OBJECT_CLASS(gmpv_controller_parent_class)->dispose(object);
+}
+
+static void mpris_enable_handler( GSettings *settings,
+ gchar *key,
+ gpointer data )
+{
+ GmpvController *controller = data;
+
+ if(!controller->mpris && g_settings_get_boolean(settings, key))
+ {
+ controller->mpris = gmpv_mpris_new(controller);
+ }
+ else if(controller->mpris)
+ {
+ g_clear_object(&controller->mpris);
+ }
+}
+
+static void media_keys_enable_handler( GSettings *settings,
+ gchar *key,
+ gpointer data )
+{
+ GmpvController *controller = data;
+
+ if(!controller->media_keys && g_settings_get_boolean(settings, key))
+ {
+ controller->media_keys = gmpv_media_keys_new(controller);
+ }
+ else if(controller->media_keys)
+ {
+ g_clear_object(&controller->media_keys);
+ }
+}
+
static void view_ready_handler(GmpvView *view, gpointer data)
{
gmpv_model_initialize(GMPV_CONTROLLER(data)->model);
@@ -229,11 +288,6 @@ static void render_handler(GmpvView *view, gpointer data)
scale = gmpv_view_get_scale_factor(controller->view);
gmpv_view_get_video_area_geometry(controller->view, &width, &height);
gmpv_model_render_frame(controller->model, scale*width, scale*height);
-
- while(gtk_events_pending())
- {
- gtk_main_iteration();
- }
}
static void preferences_updated_handler(GmpvView *view, gpointer data)
@@ -278,7 +332,6 @@ static void grab_handler(GmpvView *view, gboolean was_grabbed, gpointer data)
static void delete_handler(GmpvView *view, gpointer data)
{
- gmpv_model_quit(GMPV_CONTROLLER(data)->model);
g_signal_emit_by_name(data, "shutdown");
}
@@ -319,38 +372,9 @@ static void playlist_reordered_handler( GmpvView *view,
static void connect_signals(GmpvController *controller)
{
- g_object_bind_property_full( controller->model, "aid",
- controller, "aid",
- G_BINDING_BIDIRECTIONAL,
- track_str_to_int,
- int_to_track_str,
- NULL,
- NULL );
- g_object_bind_property_full( controller->model, "vid",
- controller, "vid",
- G_BINDING_BIDIRECTIONAL,
- track_str_to_int,
- int_to_track_str,
- NULL,
- NULL );
- g_object_bind_property_full( controller->model, "sid",
- controller, "sid",
- G_BINDING_BIDIRECTIONAL,
- track_str_to_int,
- int_to_track_str,
- NULL,
- NULL );
- g_object_bind_property_full( controller->model, "loop",
- controller, "loop",
- G_BINDING_BIDIRECTIONAL,
- loop_str_to_boolean,
- boolean_to_loop_str,
- NULL,
- NULL );
g_object_bind_property( controller->model, "core-idle",
controller, "idle",
G_BINDING_DEFAULT );
-
g_object_bind_property( controller->model, "pause",
controller->view, "pause",
G_BINDING_DEFAULT );
@@ -390,12 +414,24 @@ static void connect_signals(GmpvController *controller)
G_CALLBACK(playlist_handler),
controller );
g_signal_connect( controller->model,
+ "notify::vid",
+ G_CALLBACK(vid_handler),
+ controller );
+ g_signal_connect( controller->model,
"frame-ready",
G_CALLBACK(frame_ready_handler),
controller );
g_signal_connect( controller->model,
- "autofit",
- G_CALLBACK(autofit_handler),
+ "metadata-update",
+ G_CALLBACK(metadata_update_handler),
+ controller );
+ g_signal_connect( controller->model,
+ "window-resize",
+ G_CALLBACK(window_resize_handler),
+ controller );
+ g_signal_connect( controller->model,
+ "window-move",
+ G_CALLBACK(window_move_handler),
controller );
g_signal_connect( controller->model,
"message",
@@ -409,12 +445,12 @@ static void connect_signals(GmpvController *controller)
"shutdown",
G_CALLBACK(shutdown_handler),
controller );
- g_signal_connect_after( controller->model,
- "shutdown",
- G_CALLBACK(post_shutdown_handler),
- controller );
g_signal_connect( controller->view,
+ "notify::fullscreen",
+ G_CALLBACK(fullscreen_handler),
+ controller );
+ g_signal_connect( controller->view,
"button-clicked::play",
G_CALLBACK(play_button_handler),
controller );
@@ -439,6 +475,10 @@ static void connect_signals(GmpvController *controller)
G_CALLBACK(previous_button_handler),
controller );
g_signal_connect( controller->view,
+ "button-clicked::fullscreen",
+ G_CALLBACK(fullscreen_button_handler),
+ controller );
+ g_signal_connect( controller->view,
"seek",
G_CALLBACK(seek_handler),
controller );
@@ -504,63 +544,6 @@ gboolean update_seek_bar(gpointer data)
return TRUE;
}
-static gboolean track_str_to_int( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data )
-{
- gchar *endptr = NULL;
- const gchar *from = g_value_get_string(from_value);
- gint to = (gint)g_ascii_strtoll(from, &endptr, 10);
-
- if(to == 0 && g_strcmp0(from, "no") != 0)
- {
- to = -1;
- }
-
- g_value_set_int(to_value, to);
-
- return TRUE;
-}
-
-static gboolean int_to_track_str( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data )
-{
- gint from = g_value_get_int(from_value);
- gchar buf[16] = "no";
-
- g_snprintf(buf, 16, "%d", from);
- g_value_set_string(to_value, buf);
-
- return TRUE;
-}
-
-static gboolean loop_str_to_boolean( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data )
-{
- const gchar *from = g_value_get_string(from_value);
-
- g_value_set_boolean(to_value, g_strcmp0(from, "no") != 0);
-
- return TRUE;
-}
-
-static gboolean boolean_to_loop_str( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer data )
-{
- gboolean from = g_value_get_boolean(from_value);
-
- g_value_set_string(to_value, from?"inf":"no");
-
- return TRUE;
-}
-
static gboolean is_more_than_one( GBinding *binding,
const GValue *from_value,
GValue *to_value,
@@ -601,11 +584,33 @@ static void playlist_handler( GObject *object,
GPtrArray *playlist = NULL;
gint64 pos = 0;
- g_object_get(object, "playlist", &playlist, "playlist-pos", &pos, NULL);
+ g_object_get( object,
+ "playlist", &playlist,
+ "playlist-pos", &pos,
+ NULL );
+
gmpv_view_update_playlist(view, playlist);
gmpv_view_set_playlist_pos(view, pos);
}
+static void vid_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ GmpvController *controller = data;
+ GmpvMainWindow *window = gmpv_view_get_main_window(controller->view);
+ GActionMap *map = G_ACTION_MAP(window);
+ GAction *action = g_action_map_lookup_action(map, "set-video-size");
+ gchar *vid_str = NULL;
+ gint64 vid = 0;
+
+ g_object_get(object, "vid", &vid_str, NULL);
+ vid = g_ascii_strtoll(vid_str, NULL, 10);
+ g_simple_action_set_enabled(G_SIMPLE_ACTION(action), vid > 0);
+
+ g_free(vid_str);
+}
+
static void model_ready_handler( GObject *object,
GParamSpec *pspec,
gpointer data )
@@ -639,33 +644,68 @@ static void frame_ready_handler(GmpvModel *model, gpointer data)
gmpv_view_queue_render(GMPV_CONTROLLER(data)->view);
}
-static void autofit_handler(GmpvModel *model, gdouble multiplier, gpointer data)
+static void metadata_update_handler(GmpvModel *model, gint64 pos, gpointer data)
{
- GmpvController *controller = data;
- gint64 width = -1;
- gint64 height = -1;
-
- gmpv_model_get_video_geometry(model, &width, &height);
-
- if(width > 0 && height > 0)
- {
- gint new_width;
- gint new_height;
+ GmpvView *view = GMPV_CONTROLLER(data)->view;
+ GPtrArray *playlist = NULL;
- new_width = (gint)(multiplier*(gdouble)width);
- new_height = (gint)(multiplier*(gdouble)height);
+ g_object_get(G_OBJECT(model), "playlist", &playlist, NULL);
+ gmpv_view_update_playlist(view, playlist);
+}
- g_debug("Resizing window to %dx%d", new_width, new_height);
+static void window_resize_handler( GmpvModel *model,
+ gint64 width,
+ gint64 height,
+ gpointer data )
+{
+ GmpvController *controller = data;
- gmpv_view_resize_video_area
- (controller->view, new_width, new_height);
- }
+ gmpv_view_resize_video_area(controller->view, (gint)width, (gint)height);
+}
+static void window_move_handler( GmpvModel *model,
+ gboolean flip_x,
+ gboolean flip_y,
+ GValue *x,
+ GValue *y,
+ gpointer data )
+{
+ gmpv_view_move(GMPV_CONTROLLER(data)->view, flip_x, flip_y, x, y);
}
static void message_handler(GmpvMpv *mpv, const gchar *message, gpointer data)
{
- g_signal_emit_by_name(data, "message", message);
+ const gsize prefix_length = sizeof(ACTION_PREFIX)-1;
+
+ /* Verify that both the prefix and the scope matches */
+ if(message && strncmp(message, ACTION_PREFIX, prefix_length) == 0)
+ {
+ const gchar *action = message+prefix_length+1;
+ GmpvController *controller = data;
+ GmpvView *view = controller->view;
+ GActionMap *map = NULL;
+
+ if(g_str_has_prefix(action, "win."))
+ {
+ map = G_ACTION_MAP(gmpv_view_get_main_window(view));
+ }
+ else if(g_str_has_prefix(action, "app."))
+ {
+ map = G_ACTION_MAP(controller->app);
+ }
+
+ if(map)
+ {
+ /* Strip scope and activate */
+ activate_action_string(map, strchr(action, '.')+1);
+ }
+ else
+ {
+ g_warning( "Received action with missing or "
+ "unknown scope %s",
+ action );
+ }
+ }
}
static void error_handler(GmpvMpv *mpv, const gchar *message, gpointer data)
@@ -679,15 +719,29 @@ static void error_handler(GmpvMpv *mpv, const gchar *message, gpointer data)
static void shutdown_handler(GmpvMpv *mpv, gpointer data)
{
- GmpvController *controller = data;
-
- g_source_remove(controller->update_seekbar_id);
- gmpv_view_make_gl_context_current(controller->view);
+ g_signal_emit_by_name(data, "shutdown");
}
-static void post_shutdown_handler(GmpvMpv *mpv, gpointer data)
+static void fullscreen_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
{
- gmpv_view_quit(GMPV_CONTROLLER(data)->view);
+ GmpvView *view = GMPV_CONTROLLER(data)->view;
+ GmpvMainWindow *window = gmpv_view_get_main_window(view);
+ GActionMap *map = G_ACTION_MAP(window);
+ GAction *toggle_playlist = NULL;
+ GAction *toggle_controls = NULL;
+ gboolean fullscreen = FALSE;
+
+ toggle_playlist = g_action_map_lookup_action(map, "toggle-playlist");
+ toggle_controls = g_action_map_lookup_action(map, "toggle-controls");
+
+ g_object_get(view, "fullscreen", &fullscreen, NULL);
+
+ g_simple_action_set_enabled
+ (G_SIMPLE_ACTION(toggle_playlist), !fullscreen);
+ g_simple_action_set_enabled
+ (G_SIMPLE_ACTION(toggle_controls), !fullscreen);
}
static void play_button_handler(GtkButton *button, gpointer data)
@@ -732,6 +786,15 @@ static void previous_button_handler(GtkButton *button, gpointer data)
gmpv_model_previous_chapter(GMPV_CONTROLLER(data)->model);
}
+static void fullscreen_button_handler(GtkButton *button, gpointer data)
+{
+ GmpvView *view = GMPV_CONTROLLER(data)->view;
+ gboolean fullscreen = FALSE;
+
+ g_object_get(view, "fullscreen", &fullscreen, NULL);
+ g_object_set(view, "fullscreen", !fullscreen, NULL);
+}
+
static void seek_handler(GtkButton *button, gdouble value, gpointer data)
{
gmpv_model_seek(GMPV_CONTROLLER(data)->model, value);
@@ -745,50 +808,14 @@ static void gmpv_controller_class_init(GmpvControllerClass *klass)
obj_class->constructed = constructed;
obj_class->set_property = set_property;
obj_class->get_property = get_property;
+ obj_class->dispose = dispose;
pspec = g_param_spec_pointer
- ( "model",
- "Model",
- "The GmpvModel to use",
- G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
- g_object_class_install_property(obj_class, PROP_MODEL, pspec);
-
- pspec = g_param_spec_pointer
- ( "view",
- "View",
- "The GmpvView to use",
+ ( "app",
+ "App",
+ "The GmpvApplication to use",
G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
- g_object_class_install_property(obj_class, PROP_VIEW, pspec);
-
- pspec = g_param_spec_int
- ( "aid",
- "Audio track ID",
- "The ID of the current audio track",
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READWRITE );
- g_object_class_install_property(obj_class, PROP_AID, pspec);
-
- pspec = g_param_spec_int
- ( "vid",
- "Video track ID",
- "The ID of the current video track",
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READWRITE );
- g_object_class_install_property(obj_class, PROP_VID, pspec);
-
- pspec = g_param_spec_int
- ( "sid",
- "Subtitle track ID",
- "The ID of the current subtitle track",
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READWRITE );
- g_object_class_install_property(obj_class, PROP_SID, pspec);
+ g_object_class_install_property(obj_class, PROP_APP, pspec);
pspec = g_param_spec_boolean
( "ready",
@@ -799,14 +826,6 @@ static void gmpv_controller_class_init(GmpvControllerClass *klass)
g_object_class_install_property(obj_class, PROP_READY, pspec);
pspec = g_param_spec_boolean
- ( "loop",
- "Loop",
- "Whether or not to loop when the playlist ends",
- FALSE,
- G_PARAM_READWRITE );
- g_object_class_install_property(obj_class, PROP_LOOP, pspec);
-
- pspec = g_param_spec_boolean
( "idle",
"Idle",
"Whether or not the player is idle",
@@ -814,16 +833,6 @@ static void gmpv_controller_class_init(GmpvControllerClass *klass)
G_PARAM_READWRITE );
g_object_class_install_property(obj_class, PROP_IDLE, pspec);
- g_signal_new( "message",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_FIRST,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE,
- 1,
- G_TYPE_STRING );
g_signal_new( "shutdown",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
@@ -837,26 +846,22 @@ static void gmpv_controller_class_init(GmpvControllerClass *klass)
static void gmpv_controller_init(GmpvController *controller)
{
+ controller->app = NULL;
controller->model = NULL;
controller->view = NULL;
- controller->aid = 0;
- controller->vid = 0;
- controller->sid = 0;
controller->ready = FALSE;
- controller->loop = FALSE;
controller->idle = TRUE;
- controller->action_queue = g_queue_new();
- controller->files = NULL;
- controller->inhibit_cookie = 0;
controller->target_playlist_pos = -1;
controller->update_seekbar_id = 0;
+ controller->settings = g_settings_new(CONFIG_ROOT);
+ controller->media_keys = NULL;
+ controller->mpris = NULL;
}
-GmpvController *gmpv_controller_new(GmpvModel *model, GmpvView *view)
+GmpvController *gmpv_controller_new(GmpvApplication *app)
{
return GMPV_CONTROLLER(g_object_new( gmpv_controller_get_type(),
- "model", model,
- "view", view,
+ "app", app,
NULL ));
}
@@ -899,3 +904,14 @@ void gmpv_controller_open( GmpvController *controller,
{
gmpv_model_load_file(controller->model, uri, append);
}
+
+GmpvView *gmpv_controller_get_view(GmpvController *controller)
+{
+ return controller->view;
+}
+
+GmpvModel *gmpv_controller_get_model(GmpvController *controller)
+{
+ return controller->model;
+}
+
diff --git a/src/gmpv_controller.h b/src/gmpv_controller.h
index 34e09f8..16fc54a 100644
--- a/src/gmpv_controller.h
+++ b/src/gmpv_controller.h
@@ -31,13 +31,15 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(GmpvController, gmpv_controller, GMPV, CONTROLLER, GObject)
-GmpvController *gmpv_controller_new(GmpvModel *model, GmpvView *view);
+GmpvController *gmpv_controller_new(GmpvApplication *app);
void gmpv_controller_quit(GmpvController *controller);
void gmpv_controller_autofit(GmpvController *controller, gdouble multiplier);
void gmpv_controller_present(GmpvController *controller);
void gmpv_controller_open( GmpvController *controller,
const gchar *urii,
gboolean append );
+GmpvView *gmpv_controller_get_view(GmpvController *controller);
+GmpvModel *gmpv_controller_get_model(GmpvController *controller);
G_END_DECLS
diff --git a/src/gmpv_application_action.c b/src/gmpv_controller_actions.c
similarity index 69%
rename from src/gmpv_application_action.c
rename to src/gmpv_controller_actions.c
index 8b0495c..f6653f5 100644
--- a/src/gmpv_application_action.c
+++ b/src/gmpv_controller_actions.c
@@ -19,9 +19,9 @@
#include <glib/gi18n.h>
-#include "gmpv_application_action.h"
+#include "gmpv_controller_actions.h"
+#include "gmpv_controller_private.h"
#include "gmpv_file_chooser.h"
-#include "gmpv_application_private.h"
#include "gmpv_common.h"
static gboolean track_id_to_state( GBinding *binding,
@@ -32,15 +32,18 @@ static gboolean state_to_track_id( GBinding *binding,
const GValue *from_value,
GValue *to_value,
gpointer user_data );
-static gboolean boolean_to_state( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer user_data );
-static gboolean state_to_boolean( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer user_data );
-static void bind_properties(GmpvApplication *app);
+static gboolean loop_to_state( GBinding *binding,
+ const GValue *from_value,
+ GValue *to_value,
+ gpointer user_data );
+static gboolean state_to_loop( GBinding *binding,
+ const GValue *from_value,
+ GValue *to_value,
+ gpointer user_data );
+static void bind_properties(GmpvController *controller);
+static void open_handler( GSimpleAction *action,
+ GVariant *param,
+ gpointer data );
static void show_open_dialog_handler( GSimpleAction *action,
GVariant *param,
gpointer data );
@@ -62,6 +65,9 @@ static void toggle_playlist_handler( GSimpleAction *action,
static void save_playlist_handler( GSimpleAction *action,
GVariant *param,
gpointer data );
+static void shuffle_playlist_handler( GSimpleAction *action,
+ GVariant *param,
+ gpointer data );
static void remove_selected_playlist_item_handler( GSimpleAction *action,
GVariant *param,
gpointer data );
@@ -104,8 +110,9 @@ static gboolean track_id_to_state( GBinding *binding,
GValue *to_value,
gpointer user_data )
{
- gint64 id = g_value_get_int(from_value);
- GVariant *to = g_variant_new("x", id);
+ const gchar *id = g_value_get_string(from_value);
+ gint64 value = g_strcmp0(id, "no") == 0?0:g_ascii_strtoll(id, NULL, 10);
+ GVariant *to = g_variant_new("x", value);
g_value_set_variant(to_value, to);
@@ -119,45 +126,49 @@ static gboolean state_to_track_id( GBinding *binding,
{
GVariant *from = g_value_get_variant(from_value);
gint64 id = g_variant_get_int64(from);
+ gchar *value = id <= 0?
+ g_strdup("no"):
+ g_strdup_printf("%" G_GINT64_FORMAT, id);
- g_value_set_int(to_value, (gint)id);
+ g_value_take_string(to_value, value);
return TRUE;
}
-static gboolean boolean_to_state( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer user_data )
+static gboolean loop_to_state( GBinding *binding,
+ const GValue *from_value,
+ GValue *to_value,
+ gpointer user_data )
{
- gboolean from = g_value_get_boolean(from_value);
- GVariant *to = g_variant_new("b", from);
+ const gchar *from = g_value_get_string(from_value);
+ GVariant *to = g_variant_new("b", g_strcmp0(from, "no") != 0);
g_value_set_variant(to_value, to);
return TRUE;
}
-static gboolean state_to_boolean( GBinding *binding,
- const GValue *from_value,
- GValue *to_value,
- gpointer user_data )
+static gboolean state_to_loop( GBinding *binding,
+ const GValue *from_value,
+ GValue *to_value,
+ gpointer user_data )
{
GVariant *from = g_value_get_variant(from_value);
gboolean to = g_variant_get_boolean(from);
- g_value_set_boolean(to_value, to);
+ g_value_set_static_string(to_value, to?"inf":"no");
return TRUE;
}
-static void bind_properties(GmpvApplication *app)
+static void bind_properties(GmpvController *controller)
{
+ GmpvMainWindow *window = gmpv_view_get_main_window(controller->view);
GAction *action = NULL;
action = g_action_map_lookup_action
- (G_ACTION_MAP(app), "set-audio-track");
- g_object_bind_property_full( app->controller, "aid",
+ (G_ACTION_MAP(window), "set-audio-track");
+ g_object_bind_property_full( controller->model, "aid",
action, "state",
G_BINDING_BIDIRECTIONAL,
track_id_to_state,
@@ -166,8 +177,8 @@ static void bind_properties(GmpvApplication *app)
NULL );
action = g_action_map_lookup_action
- (G_ACTION_MAP(app), "set-video-track");
- g_object_bind_property_full( app->controller, "vid",
+ (G_ACTION_MAP(window), "set-video-track");
+ g_object_bind_property_full( controller->model, "vid",
action, "state",
G_BINDING_BIDIRECTIONAL,
track_id_to_state,
@@ -176,8 +187,8 @@ static void bind_properties(GmpvApplication *app)
NULL );
action = g_action_map_lookup_action
- (G_ACTION_MAP(app), "set-subtitle-track");
- g_object_bind_property_full( app->controller, "sid",
+ (G_ACTION_MAP(window), "set-subtitle-track");
+ g_object_bind_property_full( controller->model, "sid",
action, "state",
G_BINDING_BIDIRECTIONAL,
track_id_to_state,
@@ -186,16 +197,29 @@ static void bind_properties(GmpvApplication *app)
NULL );
action = g_action_map_lookup_action
- (G_ACTION_MAP(app), "toggle-loop");
- g_object_bind_property_full( app->controller, "loop",
+ (G_ACTION_MAP(window), "toggle-loop");
+ g_object_bind_property_full( controller->model, "loop-playlist",
action, "state",
G_BINDING_BIDIRECTIONAL,
- boolean_to_state,
- state_to_boolean,
+ loop_to_state,
+ state_to_loop,
NULL,
NULL );
}
+static void open_handler( GSimpleAction *action,
+ GVariant *param,
+ gpointer data )
+{
+ gchar *uri = NULL;
+ gboolean append = FALSE;
+
+ g_variant_get(param, "(sb)", &uri, &append);
+ gmpv_controller_open(data, uri, append);
+
+ g_free(uri);
+}
+
static void show_open_dialog_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
@@ -203,7 +227,7 @@ static void show_open_dialog_handler( GSimpleAction *action,
gboolean append = g_variant_get_boolean(param);
gmpv_view_show_open_dialog
- (GMPV_APPLICATION(data)->view, append);
+ (gmpv_controller_get_view(data), append);
}
static void show_open_location_dialog_handler( GSimpleAction *action,
@@ -213,7 +237,7 @@ static void show_open_location_dialog_handler( GSimpleAction *action,
gboolean append = g_variant_get_boolean(param);
gmpv_view_show_open_location_dialog
- (GMPV_APPLICATION(data)->view, append);
+ (gmpv_controller_get_view(data), append);
}
static void toggle_loop_handler( GSimpleAction *action,
@@ -227,45 +251,49 @@ static void show_shortcuts_dialog_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_view_show_shortcuts_dialog(GMPV_APPLICATION(data)->view);
+ gmpv_view_show_shortcuts_dialog(gmpv_controller_get_view(data));
}
static void toggle_controls_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- GmpvApplication *app = data;
- GmpvMainWindow *wnd = gmpv_application_get_main_window(app);
- GmpvControlBox *ctrl = gmpv_main_window_get_control_box(wnd);
- gboolean visible = gtk_widget_get_visible(GTK_WIDGET(ctrl));
+ GmpvView *view = gmpv_controller_get_view(data);
+ gboolean visible = gmpv_view_get_controls_visible(view);
- gtk_widget_set_visible(GTK_WIDGET(ctrl), !visible);
+ gmpv_view_set_controls_visible(view, !visible);
}
static void toggle_playlist_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- GmpvApplication *app = data;
- GmpvMainWindow *wnd = gmpv_application_get_main_window(app);
- gboolean visible = gmpv_main_window_get_playlist_visible(wnd);
+ GmpvView *view = gmpv_controller_get_view(data);
+ gboolean visible = gmpv_view_get_playlist_visible(view);
- gmpv_main_window_set_playlist_visible(wnd, !visible);
+ gmpv_view_set_playlist_visible(view, !visible);
}
static void save_playlist_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_view_show_save_playlist_dialog(GMPV_APPLICATION(data)->view);
+ gmpv_view_show_save_playlist_dialog(gmpv_controller_get_view(data));
+}
+
+static void shuffle_playlist_handler( GSimpleAction *action,
+ GVariant *param,
+ gpointer data )
+{
+ gmpv_model_shuffle_playlist(gmpv_controller_get_model(data));
}
static void remove_selected_playlist_item_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- GmpvMainWindow *wnd = gmpv_application_get_main_window
- (GMPV_APPLICATION(data));
+ GmpvView *view = gmpv_controller_get_view(data);
+ GmpvMainWindow *wnd = gmpv_view_get_main_window(view);
if(gmpv_main_window_get_playlist_visible(wnd))
{
@@ -281,14 +309,14 @@ static void show_preferences_dialog_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_view_show_preferences_dialog(GMPV_APPLICATION(data)->view);
+ gmpv_view_show_preferences_dialog(gmpv_controller_get_view(data));
}
static void quit_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_application_quit(data);
+ gmpv_controller_quit(data);
}
static void set_audio_track_handler( GSimpleAction *action,
@@ -316,18 +344,18 @@ static void load_track_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- GmpvApplication *app = data;
+ GmpvView *view = gmpv_controller_get_view(data);
gchar *cmd_name = NULL;
g_variant_get(param, "s", &cmd_name);
if(g_strcmp0(cmd_name, "audio-add") == 0)
{
- gmpv_view_show_open_audio_track_dialog(app->view);
+ gmpv_view_show_open_audio_track_dialog(view);
}
else if(g_strcmp0(cmd_name, "sub-add") == 0)
{
- gmpv_view_show_open_subtitle_track_dialog(app->view);
+ gmpv_view_show_open_subtitle_track_dialog(view);
}
else
{
@@ -341,7 +369,7 @@ static void toggle_fullscreen_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- GmpvView *view = GMPV_APPLICATION(data)->view;
+ GmpvView *view = gmpv_controller_get_view(data);
gboolean fullscreen = FALSE;
g_object_get(view, "fullscreen", &fullscreen, NULL);
@@ -352,14 +380,14 @@ static void enter_fullscreen_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_view_set_fullscreen(GMPV_APPLICATION(data)->view, TRUE);
+ gmpv_view_set_fullscreen(gmpv_controller_get_view(data), TRUE);
}
static void leave_fullscreen_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_view_set_fullscreen(GMPV_APPLICATION(data)->view, FALSE);
+ gmpv_view_set_fullscreen(gmpv_controller_get_view(data), FALSE);
}
static void set_video_size_handler( GSimpleAction *action,
@@ -368,20 +396,23 @@ static void set_video_size_handler( GSimpleAction *action,
{
gdouble value = g_variant_get_double(param);
- gmpv_controller_autofit(GMPV_APPLICATION(data)->controller, value);
+ gmpv_controller_autofit(data, value);
}
static void show_about_dialog_handler( GSimpleAction *action,
GVariant *param,
gpointer data )
{
- gmpv_view_show_about_dialog(GMPV_APPLICATION(data)->view);
+ gmpv_view_show_about_dialog(gmpv_controller_get_view(data));
}
-void gmpv_application_action_add_actions(GmpvApplication *app)
+void gmpv_controller_action_register_actions(GmpvController *controller)
{
const GActionEntry entries[]
- = { {.name = "show-open-dialog",
+ = { {.name = "open",
+ .activate = open_handler,
+ .parameter_type = "(sb)"},
+ {.name = "show-open-dialog",
.activate = show_open_dialog_handler,
.parameter_type = "b"},
{.name = "quit",
@@ -404,6 +435,8 @@ void gmpv_application_action_add_actions(GmpvApplication *app)
.activate = toggle_playlist_handler},
{.name = "save-playlist",
.activate = save_playlist_handler},
+ {.name = "shuffle-playlist",
+ .activate = shuffle_playlist_handler},
{.name = "remove-selected-playlist-item",
.activate = remove_selected_playlist_item_handler},
{.name = "set-audio-track",
@@ -431,10 +464,12 @@ void gmpv_application_action_add_actions(GmpvApplication *app)
.activate = set_video_size_handler,
.parameter_type = "d"} };
- g_action_map_add_action_entries( G_ACTION_MAP(app),
+ GmpvMainWindow *window = gmpv_view_get_main_window(controller->view);
+
+ g_action_map_add_action_entries( G_ACTION_MAP(window),
entries,
G_N_ELEMENTS(entries),
- app );
+ controller );
- bind_properties(app);
+ bind_properties(controller);
}
diff --git a/src/gmpv_application_action.h b/src/gmpv_controller_actions.h
similarity index 82%
rename from src/gmpv_application_action.h
rename to src/gmpv_controller_actions.h
index abf2580..177f7b4 100644
--- a/src/gmpv_application_action.h
+++ b/src/gmpv_controller_actions.h
@@ -17,16 +17,16 @@
* along with GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef APPLICATION_ACTION_H
-#define APPLICATION_ACTION_H
+#ifndef CONTROLLER_ACTIONS_H
+#define CONTROLLER_ACTIONS_H
#include <glib.h>
-#include "gmpv_application.h"
+#include "gmpv_controller.h"
G_BEGIN_DECLS
-void gmpv_application_action_add_actions(GmpvApplication *app);
+void gmpv_controller_action_register_actions(GmpvController *controller);
G_END_DECLS
diff --git a/src/gmpv_controller_input.c b/src/gmpv_controller_input.c
index 5fd2cd8..b9d3b79 100644
--- a/src/gmpv_controller_input.c
+++ b/src/gmpv_controller_input.c
@@ -167,9 +167,12 @@ static gboolean mouse_move_handler( GtkWidget *widget,
GmpvController *controller = data;
GdkEventMotion *motion_event = (GdkEventMotion *)event;
- gmpv_model_mouse( controller->model,
- (gint)motion_event->x,
- (gint)motion_event->y );
+ if(controller->model)
+ {
+ gmpv_model_mouse( controller->model,
+ (gint)motion_event->x,
+ (gint)motion_event->y );
+ }
return FALSE;
}
diff --git a/src/gmpv_controller_private.h b/src/gmpv_controller_private.h
index 86b07f1..1c1ccdb 100644
--- a/src/gmpv_controller_private.h
+++ b/src/gmpv_controller_private.h
@@ -22,19 +22,16 @@
#include "gmpv_model.h"
#include "gmpv_view.h"
+#include "mpris/gmpv_mpris.h"
+#include "media_keys/gmpv_media_keys.h"
G_BEGIN_DECLS
enum
{
PROP_0,
- PROP_MODEL,
- PROP_VIEW,
- PROP_AID,
- PROP_VID,
- PROP_SID,
+ PROP_APP,
PROP_READY,
- PROP_LOOP,
PROP_IDLE,
N_PROPERTIES
};
@@ -42,19 +39,16 @@ enum
struct _GmpvController
{
GObject parent;
+ GmpvApplication *app;
GmpvModel *model;
GmpvView *view;
- gint aid;
- gint vid;
- gint sid;
gboolean ready;
- gboolean loop;
gboolean idle;
- GQueue *action_queue;
- gchar **files;
- guint inhibit_cookie;
gint64 target_playlist_pos;
guint update_seekbar_id;
+ GSettings *settings;
+ GmpvMediaKeys *media_keys;
+ GmpvMpris *mpris;
};
struct _GmpvControllerClass
diff --git a/src/gmpv_def.h b/src/gmpv_def.h
index 3e1e04c..ffe6380 100644
--- a/src/gmpv_def.h
+++ b/src/gmpv_def.h
@@ -27,6 +27,8 @@
#define CONFIG_WIN_STATE APP_ID".window-state"
#define ACTION_PREFIX "gmpv-action"
#define DEFAULT_LOG_LEVEL MPV_LOG_LEVEL_ERROR
+#define MPRIS_TRACK_LIST_BEFORE 10
+#define MPRIS_TRACK_LIST_AFTER 10
#define MPRIS_TRACK_ID_NO_TRACK "/org/mpris/MediaPlayer2/TrackList/NoTrack"
#define MPRIS_TRACK_ID_PREFIX "/io/github/GnomeMpv/Track/"
#define MPRIS_BUS_NAME "org.mpris.MediaPlayer2.GnomeMpv"
@@ -82,19 +84,19 @@
.info = 0} }
#define DEFAULT_KEYBINDS \
- { "Ctrl+o script-message gmpv-action show-open-dialog(false)",\
- "Ctrl+l script-message gmpv-action show-open-location-dialog(false)",\
- "Ctrl+Shift+o script-message gmpv-action show-open-dialog(true)",\
- "Ctrl+Shift+l script-message gmpv-action show-open-location-dialog(true)",\
- "Ctrl+Shift+s script-message gmpv-action save-playlist",\
- "Ctrl+q script-message gmpv-action quit",\
- "Ctrl+? script-message gmpv-action show-shortcuts-dialog",\
- "Ctrl+p script-message gmpv-action show-preferences-dialog",\
- "Ctrl+h script-message gmpv-action toggle-controls",\
- "F9 script-message gmpv-action toggle-playlist",\
- "F11 script-message gmpv-action toggle-fullscreen",\
- "f script-message gmpv-action toggle-fullscreen",\
- "ESC script-message gmpv-action leave-fullscreen",\
+ { "Ctrl+o script-message gmpv-action win.show-open-dialog(false)",\
+ "Ctrl+l script-message gmpv-action win.show-open-location-dialog(false)",\
+ "Ctrl+Shift+o script-message gmpv-action win.show-open-dialog(true)",\
+ "Ctrl+Shift+l script-message gmpv-action win.show-open-location-dialog(true)",\
+ "Ctrl+Shift+s script-message gmpv-action win.save-playlist",\
+ "Ctrl+q script-message gmpv-action win.quit",\
+ "Ctrl+? script-message gmpv-action win.show-shortcuts-dialog",\
+ "Ctrl+p script-message gmpv-action win.show-preferences-dialog",\
+ "Ctrl+h script-message gmpv-action win.toggle-controls",\
+ "F9 script-message gmpv-action win.toggle-playlist",\
+ "F11 script-message gmpv-action win.toggle-fullscreen",\
+ "f script-message gmpv-action win.toggle-fullscreen",\
+ "ESC script-message gmpv-action win.leave-fullscreen",\
"v osd-msg cycle sub-visibility",\
"s osd-msg screenshot",\
"S osd-msg screenshot video",\
@@ -102,16 +104,16 @@
"J osd-msg cycle sub down",\
"@ osd-msg cycle chapter",\
"! osd-msg cycle chapter down",\
- "DEL script-message gmpv-action remove-selected-playlist-item",\
+ "DEL script-message gmpv-action win.remove-selected-playlist-item",\
"U stop",\
"RIGHT no-osd seek 10",\
"LEFT no-osd seek -10",\
"UP no-osd seek 60",\
"DOWN no-osd seek -60",\
- "Alt+0 script-message gmpv-action set-video-size(0.5)",\
- "Alt+1 script-message gmpv-action set-video-size(1.0)",\
- "Alt+2 script-message gmpv-action set-video-size(2.0)",\
- "MOUSE_BTN0_DBL script-message gmpv-action toggle-fullscreen",\
+ "Alt+0 script-message gmpv-action win.set-video-size(0.5)",\
+ "Alt+1 script-message gmpv-action win.set-video-size(1.0)",\
+ "Alt+2 script-message gmpv-action win.set-video-size(2.0)",\
+ "MOUSE_BTN0_DBL script-message gmpv-action win.toggle-fullscreen",\
"MOUSE_BTN3 add volume 2",\
"MOUSE_BTN4 add volume -2",\
"MOUSE_BTN5 no-osd seek -10",\
diff --git a/src/gmpv_geometry.h b/src/gmpv_geometry.h
deleted file mode 100644
index 13104bc..0000000
--- a/src/gmpv_geometry.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2016 gnome-mpv
- *
- * This file is part of GNOME MPV.
- *
- * GNOME MPV 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.
- *
- * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GEOMETRY_H
-#define GEOMETRY_H
-
-#define GMPV_GEOMETRY_INIT {0, G_VALUE_INIT, G_VALUE_INIT, 0, 0}
-
-typedef enum _GmpvGeometryFlag GmpvGeometryFlag;
-typedef struct _GmpvGeometry GmpvGeometry;
-
-enum _GmpvGeometryFlag
-{
- GMPV_GEOMETRY_IGNORE_POS = 1 << 0,
- GMPV_GEOMETRY_IGNORE_DIM = 1 << 1,
- GMPV_GEOMETRY_FLIP_X = 1 << 2,
- GMPV_GEOMETRY_FLIP_Y = 1 << 3
-};
-
-struct _GmpvGeometry
-{
- gint flags;
- GValue x;
- GValue y;
- gint64 width;
- gint64 height;
-};
-
-#endif
diff --git a/src/gmpv_header_bar.c b/src/gmpv_header_bar.c
index a2653f1..fbf5ecc 100644
--- a/src/gmpv_header_bar.c
+++ b/src/gmpv_header_bar.c
@@ -88,7 +88,7 @@ static void gmpv_header_bar_init(GmpvHeaderBar *hdr)
gtk_widget_set_tooltip_text
(hdr->fullscreen_btn, _("Toggle Fullscreen"));
gtk_actionable_set_action_name
- (GTK_ACTIONABLE(hdr->fullscreen_btn), "app.toggle-fullscreen");
+ (GTK_ACTIONABLE(hdr->fullscreen_btn), "win.toggle-fullscreen");
gtk_widget_set_can_focus(hdr->open_btn, FALSE);
gtk_widget_set_can_focus(hdr->fullscreen_btn, FALSE);
diff --git a/src/gmpv_main_window.c b/src/gmpv_main_window.c
index a5fc361..a32ecf4 100644
--- a/src/gmpv_main_window.c
+++ b/src/gmpv_main_window.c
@@ -54,6 +54,7 @@ struct _GmpvMainWindow
gboolean pre_fs_playlist_visible;
gint playlist_width;
guint timeout_tag;
+ const GPtrArray *track_list;
GtkWidget *header_bar;
GtkWidget *main_box;
GtkWidget *vid_area_paned;
@@ -76,12 +77,15 @@ static void gmpv_main_window_get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec );
+static void seek_handler(GtkWidget *widget, gdouble value, gpointer data);
+static void button_clicked_handler( GmpvControlBox *control_box,
+ const gchar *button,
+ gpointer data );
static void gmpv_main_window_notify(GObject *object, GParamSpec *pspec);
static void resize_video_area_finalize( GtkWidget *widget,
GdkRectangle *allocation,
gpointer data );
static gboolean resize_to_target(gpointer data);
-static void set_window_pos(GmpvMainWindow *wnd, const GmpvGeometry *geom);
G_DEFINE_TYPE(GmpvMainWindow, gmpv_main_window, GTK_TYPE_APPLICATION_WINDOW)
@@ -145,6 +149,18 @@ static void gmpv_main_window_get_property( GObject *object,
}
}
+static void seek_handler(GtkWidget *widget, gdouble value, gpointer data)
+{
+ g_signal_emit_by_name(data, "seek", value);
+}
+
+static void button_clicked_handler( GmpvControlBox *control_box,
+ const gchar *button,
+ gpointer data )
+{
+ g_signal_emit_by_name(data, "button-clicked", button);
+}
+
static void gmpv_main_window_notify(GObject *object, GParamSpec *pspec)
{
if(g_strcmp0(pspec->name, "always-use-floating-controls") == 0)
@@ -181,7 +197,7 @@ static void resize_video_area_finalize( GtkWidget *widget,
wnd->width_offset += target_width-width;
wnd->height_offset += target_height-height;
- g_idle_add(resize_to_target, wnd);
+ g_idle_add_full(G_PRIORITY_HIGH_IDLE, resize_to_target, wnd, NULL);
}
}
@@ -204,69 +220,6 @@ static gboolean resize_to_target(gpointer data)
return FALSE;
}
-static void set_window_pos(GmpvMainWindow *wnd, const GmpvGeometry *geom)
-{
- GmpvControlBox *box;
- GdkScreen *screen;
- gint screen_dim[2];
- gint window_dim[2];
- gboolean flip[2];
- GValue geom_pos[2];
- gint64 pos[2];
-
- g_assert(geom);
-
- box = gmpv_main_window_get_control_box(wnd);
- screen = gdk_screen_get_default();
- screen_dim[0] = gdk_screen_get_width(screen);
- screen_dim[1] = gdk_screen_get_height(screen);
- window_dim[0] = 0;
- window_dim[1] = 0;
- geom_pos[0] = geom->x;
- geom_pos[1] = geom->y;
- flip[0] = geom->flags&GMPV_GEOMETRY_FLIP_X;
- flip[1] = geom->flags&GMPV_GEOMETRY_FLIP_Y;
- pos[0] = 0;
- pos[1] = 0;
-
- gtk_window_get_size(GTK_WINDOW(wnd), &window_dim[0], &window_dim[1]);
-
- for(gint i = 0; i < 2; i++)
- {
- GType type = G_VALUE_TYPE(&geom_pos[i]);
-
- if(type == G_TYPE_INT64)
- {
- gint64 value = g_value_get_int64(&geom_pos[i]);
-
- pos[i] = flip[i]?
- screen_dim[i]-window_dim[i]-value:
- value;
- }
- else if(type == G_TYPE_DOUBLE)
- {
- gdouble value = g_value_get_double(&geom_pos[i]);
-
- pos[i] = (gint64)(value*(screen_dim[i]-window_dim[i]));
- }
- else
- {
- g_assert_not_reached();
- }
- }
-
- /* Adjust the y-position to account for the height of
- * the control box.
- */
- if(flip[1] && gtk_widget_get_visible(GTK_WIDGET(box)))
- {
- pos[1] -= gtk_widget_get_allocated_height
- (GTK_WIDGET(box));
- }
-
- gtk_window_move(GTK_WINDOW(wnd), (gint)pos[0], (gint)pos[1]);
-}
-
static void gmpv_main_window_class_init(GmpvMainWindowClass *klass)
{
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
@@ -284,10 +237,33 @@ static void gmpv_main_window_class_init(GmpvMainWindowClass *klass)
FALSE,
G_PARAM_READWRITE );
g_object_class_install_property(obj_class, PROP_ALWAYS_FLOATING, pspec);
+
+ g_signal_new( "button-clicked",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_STRING );
+ g_signal_new( "seek",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__DOUBLE,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_DOUBLE );
}
static void gmpv_main_window_init(GmpvMainWindow *wnd)
{
+ GmpvControlBox *vid_area_control_box = NULL;
+
wnd->csd = FALSE;
wnd->always_floating = FALSE;
wnd->use_floating_controls = FALSE;
@@ -296,6 +272,7 @@ static void gmpv_main_window_init(GmpvMainWindow *wnd)
wnd->pre_fs_playlist_visible = FALSE;
wnd->playlist_width = PLAYLIST_DEFAULT_WIDTH;
wnd->timeout_tag = 0;
+ wnd->track_list = NULL;
wnd->header_bar = gmpv_header_bar_new();
wnd->main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
wnd->vid_area_paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
@@ -306,9 +283,44 @@ static void gmpv_main_window_init(GmpvMainWindow *wnd)
wnd->width_offset = 0;
wnd->height_offset = 0;
+ vid_area_control_box = gmpv_video_area_get_control_box
+ (GMPV_VIDEO_AREA(wnd->vid_area));
+
g_object_bind_property( wnd, "title",
wnd->vid_area, "title",
G_BINDING_DEFAULT );
+ g_object_bind_property( wnd->control_box, "duration",
+ vid_area_control_box, "duration",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( wnd->control_box, "pause",
+ vid_area_control_box, "pause",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( wnd->control_box, "chapters-enabled",
+ vid_area_control_box, "chapters-enabled",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( wnd->control_box, "time-position",
+ vid_area_control_box, "time-position",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( wnd->control_box, "volume",
+ vid_area_control_box, "volume",
+ G_BINDING_BIDIRECTIONAL );
+
+ g_signal_connect( wnd->control_box,
+ "seek",
+ G_CALLBACK(seek_handler),
+ wnd );
+ g_signal_connect( wnd->control_box,
+ "button-clicked",
+ G_CALLBACK(button_clicked_handler),
+ wnd );
+ g_signal_connect( vid_area_control_box,
+ "seek",
+ G_CALLBACK(seek_handler),
+ wnd );
+ g_signal_connect( vid_area_control_box,
+ "button-clicked",
+ G_CALLBACK(button_clicked_handler),
+ wnd );
gtk_widget_add_events( wnd->vid_area,
GDK_ENTER_NOTIFY_MASK
@@ -330,7 +342,7 @@ static void gmpv_main_window_init(GmpvMainWindow *wnd)
gtk_container_add(GTK_CONTAINER(wnd), wnd->main_box);
}
-GtkWidget *gmpv_main_window_new( GmpvApplication *app,
+GtkWidget *gmpv_main_window_new( GtkApplication *app,
gboolean always_floating )
{
return GTK_WIDGET(g_object_new( gmpv_main_window_get_type(),
@@ -361,25 +373,10 @@ void gmpv_main_window_set_use_floating_controls( GmpvMainWindow *wnd,
{
if(floating != wnd->use_floating_controls)
{
- GmpvVideoArea *vid_area = GMPV_VIDEO_AREA(wnd->vid_area);
- GtkContainer *main_box = GTK_CONTAINER(wnd->main_box);
-
- if(floating)
- {
- g_object_ref(wnd->control_box);
- gtk_container_remove(main_box, wnd->control_box);
- gmpv_video_area_set_control_box
- (vid_area, wnd->control_box);
- g_object_unref(wnd->control_box);
-
- }
- else
- {
- g_object_ref(wnd->control_box);
- gmpv_video_area_set_control_box(vid_area, NULL);
- gtk_container_add(main_box, wnd->control_box);
- g_object_unref(wnd->control_box);
- }
+ gtk_widget_set_visible
+ (wnd->control_box, !floating);
+ gmpv_video_area_set_control_box_visible
+ (GMPV_VIDEO_AREA(wnd->vid_area), floating);
wnd->use_floating_controls = floating;
}
@@ -415,8 +412,24 @@ void gmpv_main_window_set_fullscreen(GmpvMainWindow *wnd, gboolean fullscreen)
if(!gmpv_main_window_get_csd_enabled(wnd))
{
- gtk_application_window_set_show_menubar
- (GTK_APPLICATION_WINDOW(wnd), !fullscreen);
+ GtkApplication *app;
+ GMenu *menu;
+
+ app = gtk_window_get_application(GTK_WINDOW(wnd));
+ menu = G_MENU(gtk_application_get_menubar(app));
+
+ /* gtk_application_window_set_show_menubar() cannot be
+ * used here since it will cause assertion failure when
+ * opengl-cb is used.
+ */
+ if(fullscreen)
+ {
+ g_menu_remove_all(menu);
+ }
+ else
+ {
+ gmpv_menu_build_full(menu, wnd->track_list);
+ }
}
gmpv_video_area_set_fullscreen_state(vid_area, fullscreen);
@@ -518,27 +531,11 @@ void gmpv_main_window_load_state(GmpvMainWindow *wnd)
}
}
-void gmpv_main_window_set_geometry( GmpvMainWindow *wnd,
- const GmpvGeometry *geom )
-{
- if(geom)
- {
- if(!(geom->flags&GMPV_GEOMETRY_IGNORE_DIM))
- {
- gmpv_main_window_resize_video_area
- (wnd, (gint)geom->width, (gint)geom->height);
- }
-
- if(!(geom->flags&GMPV_GEOMETRY_IGNORE_POS))
- {
- set_window_pos(wnd, geom);
- }
- }
-}
-
void gmpv_main_window_update_track_list( GmpvMainWindow *wnd,
const GPtrArray *track_list )
{
+ wnd->track_list = track_list;
+
if(gmpv_main_window_get_csd_enabled(wnd))
{
gmpv_header_bar_update_track_list
@@ -686,3 +683,15 @@ gboolean gmpv_main_window_get_playlist_visible(GmpvMainWindow *wnd)
{
return gtk_widget_get_visible(GTK_WIDGET(wnd->playlist));
}
+
+void gmpv_main_window_set_controls_visible( GmpvMainWindow *wnd,
+ gboolean visible )
+{
+ gtk_widget_set_visible(GTK_WIDGET(wnd->control_box), visible);
+}
+
+gboolean gmpv_main_window_get_controls_visible(GmpvMainWindow *wnd)
+{
+ return gtk_widget_get_visible(GTK_WIDGET(wnd->control_box));
+}
+
diff --git a/src/gmpv_main_window.h b/src/gmpv_main_window.h
index fb031fd..ee2096b 100644
--- a/src/gmpv_main_window.h
+++ b/src/gmpv_main_window.h
@@ -27,7 +27,6 @@
#include "gmpv_playlist_widget.h"
#include "gmpv_control_box.h"
#include "gmpv_video_area.h"
-#include "gmpv_geometry.h"
G_BEGIN_DECLS
@@ -35,9 +34,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(GmpvMainWindow, gmpv_main_window, GMPV, MAIN_WINDOW, GtkApplicationWindow)
-typedef struct _GmpvApplication GmpvApplication;
-
-GtkWidget *gmpv_main_window_new( GmpvApplication *app,
+GtkWidget *gmpv_main_window_new( GtkApplication *app,
gboolean always_floating );
GmpvPlaylistWidget *gmpv_main_window_get_playlist(GmpvMainWindow *wnd);
GmpvControlBox *gmpv_main_window_get_control_box(GmpvMainWindow *wnd);
@@ -51,8 +48,6 @@ void gmpv_main_window_toggle_fullscreen(GmpvMainWindow *wnd);
void gmpv_main_window_reset(GmpvMainWindow *wnd);
void gmpv_main_window_save_state(GmpvMainWindow *wnd);
void gmpv_main_window_load_state(GmpvMainWindow *wnd);
-void gmpv_main_window_set_geometry( GmpvMainWindow *wnd,
- const GmpvGeometry *geom );
void gmpv_main_window_update_track_list( GmpvMainWindow *wnd,
const GPtrArray *track_list );
void gmpv_main_window_resize_video_area( GmpvMainWindow *wnd,
@@ -63,6 +58,9 @@ gboolean gmpv_main_window_get_csd_enabled(GmpvMainWindow *wnd);
void gmpv_main_window_set_playlist_visible( GmpvMainWindow *wnd,
gboolean visible );
gboolean gmpv_main_window_get_playlist_visible(GmpvMainWindow *wnd);
+void gmpv_main_window_set_controls_visible( GmpvMainWindow *wnd,
+ gboolean visible );
+gboolean gmpv_main_window_get_controls_visible(GmpvMainWindow *wnd);
G_END_DECLS
diff --git a/src/gmpv_menu.c b/src/gmpv_menu.c
index 6ba7a53..3be0c9e 100644
--- a/src/gmpv_menu.c
+++ b/src/gmpv_menu.c
@@ -204,23 +204,23 @@ static void build_menu(GMenu *menu, const GmpvMenuEntry *entries, gboolean flat)
static GMenu *build_video_track_menu(const GPtrArray *list)
{
return build_menu_from_track_list
- (list, "app.set-video-track", NULL);
+ (list, "win.set-video-track", NULL);
}
static GMenu *build_audio_track_menu(const GPtrArray *list)
{
return build_menu_from_track_list
( list,
- "app.set-audio-track",
- "app.load-track('audio-add')" );
+ "win.set-audio-track",
+ "win.load-track('audio-add')" );
}
static GMenu *build_subtitle_track_menu(const GPtrArray *list)
{
return build_menu_from_track_list
( list,
- "app.set-subtitle-track",
- "app.load-track('sub-add')" );
+ "win.set-subtitle-track",
+ "win.load-track('sub-add')" );
}
void gmpv_menu_build_full(GMenu *menu, const GPtrArray *track_list)
@@ -241,25 +241,25 @@ void gmpv_menu_build_full(GMenu *menu, const GPtrArray *track_list)
const GmpvMenuEntry entries[]
= { {_("_File"), NULL, NULL},
- {_("_Open"), "app.show-open-dialog(false)", NULL},
- {_("Open _Location"), "app.show-open-location-dialog(false)", NULL},
- {_("_Save Playlist"), "app.save-playlist", NULL},
- {_("_Quit"), "app.quit", NULL},
+ {_("_Open"), "win.show-open-dialog(false)", NULL},
+ {_("Open _Location"), "win.show-open-location-dialog(false)", NULL},
+ {_("_Save Playlist"), "win.save-playlist", NULL},
+ {_("_Quit"), "win.quit", NULL},
{_("_Edit"), NULL, NULL},
- {_("_Preferences"), "app.show-preferences-dialog", NULL},
+ {_("_Preferences"), "win.show-preferences-dialog", NULL},
{_("_Video Track"), NULL, video_menu},
{_("_Audio Track"), NULL, audio_menu},
{_("S_ubtitle Track"), NULL, subtitle_menu},
{_("_View"), NULL, NULL},
- {_("_Toggle Controls"), "app.toggle-controls", NULL},
- {_("_Toggle Playlist"), "app.toggle-playlist", NULL},
- {_("_Fullscreen"), "app.toggle-fullscreen", NULL},
- {_("_Normal Size"), "app.set-video-size(@d 1)", NULL},
- {_("_Double Size"), "app.set-video-size(@d 2)", NULL},
- {_("_Half Size"), "app.set-video-size(@d 0.5)", NULL},
+ {_("_Toggle Controls"), "win.toggle-controls", NULL},
+ {_("_Toggle Playlist"), "win.toggle-playlist", NULL},
+ {_("_Fullscreen"), "win.toggle-fullscreen", NULL},
+ {_("_Normal Size"), "win.set-video-size(@d 1)", NULL},
+ {_("_Double Size"), "win.set-video-size(@d 2)", NULL},
+ {_("_Half Size"), "win.set-video-size(@d 0.5)", NULL},
{_("_Help"), NULL, NULL},
- {_("_Keyboard Shortcuts"), "app.show-shortcuts-dialog" , NULL},
- {_("_About"), "app.show-about-dialog", NULL},
+ {_("_Keyboard Shortcuts"), "win.show-shortcuts-dialog" , NULL},
+ {_("_About"), "win.show-about-dialog", NULL},
{NULL, NULL, NULL} };
build_menu(menu, entries, FALSE);
@@ -290,18 +290,18 @@ void gmpv_menu_build_menu_btn(GMenu *menu, const GPtrArray *track_list)
const GmpvMenuEntry entries[]
= { {NULL, "", NULL},
- {_("_Toggle Controls"), "app.toggle-controls", NULL},
+ {_("_Toggle Controls"), "win.toggle-controls", NULL},
{NULL, "", NULL},
- {_("_Toggle Playlist"), "app.toggle-playlist", NULL},
- {_("_Save Playlist"), "app.save-playlist", NULL},
+ {_("_Toggle Playlist"), "win.toggle-playlist", NULL},
+ {_("_Save Playlist"), "win.save-playlist", NULL},
{NULL, "", NULL},
{_("_Video Track"), NULL, video_menu},
{_("_Audio Track"), NULL, audio_menu},
{_("S_ubtitle Track"), NULL, subtitle_menu},
{NULL, "", NULL},
- {_("_Normal Size"), "app.set-video-size(@d 1)", NULL},
- {_("_Double Size"), "app.set-video-size(@d 2)", NULL},
- {_("_Half Size"), "app.set-video-size(@d 0.5)", NULL},
+ {_("_Normal Size"), "win.set-video-size(@d 1)", NULL},
+ {_("_Double Size"), "win.set-video-size(@d 2)", NULL},
+ {_("_Half Size"), "win.set-video-size(@d 0.5)", NULL},
{NULL, NULL, NULL} };
build_menu(menu, entries, TRUE);
@@ -318,8 +318,8 @@ void gmpv_menu_build_open_btn(GMenu *menu)
{
const GmpvMenuEntry entries[]
= { {NULL, "", NULL},
- {_("_Open"), "app.show-open-dialog(false)", NULL},
- {_("Open _Location"), "app.show-open-location-dialog(false)", NULL},
+ {_("_Open"), "win.show-open-dialog(false)", NULL},
+ {_("Open _Location"), "win.show-open-location-dialog(false)", NULL},
{NULL, NULL, NULL} };
build_menu(menu, entries, TRUE);
@@ -329,11 +329,13 @@ void gmpv_menu_build_app_menu(GMenu *menu)
{
const GmpvMenuEntry entries[]
= { {NULL, "", NULL},
- {_("_Preferences"), "app.show-preferences-dialog", NULL},
+ {_("_New Window"), "app.new-window", NULL},
{NULL, "", NULL},
- {_("_Keyboard Shortcuts"), "app.show-shortcuts-dialog", NULL},
- {_("_About"), "app.show-about-dialog", NULL},
- {_("_Quit"), "app.quit", NULL},
+ {_("_Preferences"), "win.show-preferences-dialog", NULL},
+ {NULL, "", NULL},
+ {_("_Keyboard Shortcuts"), "win.show-shortcuts-dialog", NULL},
+ {_("_About"), "win.show-about-dialog", NULL},
+ {_("_Quit"), "win.quit", NULL},
{NULL, NULL, NULL} };
build_menu(menu, entries, TRUE);
diff --git a/src/gmpv_metadata_cache.c b/src/gmpv_metadata_cache.c
new file mode 100644
index 0000000..a042db7
--- /dev/null
+++ b/src/gmpv_metadata_cache.c
@@ -0,0 +1,337 @@
+/*
+ * Copyright (c) 2017 gnome-mpv
+ *
+ * This file is part of GNOME MPV.
+ *
+ * GNOME MPV 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.
+ *
+ * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gmpv_metadata_cache.h"
+#include "gmpv_mpv.h"
+#include "gmpv_mpv_wrapper.h"
+
+struct _GmpvMetadataCache
+{
+ GObject parent;
+ GHashTable *table;
+ GmpvMpv *fetcher;
+ GQueue *fetch_queue;
+};
+
+struct _GmpvMetadataCacheClass
+{
+ GObjectClass parent_class;
+};
+
+static void dispose(GObject *object)
+{
+ g_clear_object(&GMPV_METADATA_CACHE(object)->fetcher);
+}
+
+static void finalize(GObject *object)
+{
+ GmpvMetadataCache *cache = GMPV_METADATA_CACHE(object);
+
+ g_hash_table_unref(cache->table);
+ g_queue_free_full(cache->fetch_queue, g_free);
+}
+
+static void metadata_to_ptr_array(mpv_node metadata, GPtrArray *array);
+static void mpv_event_notify( GmpvMpv *mpv,
+ gint event_id,
+ gpointer event_data,
+ gpointer data );
+static gboolean fetch_metadata(GmpvMetadataCache *cache);
+static GmpvMetadataCacheEntry *gmpv_metadata_cache_entry_new(void);
+static void gmpv_metadata_cache_entry_free(GmpvMetadataCacheEntry *entry);
+
+G_DEFINE_TYPE(GmpvMetadataCache, gmpv_metadata_cache, G_TYPE_OBJECT)
+
+static GmpvMetadataCacheEntry *gmpv_metadata_cache_entry_new(void)
+{
+ GmpvMetadataCacheEntry *entry = g_new0(GmpvMetadataCacheEntry, 1);
+
+ entry->tags = g_ptr_array_new_with_free_func
+ ((GDestroyNotify)gmpv_metadata_entry_free);
+
+ return entry;
+}
+
+static void gmpv_metadata_cache_entry_free(GmpvMetadataCacheEntry *entry)
+{
+ g_free(entry->title);
+ g_ptr_array_free(entry->tags, TRUE);
+ g_free(entry);
+}
+
+static void metadata_to_ptr_array(mpv_node metadata, GPtrArray *array)
+{
+ mpv_node_list *list = metadata.u.list;
+
+ g_ptr_array_set_size(array, 0);
+
+ if(metadata.format == MPV_FORMAT_NODE_MAP && list->num > 0)
+ {
+ for(gint i = 0; i < list->num; i++)
+ {
+ const gchar *key = list->keys[i];
+ mpv_node value = list->values[i];
+
+ if(value.format == MPV_FORMAT_STRING)
+ {
+ GmpvMetadataEntry *entry;
+
+ entry = gmpv_metadata_entry_new
+ (key, value.u.string);
+
+ g_ptr_array_add(array, entry);
+ }
+ else
+ {
+ g_warning( "Ignored metadata field %s "
+ "with unexpected format %d",
+ key,
+ value.format );
+ }
+ }
+ }
+}
+
+static void mpv_event_notify( GmpvMpv *mpv,
+ gint event_id,
+ gpointer event_data,
+ gpointer data )
+{
+ if(event_id == MPV_EVENT_FILE_LOADED)
+ {
+ GmpvMetadataCache *cache = data;
+ GmpvMetadataCacheEntry *entry = NULL;
+ gchar *path = NULL;
+
+ gmpv_mpv_get_property(mpv, "path", MPV_FORMAT_STRING, &path);
+ g_debug("Fetched metadata for %s", path);
+
+ entry = g_hash_table_lookup(cache->table, path);
+
+ if(entry)
+ {
+ const gchar *cmd[] = {"playlist-next", "force", NULL};
+ gint64 playlist_pos = 0;
+ gint64 playlist_count = 0;
+ gchar *media_title = NULL;
+ mpv_node metadata;
+
+ gmpv_mpv_get_property( mpv,
+ "duration",
+ MPV_FORMAT_DOUBLE,
+ &entry->duration );
+ gmpv_mpv_get_property( mpv,
+ "playlist-pos",
+ MPV_FORMAT_INT64,
+ &playlist_pos );
+ gmpv_mpv_get_property( mpv,
+ "playlist-count",
+ MPV_FORMAT_INT64,
+ &playlist_count );
+ gmpv_mpv_get_property( mpv,
+ "media-title",
+ MPV_FORMAT_STRING,
+ &media_title );
+ gmpv_mpv_get_property( mpv,
+ "metadata",
+ MPV_FORMAT_NODE,
+ &metadata );
+
+ if(!entry->title)
+ {
+ entry->title = g_strdup(media_title);
+ }
+
+ metadata_to_ptr_array(metadata, entry->tags);
+ gmpv_mpv_command(mpv, cmd);
+
+ g_signal_emit_by_name(cache, "update", path);
+
+ mpv_free(media_title);
+ mpv_free_node_contents(&metadata);
+ }
+
+ mpv_free(path);
+ }
+ else if(event_id == MPV_EVENT_END_FILE)
+ {
+ mpv_event_end_file *event = event_data;
+
+ if(event->reason == MPV_END_FILE_REASON_ERROR)
+ {
+ g_debug("Failed to fetch metadata");
+ }
+ }
+}
+
+static void shutdown_handler(GmpvMpv *mpv, gpointer data)
+{
+ GmpvMetadataCache *cache = data;
+
+ g_clear_object(&cache->fetcher);
+
+ if(!g_queue_is_empty(cache->fetch_queue))
+ {
+ g_idle_add((GSourceFunc)fetch_metadata, cache);
+ }
+}
+
+static gboolean fetch_metadata(GmpvMetadataCache *cache)
+{
+ g_assert(!cache->fetcher);
+ cache->fetcher = gmpv_mpv_new(0);
+
+ g_signal_connect( cache->fetcher,
+ "mpv-event-notify",
+ G_CALLBACK(mpv_event_notify),
+ cache );
+ g_signal_connect( cache->fetcher,
+ "shutdown",
+ G_CALLBACK(shutdown_handler),
+ cache );
+
+ gmpv_mpv_set_option_string(cache->fetcher, "ao", "null");
+ gmpv_mpv_set_option_string(cache->fetcher, "vo", "null");
+ gmpv_mpv_set_option_string(cache->fetcher, "idle", "once");
+ gmpv_mpv_set_option_string(cache->fetcher, "ytdl", "yes");
+ gmpv_mpv_initialize(cache->fetcher);
+
+ for( gchar *uri = g_queue_pop_tail(cache->fetch_queue);
+ uri;
+ uri = g_queue_pop_tail(cache->fetch_queue) )
+ {
+ g_debug("Queuing %s for metadata fetch", uri);
+ gmpv_mpv_load_file(cache->fetcher, uri, TRUE);
+ g_free(uri);
+ }
+
+ return G_SOURCE_REMOVE;
+}
+
+static void gmpv_metadata_cache_class_init(GmpvMetadataCacheClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+
+ g_signal_new( "update",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_STRING );
+}
+
+static void gmpv_metadata_cache_init(GmpvMetadataCache *cache)
+{
+ cache->table = g_hash_table_new_full( g_str_hash,
+ g_str_equal,
+ g_free,
+ (GDestroyNotify)
+ gmpv_metadata_cache_entry_free );
+ cache->fetcher = NULL;
+ cache->fetch_queue = g_queue_new();
+}
+
+GmpvMetadataCache *gmpv_metadata_cache_new(void)
+{
+ return g_object_new(gmpv_metadata_cache_get_type(), NULL);
+}
+
+void gmpv_metadata_cache_ref_entry(GmpvMetadataCache *cache, const gchar *uri)
+{
+ gmpv_metadata_cache_lookup(cache, uri)->references++;
+}
+
+void gmpv_metadata_cache_unref_entry(GmpvMetadataCache *cache, const gchar *uri)
+{
+ GmpvMetadataCacheEntry *entry = g_hash_table_lookup(cache->table, uri);
+
+ if(entry && --entry->references == 0)
+ {
+ g_hash_table_remove(cache->table, uri);
+ }
+}
+
+void gmpv_metadata_cache_load_playlist( GmpvMetadataCache *cache,
+ const GPtrArray *playlist )
+{
+ GmpvMetadataCacheEntry *entry = NULL;
+ GHashTableIter iter;
+
+ g_hash_table_iter_init(&iter, cache->table);
+
+ /* First, set the refrence count for all entries to zero */
+ while(g_hash_table_iter_next(&iter, NULL, (gpointer)&entry))
+ {
+ g_assert(entry);
+ entry->references = 0;
+ }
+
+ /* Then ref all entries in the playlist. This sets the reference count
+ * to the number of times the entry appears in the playlist.
+ */
+ for(guint i = 0; i < playlist->len; i++)
+ {
+ GmpvPlaylistEntry *entry = g_ptr_array_index(playlist, i);
+ gmpv_metadata_cache_ref_entry(cache, entry->filename);
+ }
+
+ g_hash_table_iter_init(&iter, cache->table);
+
+ /* Remove all entries that with refrence count of zero, which means that
+ * the entry no longer exists in the playlist.
+ */
+ while(g_hash_table_iter_next(&iter, NULL, (gpointer)&entry))
+ {
+ g_assert(entry);
+
+ if(entry->references == 0)
+ {
+ g_hash_table_iter_remove(&iter);
+ }
+ }
+}
+
+GmpvMetadataCacheEntry *gmpv_metadata_cache_lookup( GmpvMetadataCache *cache,
+ const gchar *uri )
+{
+ GmpvMetadataCacheEntry *entry = g_hash_table_lookup(cache->table, uri);
+
+ if(!entry)
+ {
+ entry = gmpv_metadata_cache_entry_new();
+
+ g_hash_table_insert(cache->table, g_strdup(uri), entry);
+
+ if(!cache->fetcher && g_queue_is_empty(cache->fetch_queue))
+ {
+ g_idle_add((GSourceFunc)fetch_metadata, cache);
+ }
+
+ g_queue_push_head(cache->fetch_queue, g_strdup(uri));
+ }
+
+ return entry;
+}
diff --git a/src/gmpv_metadata_cache.h b/src/gmpv_metadata_cache.h
new file mode 100644
index 0000000..112e743
--- /dev/null
+++ b/src/gmpv_metadata_cache.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017 gnome-mpv
+ *
+ * This file is part of GNOME MPV.
+ *
+ * GNOME MPV 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.
+ *
+ * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef METADATA_CACHE
+#define METADATA_CACHE
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GmpvMetadataCacheEntry GmpvMetadataCacheEntry;
+
+struct _GmpvMetadataCacheEntry
+{
+ gint references;
+ gchar *title;
+ gdouble duration;
+ GPtrArray *tags;
+};
+
+#define GMPV_TYPE_METADATA_CACHE (gmpv_metadata_cache_get_type())
+
+G_DECLARE_FINAL_TYPE(GmpvMetadataCache, gmpv_metadata_cache, GMPV, METADATA_CACHE, GObject)
+
+GmpvMetadataCache *gmpv_metadata_cache_new(void);
+void gmpv_metadata_cache_ref_entry(GmpvMetadataCache *cache, const gchar *uri);
+void gmpv_metadata_cache_unref_entry(GmpvMetadataCache *cache, const gchar *uri);
+void gmpv_metadata_cache_load_playlist( GmpvMetadataCache *cache,
+ const GPtrArray *playlist );
+GmpvMetadataCacheEntry *gmpv_metadata_cache_lookup( GmpvMetadataCache *cache,
+ const gchar *uri );
+
+G_END_DECLS
+
+#endif
diff --git a/src/gmpv_model.c b/src/gmpv_model.c
index 531b4c2..cde0612 100644
--- a/src/gmpv_model.c
+++ b/src/gmpv_model.c
@@ -20,14 +20,19 @@
#include <epoxy/gl.h>
#include "gmpv_model.h"
-#include "gmpv_mpv.h"
+#include "gmpv_marshal.h"
+#include "gmpv_player.h"
#include "gmpv_mpv_wrapper.h"
+#include "gmpv_metadata_cache.h"
enum
{
PROP_INVALID,
PROP_MPV,
PROP_READY,
+ PROP_PLAYLIST,
+ PROP_METADATA,
+ PROP_TRACK_LIST,
PROP_AID,
PROP_VID,
PROP_SID,
@@ -36,15 +41,12 @@ enum
PROP_IDLE_ACTIVE,
PROP_FULLSCREEN,
PROP_PAUSE,
- PROP_LOOP,
+ PROP_LOOP_PLAYLIST,
PROP_DURATION,
PROP_MEDIA_TITLE,
- PROP_METADATA,
- PROP_PLAYLIST,
PROP_PLAYLIST_COUNT,
PROP_PLAYLIST_POS,
PROP_SPEED,
- PROP_TRACK_LIST,
PROP_VOLUME,
N_PROPERTIES
};
@@ -52,8 +54,12 @@ enum
struct _GmpvModel
{
GObject parent;
- GmpvMpv *mpv;
+ GmpvPlayer *player;
gboolean ready;
+ GmpvMetadataCache *cache;
+ GPtrArray *playlist;
+ GPtrArray *metadata;
+ GPtrArray *track_list;
gboolean update_mpv_properties;
gchar *aid;
gchar *vid;
@@ -63,15 +69,12 @@ struct _GmpvModel
gboolean idle_active;
gboolean fullscreen;
gboolean pause;
- gchar *loop;
+ gchar *loop_playlist;
gdouble duration;
gchar *media_title;
- GPtrArray *metadata;
- GPtrArray *playlist;
gint64 playlist_count;
gint64 playlist_pos;
gdouble speed;
- GPtrArray *track_list;
gdouble volume;
};
@@ -89,6 +92,8 @@ static void get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec );
+static void dispose(GObject *object);
+static void finalize(GObject *object);
static void set_mpv_property( GObject *object,
guint property_id,
const GValue *value,
@@ -101,9 +106,19 @@ static GParamSpec *g_param_spec_by_type( const gchar *name,
GParamFlags flags );
static gboolean emit_frame_ready(gpointer data);
static void opengl_cb_update_callback(gpointer opengl_cb_ctx);
-static void autofit_handler(GmpvMpv *mpv, gdouble ratio, gpointer data);
-static void mpv_init_handler(GmpvMpv *mpv, gpointer data);
-static void mpv_playback_restart_handler(GmpvMpv *mpv, gpointer data);
+static void metadata_update_handler( GmpvPlayer *player,
+ gint64 pos,
+ gpointer data );
+static void window_resize_handler( GmpvMpv *mpv,
+ gint64 width,
+ gint64 height,
+ gpointer data );
+static void window_move_handler( GmpvMpv *mpv,
+ gboolean flip_x,
+ gboolean flip_y,
+ GValue *x,
+ GValue *y,
+ gpointer data );
static void mpv_prop_change_handler( GmpvMpv *mpv,
const gchar *name,
gpointer value,
@@ -118,39 +133,59 @@ static void constructed(GObject *object)
{
GmpvModel *model = GMPV_MODEL(object);
- g_assert(model->mpv);
-
- model->playlist = gmpv_mpv_get_playlist(model->mpv);
- model->metadata = gmpv_mpv_get_metadata(model->mpv);
-
- g_signal_connect( model->mpv,
- "autofit",
- G_CALLBACK(autofit_handler),
+ g_assert(model->player);
+
+ g_object_bind_property( model->player,
+ "ready",
+ model,
+ "ready",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( model->player,
+ "playlist",
+ model,
+ "playlist",
+ G_BINDING_DEFAULT|G_BINDING_SYNC_CREATE );
+ g_object_bind_property( model->player,
+ "metadata",
+ model,
+ "metadata",
+ G_BINDING_DEFAULT|G_BINDING_SYNC_CREATE );
+ g_object_bind_property( model->player,
+ "track-list",
+ model,
+ "track-list",
+ G_BINDING_DEFAULT|G_BINDING_SYNC_CREATE );
+
+ g_signal_connect( model->player,
+ "metadata-update",
+ G_CALLBACK(metadata_update_handler),
model );
- g_signal_connect( model->mpv,
- "mpv-init",
- G_CALLBACK(mpv_init_handler),
+ g_signal_connect( model->player,
+ "window-resize",
+ G_CALLBACK(window_resize_handler),
model );
- g_signal_connect( model->mpv,
- "mpv-playback-restart",
- G_CALLBACK(mpv_playback_restart_handler),
+ g_signal_connect( model->player,
+ "window-move",
+ G_CALLBACK(window_move_handler),
model );
- g_signal_connect( model->mpv,
- "mpv-prop-change",
+ g_signal_connect( model->player,
+ "mpv-property-changed",
G_CALLBACK(mpv_prop_change_handler),
model );
- g_signal_connect( model->mpv,
+ g_signal_connect( model->player,
"error",
G_CALLBACK(error_handler),
model );
- g_signal_connect( model->mpv,
+ g_signal_connect( model->player,
"message",
G_CALLBACK(message_handler),
model );
- g_signal_connect( model->mpv,
+ g_signal_connect( model->player,
"shutdown",
G_CALLBACK(shutdown_handler),
model );
+
+ G_OBJECT_CLASS(gmpv_model_parent_class)->constructed(object);
}
static void set_property( GObject *object,
@@ -163,13 +198,25 @@ static void set_property( GObject *object,
switch(property_id)
{
case PROP_MPV:
- self->mpv = g_value_get_pointer(value);
+ self->player = g_value_get_pointer(value);
break;
case PROP_READY:
self->ready = g_value_get_boolean(value);
break;
+ case PROP_PLAYLIST:
+ self->playlist = g_value_get_pointer(value);
+ break;
+
+ case PROP_METADATA:
+ self->metadata = g_value_get_pointer(value);
+ break;
+
+ case PROP_TRACK_LIST:
+ self->track_list = g_value_get_pointer(value);
+ break;
+
case PROP_AID:
g_free(self->aid);
self->aid = g_value_dup_string(value);
@@ -205,8 +252,8 @@ static void set_property( GObject *object,
self->pause = g_value_get_boolean(value);
break;
- case PROP_LOOP:
- self->loop = g_value_dup_string(value);
+ case PROP_LOOP_PLAYLIST:
+ self->loop_playlist = g_value_dup_string(value);
break;
case PROP_DURATION:
@@ -218,14 +265,6 @@ static void set_property( GObject *object,
self->media_title = g_value_dup_string(value);
break;
- case PROP_METADATA:
- self->metadata = gmpv_mpv_get_metadata(self->mpv);
- break;
-
- case PROP_PLAYLIST:
- self->playlist = gmpv_mpv_get_playlist(self->mpv);
- break;
-
case PROP_PLAYLIST_COUNT:
self->playlist_count = g_value_get_int64(value);
break;
@@ -238,10 +277,6 @@ static void set_property( GObject *object,
self->speed = g_value_get_double(value);
break;
- case PROP_TRACK_LIST:
- self->track_list = gmpv_mpv_get_track_list(self->mpv);
- break;
-
case PROP_VOLUME:
self->volume = g_value_get_double(value);
break;
@@ -268,13 +303,25 @@ static void get_property( GObject *object,
switch(property_id)
{
case PROP_MPV:
- g_value_set_pointer(value, self->mpv);
+ g_value_set_pointer(value, self->player);
break;
case PROP_READY:
g_value_set_boolean(value, self->ready);
break;
+ case PROP_PLAYLIST:
+ g_value_set_pointer(value, self->playlist);
+ break;
+
+ case PROP_METADATA:
+ g_value_set_pointer(value, self->metadata);
+ break;
+
+ case PROP_TRACK_LIST:
+ g_value_set_pointer(value, self->track_list);
+ break;
+
case PROP_AID:
g_value_set_string(value, self->aid);
break;
@@ -307,8 +354,8 @@ static void get_property( GObject *object,
g_value_set_boolean(value, self->pause);
break;
- case PROP_LOOP:
- g_value_set_string(value, self->loop);
+ case PROP_LOOP_PLAYLIST:
+ g_value_set_string(value, self->loop_playlist);
break;
case PROP_DURATION:
@@ -319,14 +366,6 @@ static void get_property( GObject *object,
g_value_set_string(value, self->media_title);
break;
- case PROP_METADATA:
- g_value_set_pointer(value, self->metadata);
- break;
-
- case PROP_PLAYLIST:
- g_value_set_pointer(value, self->playlist);
- break;
-
case PROP_PLAYLIST_COUNT:
g_value_set_int64(value, self->playlist_count);
break;
@@ -339,10 +378,6 @@ static void get_property( GObject *object,
g_value_set_double(value, self->speed);
break;
- case PROP_TRACK_LIST:
- g_value_set_pointer(value, self->track_list);
- break;
-
case PROP_VOLUME:
g_value_set_double(value, self->volume);
break;
@@ -353,80 +388,109 @@ static void get_property( GObject *object,
}
}
+static void dispose(GObject *object)
+{
+ GmpvModel *model = GMPV_MODEL(object);
+ GmpvMpv *mpv = GMPV_MPV(model->player);
+
+ if(mpv)
+ {
+ gmpv_mpv_set_opengl_cb_callback(mpv, NULL, NULL);
+ g_clear_object(&model->player);
+ while(g_source_remove_by_user_data(model));
+ }
+
+ G_OBJECT_CLASS(gmpv_model_parent_class)->dispose(object);
+}
+
+static void finalize(GObject *object)
+{
+ GmpvModel *model = GMPV_MODEL(object);
+
+ g_free(model->aid);
+ g_free(model->vid);
+ g_free(model->sid);
+ g_free(model->loop_playlist);
+ g_free(model->media_title);
+
+ G_OBJECT_CLASS(gmpv_model_parent_class)->finalize(object);
+}
+
static void set_mpv_property( GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec )
{
GmpvModel *self = GMPV_MODEL(object);
+ GmpvMpv *mpv = GMPV_MPV(self->player);
switch(property_id)
{
case PROP_AID:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"aid",
MPV_FORMAT_STRING,
&self->aid );
break;
case PROP_VID:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"vid",
MPV_FORMAT_STRING,
&self->vid );
break;
case PROP_SID:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"sid",
MPV_FORMAT_STRING,
&self->sid );
break;
case PROP_FULLSCREEN:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"fullscreen",
MPV_FORMAT_FLAG,
&self->fullscreen );
break;
case PROP_PAUSE:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"pause",
MPV_FORMAT_FLAG,
&self->pause );
break;
- case PROP_LOOP:
- gmpv_mpv_set_property( self->mpv,
- "loop",
+ case PROP_LOOP_PLAYLIST:
+ gmpv_mpv_set_property( mpv,
+ "loop-playlist",
MPV_FORMAT_STRING,
- &self->loop );
+ &self->loop_playlist );
break;
case PROP_MEDIA_TITLE:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"media-title",
MPV_FORMAT_INT64,
&self->media_title );
break;
case PROP_PLAYLIST_POS:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"playlist-pos",
MPV_FORMAT_INT64,
&self->playlist_pos );
break;
case PROP_SPEED:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"speed",
MPV_FORMAT_DOUBLE,
&self->speed );
break;
case PROP_VOLUME:
- gmpv_mpv_set_property( self->mpv,
+ gmpv_mpv_set_property( mpv,
"volume",
MPV_FORMAT_DOUBLE,
&self->volume );
@@ -532,20 +596,29 @@ static void opengl_cb_update_callback(gpointer data)
NULL );
}
-static void autofit_handler(GmpvMpv *mpv, gdouble ratio, gpointer data)
+static void metadata_update_handler( GmpvPlayer *player,
+ gint64 pos,
+ gpointer data )
{
- g_signal_emit_by_name(data, "autofit", ratio);
+ g_signal_emit_by_name(data, "metadata-update", pos);
}
-static void mpv_init_handler(GmpvMpv *mpv, gpointer data)
+static void window_resize_handler( GmpvMpv *mpv,
+ gint64 width,
+ gint64 height,
+ gpointer data )
{
- GMPV_MODEL(data)->ready = TRUE;
- g_object_notify(data, "ready");
+ g_signal_emit_by_name(data, "window-resize", width, height);
}
-static void mpv_playback_restart_handler(GmpvMpv *mpv, gpointer data)
+static void window_move_handler( GmpvMpv *mpv,
+ gboolean flip_x,
+ gboolean flip_y,
+ GValue *x,
+ GValue *y,
+ gpointer data )
{
- g_signal_emit_by_name(data, "playback-restart");
+ g_signal_emit_by_name(data, "window-move", flip_x, flip_y, x, y);
}
static void mpv_prop_change_handler( GmpvMpv *mpv,
@@ -553,23 +626,28 @@ static void mpv_prop_change_handler( GmpvMpv *mpv,
gpointer value,
gpointer data )
{
- GObjectClass *klass;
- GParamSpec *pspec;
- GValue gvalue = G_VALUE_INIT;
+ if( g_strcmp0(name, "playlist") != 0 &&
+ g_strcmp0(name, "metadata") != 0 &&
+ g_strcmp0(name, "track-list") != 0 )
+ {
+ GObjectClass *klass;
+ GParamSpec *pspec;
+ GValue gvalue = G_VALUE_INIT;
- klass = G_TYPE_INSTANCE_GET_CLASS(data, GMPV_TYPE_MODEL, GObjectClass);
- pspec = g_object_class_find_property(klass, name);
+ klass = G_TYPE_INSTANCE_GET_CLASS
+ (data, GMPV_TYPE_MODEL, GObjectClass);
+ pspec = g_object_class_find_property(klass, name);
- if(pspec && value)
- {
- GMPV_MODEL(data)->update_mpv_properties = FALSE;
+ if(pspec && value)
+ {
+ GMPV_MODEL(data)->update_mpv_properties = FALSE;
- g_value_set_by_type(&gvalue, pspec->value_type, value);
- g_object_set_property(data, name, &gvalue);
+ g_value_set_by_type(&gvalue, pspec->value_type, value);
+ g_object_set_property(data, name, &gvalue);
- GMPV_MODEL(data)->update_mpv_properties = TRUE;
+ GMPV_MODEL(data)->update_mpv_properties = TRUE;
+ }
}
-
}
static void error_handler(GmpvMpv *mpv, const gchar *message, gpointer data)
@@ -607,15 +685,12 @@ static void gmpv_model_class_init(GmpvModelClass *klass)
{"idle-active", PROP_IDLE_ACTIVE, G_TYPE_BOOLEAN},
{"fullscreen", PROP_FULLSCREEN, G_TYPE_BOOLEAN},
{"pause", PROP_PAUSE, G_TYPE_BOOLEAN},
- {"loop", PROP_LOOP, G_TYPE_STRING},
+ {"loop-playlist", PROP_LOOP_PLAYLIST, G_TYPE_STRING},
{"duration", PROP_DURATION, G_TYPE_DOUBLE},
{"media-title", PROP_MEDIA_TITLE, G_TYPE_STRING},
- {"metadata", PROP_METADATA, G_TYPE_POINTER},
- {"playlist", PROP_PLAYLIST, G_TYPE_POINTER},
{"playlist-count", PROP_PLAYLIST_COUNT, G_TYPE_INT64},
{"playlist-pos", PROP_PLAYLIST_POS, G_TYPE_INT64},
{"speed", PROP_SPEED, G_TYPE_DOUBLE},
- {"track-list", PROP_TRACK_LIST, G_TYPE_POINTER},
{"volume", PROP_VOLUME, G_TYPE_DOUBLE},
{NULL, PROP_INVALID, 0} };
@@ -625,6 +700,8 @@ static void gmpv_model_class_init(GmpvModelClass *klass)
obj_class->constructed = constructed;
obj_class->set_property = set_property;
obj_class->get_property = get_property;
+ obj_class->dispose = dispose;
+ obj_class->finalize = finalize;
pspec = g_param_spec_pointer
( "mpv",
@@ -638,9 +715,30 @@ static void gmpv_model_class_init(GmpvModelClass *klass)
"Ready",
"Whether mpv is ready to receive commands",
FALSE,
- G_PARAM_READABLE );
+ G_PARAM_READWRITE );
g_object_class_install_property(obj_class, PROP_READY, pspec);
+ pspec = g_param_spec_pointer
+ ( "playlist",
+ "playlist",
+ "The playlist",
+ G_PARAM_READWRITE );
+ g_object_class_install_property(obj_class, PROP_PLAYLIST, pspec);
+
+ pspec = g_param_spec_pointer
+ ( "metadata",
+ "metadata",
+ "Metadata tags of the current file",
+ G_PARAM_READWRITE );
+ g_object_class_install_property(obj_class, PROP_METADATA, pspec);
+
+ pspec = g_param_spec_pointer
+ ( "track-list",
+ "track-list",
+ "Audio, video, and subtitle tracks of the current file",
+ G_PARAM_READWRITE );
+ g_object_class_install_property(obj_class, PROP_TRACK_LIST, pspec);
+
for(int i = 0; mpv_props[i].name; i++)
{
pspec = g_param_spec_by_type( mpv_props[i].name,
@@ -670,16 +768,40 @@ static void gmpv_model_class_init(GmpvModelClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0 );
- g_signal_new( "autofit",
+ g_signal_new( "metadata-update",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
0,
NULL,
NULL,
- g_cclosure_marshal_VOID__DOUBLE,
+ g_cclosure_gen_marshal_VOID__INT64,
G_TYPE_NONE,
1,
- G_TYPE_DOUBLE );
+ G_TYPE_INT64 );
+ g_signal_new( "window-resize",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_gen_marshal_VOID__INT64_INT64,
+ G_TYPE_NONE,
+ 2,
+ G_TYPE_INT64,
+ G_TYPE_INT64 );
+ g_signal_new( "window-move",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_gen_marshal_VOID__BOOLEAN_BOOLEAN_POINTER_POINTER,
+ G_TYPE_NONE,
+ 4,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER );
g_signal_new( "message",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
@@ -713,8 +835,12 @@ static void gmpv_model_class_init(GmpvModelClass *klass)
static void gmpv_model_init(GmpvModel *model)
{
- model->mpv = NULL;
+ model->player = NULL;
model->ready = FALSE;
+ model->cache = NULL;
+ model->playlist = NULL;
+ model->metadata = NULL;
+ model->track_list = NULL;
model->update_mpv_properties = TRUE;
model->aid = NULL;
model->vid = NULL;
@@ -724,47 +850,47 @@ static void gmpv_model_init(GmpvModel *model)
model->idle_active = FALSE;
model->fullscreen = FALSE;
model->pause = TRUE;
- model->loop = NULL;
+ model->loop_playlist = NULL;
model->duration = 0.0;
model->media_title = NULL;
- model->metadata = NULL;
- model->playlist = NULL;
model->playlist_count = 0;
model->playlist_pos = 0;
model->speed = 1.0;
- model->track_list = NULL;
model->volume = 1.0;
}
-GmpvModel *gmpv_model_new(GmpvMpv *mpv)
+GmpvModel *gmpv_model_new(gint64 wid)
{
return GMPV_MODEL(g_object_new( gmpv_model_get_type(),
- "mpv", mpv,
+ "mpv", gmpv_player_new(wid),
NULL ));
}
void gmpv_model_initialize(GmpvModel *model)
{
- gmpv_mpv_initialize(model->mpv);
+ GmpvMpv *mpv = GMPV_MPV(model->player);
- gmpv_mpv_set_opengl_cb_callback
- (model->mpv, opengl_cb_update_callback, model);
+ gmpv_mpv_initialize(mpv);
+ gmpv_mpv_set_opengl_cb_callback(mpv, opengl_cb_update_callback, model);
}
void gmpv_model_reset(GmpvModel *model)
{
- GMPV_MODEL(model)->ready = FALSE;
+ model->ready = FALSE;
g_object_notify(G_OBJECT(model), "ready");
- gmpv_mpv_reset(model->mpv);
+ gmpv_mpv_reset(GMPV_MPV(model->player));
}
void gmpv_model_quit(GmpvModel *model)
{
- GMPV_MODEL(model)->ready = FALSE;
- g_object_notify(G_OBJECT(model), "ready");
+ if(model->ready)
+ {
+ model->ready = FALSE;
+ g_object_notify(G_OBJECT(model), "ready");
- gmpv_mpv_quit(model->mpv);
+ gmpv_mpv_quit(GMPV_MPV(model->player));
+ }
}
void gmpv_model_mouse(GmpvModel *model, gint x, gint y)
@@ -774,7 +900,10 @@ void gmpv_model_mouse(GmpvModel *model, gint x, gint y)
const gchar *cmd[] = {"mouse", x_str, y_str, NULL};
g_debug("Set mouse location to (%s, %s)", x_str, y_str);
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
+
+ g_free(x_str);
+ g_free(y_str);
}
void gmpv_model_key_down(GmpvModel *model, const gchar* keystr)
@@ -782,7 +911,7 @@ void gmpv_model_key_down(GmpvModel *model, const gchar* keystr)
const gchar *cmd[] = {"keydown", keystr, NULL};
g_debug("Sent '%s' key down to mpv", keystr);
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_key_up(GmpvModel *model, const gchar* keystr)
@@ -790,7 +919,7 @@ void gmpv_model_key_up(GmpvModel *model, const gchar* keystr)
const gchar *cmd[] = {"keyup", keystr, NULL};
g_debug("Sent '%s' key up to mpv", keystr);
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_key_press(GmpvModel *model, const gchar* keystr)
@@ -798,77 +927,84 @@ void gmpv_model_key_press(GmpvModel *model, const gchar* keystr)
const gchar *cmd[] = {"keypress", keystr, NULL};
g_debug("Sent '%s' key press to mpv", keystr);
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_reset_keys(GmpvModel *model)
{
g_debug("Sent global key up to mpv");
- gmpv_mpv_command_string(model->mpv, "keyup");
+ gmpv_mpv_command_string(GMPV_MPV(model->player), "keyup");
}
void gmpv_model_play(GmpvModel *model)
{
- gmpv_mpv_set_property_flag(model->mpv, "pause", FALSE);
+ gmpv_mpv_set_property_flag(GMPV_MPV(model->player), "pause", FALSE);
}
void gmpv_model_pause(GmpvModel *model)
{
- gmpv_mpv_set_property_flag(model->mpv, "pause", TRUE);
+ gmpv_mpv_set_property_flag(GMPV_MPV(model->player), "pause", TRUE);
}
void gmpv_model_stop(GmpvModel *model)
{
const gchar *cmd[] = {"stop", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_forward(GmpvModel *model)
{
const gchar *cmd[] = {"seek", "10", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_rewind(GmpvModel *model)
{
const gchar *cmd[] = {"seek", "-10", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_next_chapter(GmpvModel *model)
{
const gchar *cmd[] = {"osd-msg", "cycle", "chapter", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_previous_chapter(GmpvModel *model)
{
const gchar *cmd[] = {"osd-msg", "cycle", "chapter", "down", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_next_playlist_entry(GmpvModel *model)
{
const gchar *cmd[] = {"osd-msg", "playlist-next", "weak", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_previous_playlist_entry(GmpvModel *model)
{
const gchar *cmd[] = {"osd-msg", "playlist-prev", "weak", NULL};
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
+}
+
+void gmpv_model_shuffle_playlist(GmpvModel *model)
+{
+ const gchar *cmd[] = {"osd-msg", "playlist-shuffle", NULL};
+
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_seek(GmpvModel *model, gdouble value)
{
- gmpv_mpv_set_property(model->mpv, "time-pos", MPV_FORMAT_DOUBLE, &value);
+ gmpv_mpv_set_property(GMPV_MPV(model->player), "time-pos", MPV_FORMAT_DOUBLE, &value);
}
void gmpv_model_seek_offset(GmpvModel *model, gdouble offset)
@@ -879,17 +1015,19 @@ void gmpv_model_seek_offset(GmpvModel *model, gdouble offset)
g_ascii_dtostr(buf, G_ASCII_DTOSTR_BUF_SIZE, offset);
cmd[1] = buf;
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
}
void gmpv_model_load_audio_track(GmpvModel *model, const gchar *filename)
{
- gmpv_mpv_load_track(model->mpv, filename, TRACK_TYPE_AUDIO);
+ gmpv_mpv_load_track
+ (GMPV_MPV(model->player), filename, TRACK_TYPE_AUDIO);
}
void gmpv_model_load_subtitle_track(GmpvModel *model, const gchar *filename)
{
- gmpv_mpv_load_track(model->mpv, filename, TRACK_TYPE_SUBTITLE);
+ gmpv_mpv_load_track
+ (GMPV_MPV(model->player), filename, TRACK_TYPE_SUBTITLE);
}
gdouble gmpv_model_get_time_position(GmpvModel *model)
@@ -898,7 +1036,7 @@ gdouble gmpv_model_get_time_position(GmpvModel *model)
if(!model->idle_active)
{
- gmpv_mpv_get_property( model->mpv,
+ gmpv_mpv_get_property( GMPV_MPV(model->player),
"time-pos",
MPV_FORMAT_DOUBLE,
&time_pos );
@@ -912,7 +1050,7 @@ void gmpv_model_set_playlist_position(GmpvModel *model, gint64 position)
{
if(position != model->playlist_pos)
{
- gmpv_mpv_set_property( model->mpv,
+ gmpv_mpv_set_property( GMPV_MPV(model->player),
"playlist-pos",
MPV_FORMAT_INT64,
&position );
@@ -926,7 +1064,7 @@ void gmpv_model_remove_playlist_entry(GmpvModel *model, gint64 position)
cmd[1] = index_str;
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
g_free(index_str);
}
@@ -942,7 +1080,7 @@ void gmpv_model_move_playlist_entry(GmpvModel *model, gint64 src, gint64 dst)
cmd[1] = src_str;
cmd[2] = dst_str;
- gmpv_mpv_command(model->mpv, cmd);
+ gmpv_mpv_command(GMPV_MPV(model->player), cmd);
g_free(src_str);
g_free(dst_str);
@@ -950,7 +1088,7 @@ void gmpv_model_move_playlist_entry(GmpvModel *model, gint64 src, gint64 dst)
void gmpv_model_load_file(GmpvModel *model, const gchar *uri, gboolean append)
{
- gmpv_mpv_load(model->mpv, uri, append);
+ gmpv_mpv_load(GMPV_MPV(model->player), uri, append);
/* Start playing when replacing the playlist, ie. not appending, or
* adding the first file to the playlist.
@@ -963,19 +1101,19 @@ void gmpv_model_load_file(GmpvModel *model, const gchar *uri, gboolean append)
gboolean gmpv_model_get_use_opengl_cb(GmpvModel *model)
{
- return gmpv_mpv_get_use_opengl_cb(model->mpv);
+ return gmpv_mpv_get_use_opengl_cb(GMPV_MPV(model->player));
}
void gmpv_model_initialize_gl(GmpvModel *model)
{
- gmpv_mpv_init_gl(model->mpv);
+ gmpv_mpv_init_gl(GMPV_MPV(model->player));
}
void gmpv_model_render_frame(GmpvModel *model, gint width, gint height)
{
mpv_opengl_cb_context *opengl_ctx;
- opengl_ctx = gmpv_mpv_get_opengl_cb_context(model->mpv);
+ opengl_ctx = gmpv_mpv_get_opengl_cb_context(GMPV_MPV(model->player));
if(opengl_ctx)
{
@@ -990,13 +1128,16 @@ void gmpv_model_get_video_geometry( GmpvModel *model,
gint64 *width,
gint64 *height )
{
- gmpv_mpv_get_property(model->mpv, "dwidth", MPV_FORMAT_INT64, width);
- gmpv_mpv_get_property(model->mpv, "dheight", MPV_FORMAT_INT64, height);
+ GmpvMpv *mpv = GMPV_MPV(model->player);
+
+ gmpv_mpv_get_property(mpv, "dwidth", MPV_FORMAT_INT64, width);
+ gmpv_mpv_get_property(mpv, "dheight", MPV_FORMAT_INT64, height);
}
gchar *gmpv_model_get_current_path(GmpvModel *model)
{
- gchar *path = gmpv_mpv_get_property_string(model->mpv, "path");
+ GmpvMpv *mpv = GMPV_MPV(model->player);
+ gchar *path = gmpv_mpv_get_property_string(mpv, "path");
gchar *buf = g_strdup(path);
mpv_free(path);
diff --git a/src/gmpv_model.h b/src/gmpv_model.h
index f00c134..a08558c 100644
--- a/src/gmpv_model.h
+++ b/src/gmpv_model.h
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(GmpvModel, gmpv_model, GMPV, MODEL, GObject)
-GmpvModel *gmpv_model_new(GmpvMpv *mpv);
+GmpvModel *gmpv_model_new(gint64 wid);
void gmpv_model_initialize(GmpvModel *model);
void gmpv_model_reset(GmpvModel *model);
void gmpv_model_quit(GmpvModel *model);
@@ -48,6 +48,7 @@ void gmpv_model_next_chapter(GmpvModel *model);
void gmpv_model_previous_chapter(GmpvModel *model);
void gmpv_model_next_playlist_entry(GmpvModel *model);
void gmpv_model_previous_playlist_entry(GmpvModel *model);
+void gmpv_model_shuffle_playlist(GmpvModel *model);
void gmpv_model_seek(GmpvModel *model, gdouble value);
void gmpv_model_seek_offset(GmpvModel *model, gdouble offset);
void gmpv_model_load_audio_track(GmpvModel *model, const gchar *filename);
diff --git a/src/gmpv_mpv.c b/src/gmpv_mpv.c
index db0f512..a466d06 100644
--- a/src/gmpv_mpv.c
+++ b/src/gmpv_mpv.c
@@ -23,7 +23,6 @@
#include <unistd.h>
#include <glib-object.h>
#include <glib/gi18n.h>
-#include <glib/gstdio.h>
#include <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>
@@ -45,36 +44,37 @@
#include "gmpv_mpv.h"
#include "gmpv_mpv_private.h"
#include "gmpv_mpv_wrapper.h"
-#include "gmpv_mpv_opt.h"
#include "gmpv_common.h"
#include "gmpv_def.h"
#include "gmpv_marshal.h"
static void *GLAPIENTRY glMPGetNativeDisplay(const gchar *name);
static void *get_proc_address(void *fn_ctx, const gchar *name);
-static void set_inst_property( GObject *object,
+static void set_property( GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec );
-static void get_inst_property( GObject *object,
+static void get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec );
-static void load_from_playlist(GmpvMpv *mpv);
-static void load_scripts(GmpvMpv *mpv);
+static void dispose(GObject *object);
+static void finalize(GObject *object);
static void wakeup_callback(void *data);
-static GmpvPlaylistEntry *parse_playlist_entry(mpv_node_list *node);
-static GmpvTrack *parse_track_entry(mpv_node_list *node);
-static void mpv_prop_change_handler(GmpvMpv *mpv, mpv_event_property* prop);
-static gboolean mpv_event_handler(gpointer data);
-static gint apply_args(mpv_handle *mpv_ctx, gchar *args);
-static void log_handler(GmpvMpv *mpv, mpv_event_log_message* message);
-static void add_file_to_playlist(GmpvMpv *mpv, const gchar *uri);
-static void update_playlist(GmpvMpv *mpv);
-static void update_metadata(GmpvMpv *mpv);
-static void update_track_list(GmpvMpv *mpv);
-
-G_DEFINE_TYPE(GmpvMpv, gmpv_mpv, G_TYPE_OBJECT)
+static void mpv_property_changed( GmpvMpv *mpv,
+ const gchar *name,
+ gpointer value );
+static void mpv_log_message( GmpvMpv *mpv,
+ mpv_log_level log_level,
+ const gchar *prefix,
+ const gchar *text );
+static void mpv_event_notify(GmpvMpv *mpv, gint event_id, gpointer event_data);
+static gboolean process_mpv_events(gpointer data);
+static void initialize(GmpvMpv *mpv);
+static void load_file(GmpvMpv *mpv, const gchar *uri, gboolean append);
+static void reset(GmpvMpv *mpv);
+
+G_DEFINE_TYPE_WITH_PRIVATE(GmpvMpv, gmpv_mpv, G_TYPE_OBJECT)
static void *GLAPIENTRY glMPGetNativeDisplay(const gchar *name)
{
@@ -115,16 +115,20 @@ static void *get_proc_address(void *fn_ctx, const gchar *name)
g_assert_not_reached();
}
-static void set_inst_property( GObject *object,
+static void set_property( GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec )
{
- GmpvMpv *self = GMPV_MPV_OBJ(object);
+ GmpvMpvPrivate *priv = get_private(GMPV_MPV(object));
if(property_id == PROP_WID)
{
- self->wid = g_value_get_int64(value);
+ priv->wid = g_value_get_int64(value);
+ }
+ else if(property_id == PROP_READY)
+ {
+ priv->ready = g_value_get_boolean(value);
}
else
{
@@ -132,16 +136,20 @@ static void set_inst_property( GObject *object,
}
}
-static void get_inst_property( GObject *object,
+static void get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec )
{
- GmpvMpv *self = GMPV_MPV_OBJ(object);
+ GmpvMpvPrivate *priv = get_private(GMPV_MPV(object));
if(property_id == PROP_WID)
{
- g_value_set_int64(value, self->wid);
+ g_value_set_int64(value, priv->wid);
+ }
+ else if(property_id == PROP_READY)
+ {
+ g_value_set_boolean(value, priv->ready);
}
else
{
@@ -149,331 +157,125 @@ static void get_inst_property( GObject *object,
}
}
-static void load_from_playlist(GmpvMpv *mpv)
+static void dispose(GObject *object)
{
- GPtrArray * playlist = mpv->playlist;
+ GmpvMpv *mpv = GMPV_MPV(object);
- for(guint i = 0; playlist && i < playlist->len; i++)
+ if(get_private(mpv)->mpv_ctx)
{
- GmpvPlaylistEntry *entry;
-
- entry = g_ptr_array_index(playlist, i);
-
- /* Do not append on first iteration */
- gmpv_mpv_load_file(mpv, entry->filename, i != 0);
+ gmpv_mpv_quit(mpv);
+ while(g_source_remove_by_user_data(object));
}
+
+ G_OBJECT_CLASS(gmpv_mpv_parent_class)->dispose(object);
}
-static void load_scripts(GmpvMpv *mpv)
+static void finalize(GObject *object)
{
- gchar *path = get_scripts_dir_path();
- GDir *dir = g_dir_open(path, 0, NULL);
-
- if(dir)
- {
- const gchar *name;
-
- do
- {
- gchar *full_path;
-
- name = g_dir_read_name(dir);
- full_path = g_build_filename(path, name, NULL);
-
- if(g_file_test(full_path, G_FILE_TEST_IS_REGULAR))
- {
- const gchar *cmd[]
- = {"load-script", full_path, NULL};
-
- g_info("Loading script: %s", full_path);
- mpv_command(mpv->mpv_ctx, cmd);
- }
-
- g_free(full_path);
- }
- while(name);
-
- g_dir_close(dir);
- }
- else
- {
- g_warning("Failed to open scripts directory: %s", path);
- }
-
- g_free(path);
+ G_OBJECT_CLASS(gmpv_mpv_parent_class)->finalize(object);
}
static void wakeup_callback(void *data)
{
- g_idle_add((GSourceFunc)mpv_event_handler, data);
+ g_idle_add_full(G_PRIORITY_HIGH_IDLE, process_mpv_events, data, NULL);
}
-static GmpvPlaylistEntry *parse_playlist_entry(mpv_node_list *node)
+static void mpv_property_changed( GmpvMpv *mpv,
+ const gchar *name,
+ gpointer value )
{
- const gchar *filename = NULL;
- const gchar *title = NULL;
-
- for(gint i = 0; i < node->num; i++)
- {
- if(g_strcmp0(node->keys[i], "filename") == 0)
- {
- filename = node->values[i].u.string;
- }
- else if(g_strcmp0(node->keys[i], "title") == 0)
- {
- title = node->values[i].u.string;
- }
- }
-
- return gmpv_playlist_entry_new(filename, title);
+ g_debug("Received mpv property change event for \"%s\"", name);
}
-static GmpvTrack *parse_track_entry(mpv_node_list *node)
+static void mpv_event_notify(GmpvMpv *mpv, gint event_id, gpointer event_data)
{
- GmpvTrack *entry = gmpv_track_new();
-
- for(gint i = 0; i < node->num; i++)
+ if(event_id == MPV_EVENT_PROPERTY_CHANGE)
{
- if(g_strcmp0(node->keys[i], "type") == 0)
- {
- const gchar *type = node->values[i].u.string;
+ mpv_event_property *prop = event_data;
- if(g_strcmp0(type, "audio") == 0)
- {
- entry->type = TRACK_TYPE_AUDIO;
- }
- else if(g_strcmp0(type, "video") == 0)
- {
- entry->type = TRACK_TYPE_VIDEO;
- }
- else if(g_strcmp0(type, "sub") == 0)
- {
- entry->type = TRACK_TYPE_SUBTITLE;
- }
- }
- else if(g_strcmp0(node->keys[i], "title") == 0)
- {
- entry->title = g_strdup(node->values[i].u.string);
- }
- else if(g_strcmp0(node->keys[i], "lang") == 0)
- {
- entry->lang = g_strdup(node->values[i].u.string);
- }
- else if(g_strcmp0(node->keys[i], "id") == 0)
- {
- entry->id = node->values[i].u.int64;
- }
+ g_signal_emit_by_name( mpv,
+ "mpv-property-changed",
+ prop->name,
+ prop->data );
}
-
- return entry;
-}
-
-static void mpv_prop_change_handler(GmpvMpv *mpv, mpv_event_property* prop)
-{
- g_debug("Received mpv property change event for \"%s\"", prop->name);
-
- if(g_strcmp0(prop->name, "pause") == 0)
+ else if(event_id == MPV_EVENT_IDLE)
{
- gboolean idle_active;
-
- mpv->state.paused = prop->data?*((int *)prop->data):TRUE;
-
- mpv_get_property( mpv->mpv_ctx,
- "idle-active",
- MPV_FORMAT_FLAG,
- &idle_active );
-
- if(idle_active && !mpv->state.paused && !mpv->init_vo_config)
- {
- load_from_playlist(mpv);
- }
+ gmpv_mpv_set_property_flag(mpv, "pause", TRUE);
}
- else if(g_strcmp0(prop->name, "playlist") == 0)
+ else if(event_id == MPV_EVENT_END_FILE)
{
- gint64 playlist_count = 0;
- gboolean idle_active = FALSE;
- gboolean was_empty = FALSE;
-
- mpv_get_property( mpv->mpv_ctx,
- "playlist-count",
- MPV_FORMAT_INT64,
- &playlist_count );
- mpv_get_property( mpv->mpv_ctx,
- "idle-active",
- MPV_FORMAT_FLAG,
- &idle_active );
-
- was_empty = (mpv->playlist->len == 0);
-
- if(!idle_active)
- {
- update_playlist(mpv);
- }
+ mpv_event_end_file *ef_event = event_data;
- /* Check if we're transitioning from empty playlist to non-empty
- * playlist.
- */
- if(was_empty && mpv->playlist->len > 0)
+ if(ef_event->reason == MPV_END_FILE_REASON_ERROR)
{
- gmpv_mpv_set_property_flag(mpv, "pause", FALSE);
+ const gchar *err;
+ gchar *msg;
+
+ err = mpv_error_string(ef_event->error);
+ msg = g_strdup_printf
+ ( _("Playback was terminated "
+ "abnormally. Reason: %s."),
+ err );
+
+ gmpv_mpv_set_property_flag(mpv, "pause", TRUE);
+ g_signal_emit_by_name(mpv, "error", msg);
+
+ g_free(msg);
}
}
- else if(g_strcmp0(prop->name, "metadata") == 0)
+ else if(event_id == MPV_EVENT_LOG_MESSAGE)
{
- update_metadata(mpv);
+ mpv_event_log_message* message = event_data;
+
+ g_signal_emit_by_name( mpv,
+ "mpv-log-message",
+ message->log_level,
+ message->prefix,
+ message->text );
}
- else if(g_strcmp0(prop->name, "track-list") == 0)
+ else if(event_id == MPV_EVENT_CLIENT_MESSAGE)
{
- update_track_list(mpv);
+ mpv_event_client_message *event_cmsg = event_data;
+ gchar* msg = strnjoinv( " ",
+ event_cmsg->args,
+ (gsize)event_cmsg->num_args );
+
+ g_signal_emit_by_name(mpv, "message", msg);
+ g_free(msg);
}
- else if(g_strcmp0(prop->name, "vo-configured") == 0)
+ else if(event_id == MPV_EVENT_SHUTDOWN)
{
- if(mpv->init_vo_config)
- {
- mpv->init_vo_config = FALSE;
- load_from_playlist(mpv);
- load_scripts(mpv);
- }
+ g_signal_emit_by_name(mpv, "shutdown");
}
}
-static gboolean mpv_event_handler(gpointer data)
+static gboolean process_mpv_events(gpointer data)
{
GmpvMpv *mpv = data;
+ GmpvMpvPrivate *priv = get_private(mpv);
gboolean done = !mpv;
while(!done)
{
- mpv_event *event = mpv->mpv_ctx?
- mpv_wait_event(mpv->mpv_ctx, 0):
+ mpv_event *event = priv->mpv_ctx?
+ mpv_wait_event(priv->mpv_ctx, 0):
NULL;
- if(!event)
- {
- done = TRUE;
- }
- else if(event->event_id == MPV_EVENT_PROPERTY_CHANGE)
- {
- mpv_event_property *prop = event->data;
-
- mpv_prop_change_handler(mpv, prop);
-
- g_signal_emit_by_name( mpv,
- "mpv-prop-change",
- prop->name,
- prop->data );
- }
- else if(event->event_id == MPV_EVENT_IDLE)
- {
- if(mpv->state.loaded)
- {
- mpv->state.loaded = FALSE;
-
- gmpv_mpv_set_property_flag
- (mpv, "pause", TRUE);
- }
-
- if(!mpv->state.init_load && !mpv->state.loaded)
- {
- g_signal_emit_by_name(mpv, "idle");
- }
-
- mpv->state.init_load = FALSE;
- }
- else if(event->event_id == MPV_EVENT_FILE_LOADED)
- {
- mpv->state.loaded = TRUE;
- mpv->state.init_load = FALSE;
-
- g_signal_emit_by_name(mpv, "load");
- }
- else if(event->event_id == MPV_EVENT_END_FILE)
+ if(event)
{
- mpv_event_end_file *ef_event = event->data;
-
- mpv->state.init_load = FALSE;
-
- if(mpv->state.loaded)
+ if( !priv->mpv_ctx ||
+ event->event_id == MPV_EVENT_SHUTDOWN ||
+ event->event_id == MPV_EVENT_NONE )
{
- mpv->state.new_file = FALSE;
+ done = TRUE;
}
- if(ef_event->reason == MPV_END_FILE_REASON_ERROR)
- {
- const gchar *err;
- gchar *msg;
-
- err = mpv_error_string(ef_event->error);
- msg = g_strdup_printf
- ( _("Playback was terminated "
- "abnormally. Reason: %s."),
- err );
-
- gmpv_mpv_set_property_flag(mpv, "pause", TRUE);
- g_signal_emit_by_name(mpv, "error", msg);
-
- g_free(msg);
- }
- }
- else if(event->event_id == MPV_EVENT_VIDEO_RECONFIG)
- {
- if(mpv->state.new_file)
- {
- gmpv_mpv_opt_handle_autofit(mpv);
-
- g_signal_emit_by_name( mpv,
- "autofit",
- mpv->autofit_ratio );
- }
- }
- else if(event->event_id == MPV_EVENT_START_FILE)
- {
- gboolean vo_configured = FALSE;
-
- mpv_get_property( mpv->mpv_ctx,
- "vo-configured",
- MPV_FORMAT_FLAG,
- &vo_configured );
-
- /* If the vo is not configured yet, save the content of
- * mpv's playlist in mpv->playlist. This will be loaded
- * again when the vo is configured.
- */
- if(!vo_configured)
- {
- update_playlist(mpv);
- }
- }
- else if(event->event_id == MPV_EVENT_PLAYBACK_RESTART)
- {
- g_signal_emit_by_name(mpv, "mpv-playback-restart");
- }
- else if(event->event_id == MPV_EVENT_LOG_MESSAGE)
- {
- log_handler(mpv, event->data);
- }
- else if(event->event_id == MPV_EVENT_CLIENT_MESSAGE)
- {
- mpv_event_client_message *event_cmsg = event->data;
- gchar* msg = strnjoinv( " ",
- event_cmsg->args,
- (gsize)event_cmsg->num_args );
-
- g_signal_emit_by_name(mpv, "message", msg);
- g_free(msg);
- }
- else if(event->event_id == MPV_EVENT_SHUTDOWN)
- {
- g_signal_emit_by_name(mpv, "shutdown");
-
- done = TRUE;
- }
- else if(event->event_id == MPV_EVENT_NONE)
- {
- done = TRUE;
+ g_signal_emit_by_name( mpv,
+ "mpv-event-notify",
+ event->event_id,
+ event->data );
}
-
- if(event && !mpv->mpv_ctx)
+ else
{
done = TRUE;
}
@@ -482,298 +284,118 @@ static gboolean mpv_event_handler(gpointer data)
return FALSE;
}
-static gint apply_args(mpv_handle *mpv_ctx, gchar *args)
-{
- gchar *opt_begin = args?strstr(args, "--"):NULL;
- gint fail_count = 0;
-
- while(opt_begin)
- {
- gchar *opt_end = strstr(opt_begin, " --");
- gchar *token;
- gchar *token_arg;
- gsize token_size;
-
- /* Point opt_end to the end of the input string if the current
- * option is the last one.
- */
- if(!opt_end)
- {
- opt_end = args+strlen(args);
- }
-
- /* Traverse the string backwards until non-space character is
- * found. This removes spaces after the option token.
- */
- while( --opt_end != opt_begin
- && (*opt_end == ' ' || *opt_end == '\n') );
-
- token_size = (gsize)(opt_end-opt_begin);
- token = g_strndup(opt_begin+2, token_size-1);
- token_arg = strpbrk(token, "= ");
-
- if(token_arg)
- {
- *token_arg = '\0';
-
- token_arg++;
- }
- else
- {
- /* Default to empty string if there is no explicit
- * argument
- */
- token_arg = "";
- }
-
- g_debug("Applying option --%s=%s", token, token_arg);
-
- if(mpv_set_option_string(mpv_ctx, token, token_arg) < 0)
- {
- fail_count++;
-
- g_warning( "Failed to apply option: --%s=%s\n",
- token,
- token_arg );
- }
-
- opt_begin = strstr(opt_end, " --");
-
- if(opt_begin)
- {
- opt_begin++;
- }
-
- g_free(token);
- }
-
- return fail_count*(-1);
-}
-
-static void log_handler(GmpvMpv *mpv, mpv_event_log_message* message)
+static void initialize(GmpvMpv *mpv)
{
- GSList *iter = mpv->log_level_list;
- module_log_level *level = NULL;
- gsize event_prefix_len = strlen(message->prefix);
- gboolean found = FALSE;
+ GmpvMpvPrivate *priv = get_private(mpv);
+ gchar *current_vo = NULL;
+ gchar *mpv_version = NULL;
- if(iter)
+ if(priv->wid < 0)
{
- level = iter->data;
+ g_info("Forcing --vo=opengl-cb");
+ mpv_set_option_string(priv->mpv_ctx, "vo", "opengl-cb");
}
-
- while(iter && !found)
+ else if(priv->wid == 0)
{
- gsize prefix_len = strlen(level->prefix);
- gint cmp;
-
- cmp = strncmp( level->prefix,
- message->prefix,
- (event_prefix_len < prefix_len)?
- event_prefix_len:prefix_len );
-
- /* Allow both exact match and prefix match */
- if(cmp == 0
- && (prefix_len == event_prefix_len
- || (prefix_len < event_prefix_len
- && message->prefix[prefix_len] == '/')))
- {
- found = TRUE;
- }
- else
- {
- iter = g_slist_next(iter);
- level = iter?iter->data:NULL;
- }
+ g_info("Forcing --vo=null");
+ mpv_set_option_string(priv->mpv_ctx, "vo", "null");
}
-
- if(!iter || (message->log_level <= level->level))
+ else
{
- gchar *buf = g_strdup(message->text);
- gsize len = strlen(buf);
-
- if(len > 1)
- {
- /* g_message() automatically adds a newline
- * character when using the default log handler,
- * but log messages from mpv already come
- * terminated with a newline character so we
- * need to take it out.
- */
- if(buf[len-1] == '\n')
- {
- buf[len-1] = '\0';
- }
-
- g_message("[%s] %s", message->prefix, buf);
- }
-
- g_free(buf);
+ g_debug("Attaching mpv window to wid %#x", (guint)priv->wid);
+ mpv_set_option(priv->mpv_ctx, "wid", MPV_FORMAT_INT64, &priv->wid);
}
-}
-static void load_input_conf(GmpvMpv *mpv, const gchar *input_conf)
-{
- const gchar *default_keybinds[] = DEFAULT_KEYBINDS;
- gchar *tmp_path;
- FILE *tmp_file;
- gint tmp_fd;
+ mpv_set_wakeup_callback(priv->mpv_ctx, wakeup_callback, mpv);
+ mpv_initialize(priv->mpv_ctx);
- tmp_fd = g_file_open_tmp(NULL, &tmp_path, NULL);
- tmp_file = fdopen(tmp_fd, "w");
- mpv->tmp_input_file = tmp_path;
+ mpv_version = gmpv_mpv_get_property_string(mpv, "mpv-version");
+ current_vo = gmpv_mpv_get_property_string(mpv, "current-vo");
+ priv->use_opengl = (!current_vo && priv->wid != 0);
- if(!tmp_file)
- {
- g_error("Failed to open temporary input config file");
- }
+ g_info("Using %s", mpv_version);
- for(gint i = 0; default_keybinds[i]; i++)
+ if(priv->use_opengl)
{
- const gsize len = strlen(default_keybinds[i]);
- gsize write_size;
- gint rc;
-
- write_size = fwrite(default_keybinds[i], len, 1, tmp_file);
- rc = fputc('\n', tmp_file);
-
- if(write_size != 1 || rc != '\n')
- {
- g_error( "Error writing default keybindings to "
- "temporary input config file" );
- }
+ priv->opengl_ctx = mpv_get_sub_api
+ ( priv->mpv_ctx,
+ MPV_SUB_API_OPENGL_CB );
}
- g_debug("Using temporary input config file: %s", tmp_path);
- mpv_set_option_string(mpv->mpv_ctx, "input-conf", tmp_path);
-
- if(input_conf && strlen(input_conf) > 0)
- {
- const gsize buf_size = 65536;
- void *buf = g_malloc(buf_size);
- FILE *src_file = g_fopen(input_conf, "r");
- gsize read_size = buf_size;
-
- if(!src_file)
- {
- g_warning( "Cannot open input config file: %s",
- input_conf );
- }
-
- while(src_file && read_size == buf_size)
- {
- read_size = fread(buf, 1, buf_size, src_file);
-
- if(read_size != fwrite(buf, 1, read_size, tmp_file))
- {
- g_error( "Error writing requested input "
- "config file to temporary "
- "input config file" );
- }
- }
-
- g_info("Loaded input config file: %s", input_conf);
-
- g_free(buf);
- }
+ priv->ready = TRUE;
+ g_object_notify(G_OBJECT(mpv), "ready");
- fclose(tmp_file);
+ mpv_free(current_vo);
+ mpv_free(mpv_version);
}
-static void add_file_to_playlist(GmpvMpv *mpv, const gchar *uri)
+static void load_file(GmpvMpv *mpv, const gchar *uri, gboolean append)
{
- GmpvPlaylistEntry *entry = gmpv_playlist_entry_new(uri, NULL);
-
- g_ptr_array_add(mpv->playlist, entry);
- g_signal_emit_by_name(mpv, "mpv-prop-change", "playlist", NULL);
-}
+ GmpvMpvPrivate *priv = get_private(mpv);
+ gchar *path = get_path_from_uri(uri);
+ const gchar *load_cmd[] = {"loadfile", path, NULL, NULL};
+ gint64 playlist_count = 0;
-static void update_playlist(GmpvMpv *mpv)
-{
- const mpv_node_list *org_list;
- mpv_node playlist;
+ g_assert(uri);
+ g_info( "Loading file (append=%s): %s", append?"TRUE":"FALSE", uri);
- g_ptr_array_set_size(mpv->playlist, 0);
- gmpv_mpv_get_property(mpv, "playlist", MPV_FORMAT_NODE, &playlist);
+ mpv_get_property( priv->mpv_ctx,
+ "playlist-count",
+ MPV_FORMAT_INT64,
+ &playlist_count );
- org_list = playlist.u.list;
+ load_cmd[2] = (append && playlist_count > 0)?"append":"replace";
- if(playlist.format == MPV_FORMAT_NODE_ARRAY)
+ if(!append)
{
- for(gint i = 0; i < org_list->num; i++)
- {
- GmpvPlaylistEntry *entry;
+ gmpv_mpv_set_property_flag(mpv, "pause", FALSE);
+ }
- entry = parse_playlist_entry(org_list->values[i].u.list);
- g_ptr_array_add(mpv->playlist, entry);
- }
+ g_assert(priv->mpv_ctx);
+ mpv_request_event(priv->mpv_ctx, MPV_EVENT_END_FILE, 0);
+ mpv_command(priv->mpv_ctx, load_cmd);
+ mpv_request_event(priv->mpv_ctx, MPV_EVENT_END_FILE, 1);
- mpv_free_node_contents(&playlist);
- }
+ g_free(path);
}
-static void update_metadata(GmpvMpv *mpv)
+static void reset(GmpvMpv *mpv)
{
- mpv_node_list *org_list = NULL;
- mpv_node metadata;
+ GmpvMpvPrivate *priv = get_private(mpv);
+ const gchar *quit_cmd[] = {"quit_watch_later", NULL};
+ gchar *loop_str;
+ gboolean loop;
+ gboolean pause;
- g_ptr_array_set_size(mpv->metadata, 0);
- gmpv_mpv_get_property(mpv, "metadata", MPV_FORMAT_NODE, &metadata);
- org_list = metadata.u.list;
+ loop_str = gmpv_mpv_get_property_string(mpv, "loop");
+ loop = (g_strcmp0(loop_str, "inf") == 0);
- if(metadata.format == MPV_FORMAT_NODE_MAP && org_list->num > 0)
- {
- for(gint i = 0; i < org_list->num; i++)
- {
- const gchar *key;
- mpv_node value;
+ mpv_free(loop_str);
- key = org_list->keys[i];
- value = org_list->values[i];
+ /* Reset priv->mpv_ctx */
+ priv->ready = FALSE;
+ g_object_notify(G_OBJECT(mpv), "ready");
- if(value.format == MPV_FORMAT_STRING)
- {
- GmpvMetadataEntry *entry;
+ gmpv_mpv_command(mpv, quit_cmd);
+ gmpv_mpv_quit(mpv);
- entry = gmpv_metadata_entry_new
- (key, value.u.string);
+ priv->mpv_ctx = mpv_create();
+ gmpv_mpv_initialize(mpv);
- g_ptr_array_add(mpv->metadata, entry);
- }
- else
- {
- g_warning( "Ignored metadata field %s "
- "with unexpected format %d",
- key,
- value.format );
- }
- }
+ gmpv_mpv_set_opengl_cb_callback
+ ( mpv,
+ priv->opengl_cb_callback,
+ priv->opengl_cb_callback_data );
- mpv_free_node_contents(&metadata);
- }
+ gmpv_mpv_set_property_string(mpv, "loop", loop?"inf":"no");
+ gmpv_mpv_set_property(mpv, "pause", MPV_FORMAT_FLAG, &pause);
}
-static void update_track_list(GmpvMpv *mpv)
+static void mpv_log_message( GmpvMpv *mpv,
+ mpv_log_level log_level,
+ const gchar *prefix,
+ const gchar *text )
{
- mpv_node_list *org_list = NULL;
- mpv_node track_list;
-
- g_ptr_array_set_size(mpv->track_list, 0);
- gmpv_mpv_get_property(mpv, "track-list", MPV_FORMAT_NODE, &track_list);
- org_list = track_list.u.list;
-
- if(track_list.format == MPV_FORMAT_NODE_ARRAY)
- {
- for(gint i = 0; i < org_list->num; i++)
- {
- GmpvTrack *entry = parse_track_entry
- (org_list->values[i].u.list);
-
- g_ptr_array_add(mpv->track_list, entry);
- }
-
- mpv_free_node_contents(&track_list);
- }
}
static void gmpv_mpv_class_init(GmpvMpvClass* klass)
@@ -781,8 +403,16 @@ static void gmpv_mpv_class_init(GmpvMpvClass* klass)
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
GParamSpec *pspec = NULL;
- obj_class->set_property = set_inst_property;
- obj_class->get_property = get_inst_property;
+ klass->mpv_event_notify = mpv_event_notify;
+ klass->mpv_log_message = mpv_log_message;
+ klass->mpv_property_changed = mpv_property_changed;
+ klass->initialize = initialize;
+ klass->load_file = load_file;
+ klass->reset = reset;
+ obj_class->set_property = set_property;
+ obj_class->get_property = get_property;
+ obj_class->dispose = dispose;
+ obj_class->finalize = finalize;
pspec = g_param_spec_int64
( "wid",
@@ -791,18 +421,17 @@ static void gmpv_mpv_class_init(GmpvMpvClass* klass)
G_MININT64,
G_MAXINT64,
-1,
- G_PARAM_READWRITE );
+ G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
g_object_class_install_property(obj_class, PROP_WID, pspec);
- g_signal_new( "mpv-init",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_FIRST,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0 );
+ pspec = g_param_spec_boolean
+ ( "ready",
+ "Ready",
+ "Whether mpv is initialized and ready to recieve commands",
+ FALSE,
+ G_PARAM_READABLE );
+ g_object_class_install_property(obj_class, PROP_READY, pspec);
+
g_signal_new( "error",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
@@ -813,65 +442,74 @@ static void gmpv_mpv_class_init(GmpvMpvClass* klass)
G_TYPE_NONE,
1,
G_TYPE_STRING );
- g_signal_new( "mpv-playback-restart",
+ g_signal_new( "mpv-event-notify",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- 0,
+ G_STRUCT_OFFSET(GmpvMpvClass, mpv_event_notify),
NULL,
NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_gen_marshal_VOID__INT_POINTER,
G_TYPE_NONE,
- 0 );
- g_signal_new( "mpv-prop-change",
+ 2,
+ G_TYPE_INT,
+ G_TYPE_POINTER );
+ g_signal_new( "mpv-log-message",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- 0,
+ G_STRUCT_OFFSET(GmpvMpvClass, mpv_log_message),
NULL,
NULL,
- g_cclosure_gen_marshal_VOID__STRING_POINTER,
+ g_cclosure_gen_marshal_VOID__INT_STRING_STRING,
G_TYPE_NONE,
- 2,
+ 3,
+ G_TYPE_INT,
G_TYPE_STRING,
- G_TYPE_POINTER );
-
- g_signal_new( "idle",
+ G_TYPE_STRING );
+ g_signal_new( "mpv-property-changed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- 0,
+ G_STRUCT_OFFSET(GmpvMpvClass, mpv_property_changed),
NULL,
NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_gen_marshal_VOID__STRING_POINTER,
G_TYPE_NONE,
- 0 );
- g_signal_new( "load",
+ 2,
+ G_TYPE_STRING,
+ G_TYPE_POINTER );
+ g_signal_new( "message",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
0,
NULL,
NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
- 0 );
- g_signal_new( "message",
+ 1,
+ G_TYPE_STRING );
+ g_signal_new( "window-resize",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
0,
NULL,
NULL,
- g_cclosure_marshal_VOID__STRING,
+ g_cclosure_gen_marshal_VOID__INT64_INT64,
G_TYPE_NONE,
- 1,
- G_TYPE_STRING );
- g_signal_new( "autofit",
+ 2,
+ G_TYPE_INT64,
+ G_TYPE_INT64 );
+ g_signal_new( "window-move",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
0,
NULL,
NULL,
- g_cclosure_marshal_VOID__DOUBLE,
+ g_cclosure_gen_marshal_VOID__BOOLEAN_BOOLEAN_POINTER_POINTER,
G_TYPE_NONE,
- 1,
- G_TYPE_DOUBLE );
+ 4,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER );
g_signal_new( "shutdown",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
@@ -885,272 +523,45 @@ static void gmpv_mpv_class_init(GmpvMpvClass* klass)
static void gmpv_mpv_init(GmpvMpv *mpv)
{
- mpv->mpv_ctx = mpv_create();
- mpv->opengl_ctx = NULL;
- mpv->playlist = g_ptr_array_new_full( 1,
- (GDestroyNotify)
- gmpv_playlist_entry_free );
- mpv->metadata = g_ptr_array_new_full( 1,
- (GDestroyNotify)
- gmpv_metadata_entry_free );
- mpv->track_list = g_ptr_array_new_full( 1,
- (GDestroyNotify)
- gmpv_track_free );
- mpv->tmp_input_file = NULL;
- mpv->log_level_list = NULL;
- mpv->autofit_ratio = -1;
- mpv->geometry = NULL;
-
- mpv->state.ready = FALSE;
- mpv->state.paused = TRUE;
- mpv->state.loaded = FALSE;
- mpv->state.new_file = TRUE;
- mpv->state.init_load = TRUE;
-
- mpv->init_vo_config = TRUE;
- mpv->force_opengl = FALSE;
- mpv->use_opengl = FALSE;
- mpv->glarea = NULL;
- mpv->wid = -1;
- mpv->opengl_cb_callback_data = NULL;
- mpv->opengl_cb_callback = NULL;
-}
+ GmpvMpvPrivate *priv = get_private(mpv);
-GmpvMpv *gmpv_mpv_new(gint64 wid)
-{
- return GMPV_MPV_OBJ(g_object_new(gmpv_mpv_get_type(), "wid", wid, NULL));
+ priv->mpv_ctx = mpv_create();
+ priv->opengl_ctx = NULL;
+ priv->ready = FALSE;
+ priv->init_vo_config = TRUE;
+ priv->use_opengl = FALSE;
+ priv->wid = -1;
+ priv->opengl_cb_callback_data = NULL;
+ priv->opengl_cb_callback = NULL;
}
-inline const GmpvMpvState *gmpv_mpv_get_state(GmpvMpv *mpv)
-{
- return &mpv->state;
-}
-
-inline GmpvGeometry *gmpv_mpv_get_geometry(GmpvMpv *mpv)
-{
- return mpv->geometry;
-}
-
-inline mpv_handle *gmpv_mpv_get_mpv_handle(GmpvMpv *mpv)
+GmpvMpv *gmpv_mpv_new(gint64 wid)
{
- return mpv->mpv_ctx;
+ return GMPV_MPV(g_object_new(gmpv_mpv_get_type(), "wid", wid, NULL));
}
inline mpv_opengl_cb_context *gmpv_mpv_get_opengl_cb_context(GmpvMpv *mpv)
{
- return mpv->opengl_ctx;
+ return get_private(mpv)->opengl_ctx;
}
inline gboolean gmpv_mpv_get_use_opengl_cb(GmpvMpv *mpv)
{
- return mpv->use_opengl;
-}
-
-GPtrArray *gmpv_mpv_get_metadata(GmpvMpv *mpv)
-{
- return mpv->metadata;
-}
-
-GPtrArray *gmpv_mpv_get_playlist(GmpvMpv *mpv)
-{
- return mpv->playlist;
-}
-
-GPtrArray *gmpv_mpv_get_track_list(GmpvMpv *mpv)
-{
- return mpv->track_list;
+ return get_private(mpv)->use_opengl;
}
void gmpv_mpv_initialize(GmpvMpv *mpv)
{
- GSettings *main_settings = g_settings_new(CONFIG_ROOT);
- gchar *config_dir = get_config_dir_path();
- gchar *mpvopt = NULL;
- gchar *current_vo = NULL;
- gchar *mpv_version = NULL;
-
- const struct
- {
- const gchar *name;
- const gchar *value;
- }
- options[] = { {"vo", "opengl,vdpau,vaapi,xv,x11,opengl-cb,"},
- {"osd-level", "1"},
- {"softvol", "yes"},
- {"force-window", "immediate"},
- {"input-default-bindings", "yes"},
- {"audio-client-name", ICON_NAME},
- {"title", "${media-title}"},
- {"autofit-larger", "75%"},
- {"window-scale", "1"},
- {"pause", "yes"},
- {"ytdl", "yes"},
- {"load-scripts", "no"},
- {"osd-bar", "no"},
- {"input-cursor", "no"},
- {"cursor-autohide", "no"},
- {"softvol-max", "100"},
- {"config", "yes"},
- {"screenshot-template", "gnome-mpv-shot%n"},
- {"config-dir", config_dir},
- {NULL, NULL} };
-
- g_assert(mpv->mpv_ctx);
-
- for(gint i = 0; options[i].name; i++)
- {
- g_debug( "Applying default option --%s=%s",
- options[i].name,
- options[i].value );
-
- mpv_set_option_string( mpv->mpv_ctx,
- options[i].name,
- options[i].value );
- }
-
- if(g_settings_get_boolean(main_settings, "mpv-config-enable"))
- {
- gchar *mpv_conf
- = g_settings_get_string
- (main_settings, "mpv-config-file");
-
- g_info("Loading config file: %s", mpv_conf);
- mpv_load_config_file(mpv->mpv_ctx, mpv_conf);
-
- g_free(mpv_conf);
- }
-
- if(g_settings_get_boolean(main_settings, "mpv-input-config-enable"))
- {
- gchar *input_conf
- = g_settings_get_string
- (main_settings, "mpv-input-config-file");
-
- g_info("Loading input config file: %s", input_conf);
- load_input_conf(mpv, input_conf);
-
- g_free(input_conf);
- }
- else
- {
- load_input_conf(mpv, NULL);
- }
-
- mpvopt = g_settings_get_string(main_settings, "mpv-options");
-
- g_debug("Applying extra mpv options: %s", mpvopt);
-
- /* Apply extra options */
- if(apply_args(mpv->mpv_ctx, mpvopt) < 0)
- {
- const gchar *msg
- = _("Failed to apply one or more MPV options.");
-
- g_signal_emit_by_name(mpv, "error", msg);
- }
-
- if(mpv->force_opengl || mpv->wid <= 0)
- {
- g_info("Forcing --vo=opengl-cb");
- mpv_set_option_string(mpv->mpv_ctx, "vo", "opengl-cb");
-
- }
- else
- {
- g_debug( "Attaching mpv window to wid %#x",
- (guint)mpv->wid );
-
- mpv_set_option(mpv->mpv_ctx, "wid", MPV_FORMAT_INT64, &mpv->wid);
- }
-
- mpv_observe_property(mpv->mpv_ctx, 0, "aid", MPV_FORMAT_STRING);
- mpv_observe_property(mpv->mpv_ctx, 0, "vid", MPV_FORMAT_STRING);
- mpv_observe_property(mpv->mpv_ctx, 0, "sid", MPV_FORMAT_STRING);
- mpv_observe_property(mpv->mpv_ctx, 0, "chapters", MPV_FORMAT_INT64);
- mpv_observe_property(mpv->mpv_ctx, 0, "core-idle", MPV_FORMAT_FLAG);
- mpv_observe_property(mpv->mpv_ctx, 0, "idle-active", MPV_FORMAT_FLAG);
- mpv_observe_property(mpv->mpv_ctx, 0, "fullscreen", MPV_FORMAT_FLAG);
- mpv_observe_property(mpv->mpv_ctx, 0, "pause", MPV_FORMAT_FLAG);
- mpv_observe_property(mpv->mpv_ctx, 0, "loop", MPV_FORMAT_STRING);
- mpv_observe_property(mpv->mpv_ctx, 0, "duration", MPV_FORMAT_DOUBLE);
- mpv_observe_property(mpv->mpv_ctx, 0, "media-title", MPV_FORMAT_STRING);
- mpv_observe_property(mpv->mpv_ctx, 0, "metadata", MPV_FORMAT_NODE);
- mpv_observe_property(mpv->mpv_ctx, 0, "playlist", MPV_FORMAT_NODE);
- mpv_observe_property(mpv->mpv_ctx, 0, "playlist-count", MPV_FORMAT_INT64);
- mpv_observe_property(mpv->mpv_ctx, 0, "playlist-pos", MPV_FORMAT_INT64);
- mpv_observe_property(mpv->mpv_ctx, 0, "speed", MPV_FORMAT_DOUBLE);
- mpv_observe_property(mpv->mpv_ctx, 0, "track-list", MPV_FORMAT_NODE);
- mpv_observe_property(mpv->mpv_ctx, 0, "vo-configured", MPV_FORMAT_FLAG);
- mpv_observe_property(mpv->mpv_ctx, 0, "volume", MPV_FORMAT_DOUBLE);
- mpv_set_wakeup_callback(mpv->mpv_ctx, wakeup_callback, mpv);
- mpv_initialize(mpv->mpv_ctx);
-
- mpv_version = gmpv_mpv_get_property_string(mpv, "mpv-version");
- current_vo = gmpv_mpv_get_property_string(mpv, "current-vo");
- mpv->use_opengl = !current_vo;
-
- g_info("Using %s", mpv_version);
-
- if(!mpv->use_opengl && !GDK_IS_X11_DISPLAY(gdk_display_get_default()))
- {
- g_info( "The chosen vo is %s but the display is not X11; "
- "forcing --vo=opengl-cb and resetting",
- current_vo );
-
- mpv->force_opengl = TRUE;
- mpv->state.paused = FALSE;
-
- gmpv_mpv_reset(mpv);
- }
- else
- {
- GSettings *win_settings;
- gdouble volume;
-
- win_settings = g_settings_new(CONFIG_WIN_STATE);
- volume = g_settings_get_double(win_settings, "volume")*100;
-
- g_debug("Setting volume to %f", volume);
- mpv_set_property( mpv->mpv_ctx,
- "volume",
- MPV_FORMAT_DOUBLE,
- &volume );
-
- if(mpv->use_opengl)
- {
- mpv->opengl_ctx = mpv_get_sub_api
- ( mpv->mpv_ctx,
- MPV_SUB_API_OPENGL_CB );
- }
-
- gmpv_mpv_opt_handle_msg_level(mpv);
- gmpv_mpv_opt_handle_fs(mpv);
- gmpv_mpv_opt_handle_geometry(mpv);
-
- mpv->force_opengl = FALSE;
- mpv->state.ready = TRUE;
- g_signal_emit_by_name(mpv, "mpv-init");
-
- g_clear_object(&win_settings);
- }
-
- g_clear_object(&main_settings);
- g_free(config_dir);
- g_free(mpvopt);
- mpv_free(current_vo);
- mpv_free(mpv_version);
+ GMPV_MPV_GET_CLASS(mpv)->initialize(mpv);
}
void gmpv_mpv_init_gl(GmpvMpv *mpv)
{
- mpv_opengl_cb_context *opengl_ctx;
- gint rc;
-
- opengl_ctx = gmpv_mpv_get_opengl_cb_context(mpv);
- rc = mpv_opengl_cb_init_gl( opengl_ctx,
- "GL_MP_MPGetNativeDisplay",
- get_proc_address,
- NULL );
+ mpv_opengl_cb_context *opengl_ctx = gmpv_mpv_get_opengl_cb_context(mpv);
+ gint rc = mpv_opengl_cb_init_gl( opengl_ctx,
+ "GL_MP_MPGetNativeDisplay",
+ get_proc_address,
+ NULL );
if(rc >= 0)
{
@@ -1164,85 +575,27 @@ void gmpv_mpv_init_gl(GmpvMpv *mpv)
void gmpv_mpv_reset(GmpvMpv *mpv)
{
- const gchar *quit_cmd[] = {"quit_watch_later", NULL};
- gchar *loop_str;
- gboolean loop;
- gint64 playlist_pos;
- gint playlist_pos_rc;
-
- g_assert(mpv->mpv_ctx);
-
- loop_str = gmpv_mpv_get_property_string(mpv, "loop");
- loop = (g_strcmp0(loop_str, "inf") == 0);
-
- mpv_free(loop_str);
-
- playlist_pos_rc = mpv_get_property( mpv->mpv_ctx,
- "playlist-pos",
- MPV_FORMAT_INT64,
- &playlist_pos );
-
- /* Reset mpv->mpv_ctx */
- mpv->state.ready = FALSE;
-
- gmpv_mpv_command(mpv, quit_cmd);
- gmpv_mpv_quit(mpv);
-
- mpv->mpv_ctx = mpv_create();
- gmpv_mpv_initialize(mpv);
-
- gmpv_mpv_set_opengl_cb_callback
- ( mpv,
- mpv->opengl_cb_callback,
- mpv->opengl_cb_callback_data );
-
- gmpv_mpv_set_property_string(mpv, "loop", loop?"inf":"no");
-
- if(mpv->playlist)
- {
- if(mpv->state.loaded)
- {
- mpv_request_event(mpv->mpv_ctx, MPV_EVENT_FILE_LOADED, 0);
- load_from_playlist(mpv);
- mpv_request_event(mpv->mpv_ctx, MPV_EVENT_FILE_LOADED, 1);
- }
-
- if(playlist_pos_rc >= 0 && playlist_pos > 0)
- {
- gmpv_mpv_set_property( mpv,
- "playlist-pos",
- MPV_FORMAT_INT64,
- &playlist_pos );
- }
-
- gmpv_mpv_set_property( mpv,
- "pause",
- MPV_FORMAT_FLAG,
- &mpv->state.paused );
- }
+ GMPV_MPV_GET_CLASS(mpv)->reset(mpv);
}
void gmpv_mpv_quit(GmpvMpv *mpv)
{
- g_info("Terminating mpv");
+ GmpvMpvPrivate *priv = get_private(mpv);
- if(mpv->tmp_input_file)
- {
- g_unlink(mpv->tmp_input_file);
- }
+ g_info("Terminating mpv");
- if(mpv->opengl_ctx)
+ if(priv->opengl_ctx)
{
g_debug("Uninitializing opengl-cb");
- mpv_opengl_cb_uninit_gl(mpv->opengl_ctx);
+ mpv_opengl_cb_uninit_gl(priv->opengl_ctx);
- mpv->opengl_ctx = NULL;
+ priv->opengl_ctx = NULL;
}
- g_assert(mpv->mpv_ctx);
- mpv_terminate_destroy(mpv->mpv_ctx);
+ g_assert(priv->mpv_ctx);
+ mpv_terminate_destroy(priv->mpv_ctx);
- mpv->mpv_ctx = NULL;
+ priv->mpv_ctx = NULL;
}
void gmpv_mpv_load_track(GmpvMpv *mpv, const gchar *uri, TrackType type)
@@ -1273,37 +626,7 @@ void gmpv_mpv_load_track(GmpvMpv *mpv, const gchar *uri, TrackType type)
void gmpv_mpv_load_file(GmpvMpv *mpv, const gchar *uri, gboolean append)
{
- gchar *path = get_path_from_uri(uri);
- const gchar *load_cmd[] = {"loadfile", path, NULL, NULL};
- gint64 playlist_count = 0;
-
- g_assert(uri);
- g_info( "Loading file (append=%s): %s", append?"TRUE":"FALSE", uri);
-
- mpv_get_property( mpv->mpv_ctx,
- "playlist-count",
- MPV_FORMAT_INT64,
- &playlist_count );
-
- load_cmd[2] = (append && playlist_count > 0)?"append":"replace";
-
- if(!append)
- {
- mpv->state.new_file = TRUE;
- mpv->state.loaded = FALSE;
-
- if(!mpv->state.init_load)
- {
- gmpv_mpv_set_property_flag(mpv, "pause", FALSE);
- }
- }
-
- g_assert(mpv->mpv_ctx);
- mpv_request_event(mpv->mpv_ctx, MPV_EVENT_END_FILE, 0);
- mpv_command(mpv->mpv_ctx, load_cmd);
- mpv_request_event(mpv->mpv_ctx, MPV_EVENT_END_FILE, 1);
-
- g_free(path);
+ GMPV_MPV_GET_CLASS(mpv)->load_file(mpv, uri, append);
}
void gmpv_mpv_load(GmpvMpv *mpv, const gchar *uri, gboolean append)
@@ -1316,30 +639,6 @@ void gmpv_mpv_load(GmpvMpv *mpv, const gchar *uri, gboolean append)
}
else
{
- gboolean idle_active = FALSE;
-
- mpv_get_property( mpv->mpv_ctx,
- "idle-active",
- MPV_FORMAT_FLAG,
- &idle_active );
-
- if(idle_active)
- {
- if(!append)
- {
- g_ptr_array_set_size(mpv->playlist, 0);
- }
-
- add_file_to_playlist(mpv, uri);
- }
- else
- {
- gmpv_mpv_load_file(mpv, uri, append);
- }
+ gmpv_mpv_load_file(mpv, uri, append);
}
}
-
-void gmpv_mpv_free(gpointer data)
-{
- mpv_free(data);
-}
diff --git a/src/gmpv_mpv.h b/src/gmpv_mpv.h
index bd9e5c4..3110d5f 100644
--- a/src/gmpv_mpv.h
+++ b/src/gmpv_mpv.h
@@ -17,43 +17,43 @@
* along with GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MPV_OBJ_H
-#define MPV_OBJ_H
+#ifndef MPV_H
+#define MPV_H
#include <glib.h>
#include <glib-object.h>
#include <mpv/client.h>
#include <mpv/opengl_cb.h>
-#include "gmpv_geometry.h"
#include "gmpv_common.h"
G_BEGIN_DECLS
-#define GMPV_TYPE_MPV_OBJ (gmpv_mpv_get_type())
+#define GMPV_TYPE_MPV (gmpv_mpv_get_type())
-G_DECLARE_FINAL_TYPE(GmpvMpv, gmpv_mpv, GMPV, MPV_OBJ, GObject)
+G_DECLARE_DERIVABLE_TYPE(GmpvMpv, gmpv_mpv, GMPV, MPV, GObject)
-typedef struct _GmpvMpvState GmpvMpvState;
-
-struct _GmpvMpvState
+struct _GmpvMpvClass
{
- gboolean ready;
- gboolean paused;
- gboolean loaded;
- gboolean new_file;
- gboolean init_load;
+ GObjectClass parent_class;
+ void (*mpv_event_notify)( GmpvMpv *mpv,
+ gint event_id,
+ gpointer event_data );
+ void (*mpv_log_message)( GmpvMpv *mpv,
+ mpv_log_level log_level,
+ const gchar *prefix,
+ const gchar *text );
+ void (*mpv_property_changed)( GmpvMpv *mpv,
+ const gchar *name,
+ gpointer value );
+ void (*initialize)(GmpvMpv *mpv);
+ void (*load_file)(GmpvMpv *mpv, const gchar *uri, gboolean append);
+ void (*reset)(GmpvMpv *mpv);
};
GmpvMpv *gmpv_mpv_new(gint64 wid);
-const GmpvMpvState *gmpv_mpv_get_state(GmpvMpv *mpv);
-GmpvGeometry *gmpv_mpv_get_geometry(GmpvMpv *mpv);
-mpv_handle *gmpv_mpv_get_mpv_handle(GmpvMpv *mpv);
mpv_opengl_cb_context *gmpv_mpv_get_opengl_cb_context(GmpvMpv *mpv);
gboolean gmpv_mpv_get_use_opengl_cb(GmpvMpv *mpv);
-GPtrArray *gmpv_mpv_get_metadata(GmpvMpv *mpv);
-GPtrArray *gmpv_mpv_get_playlist(GmpvMpv *mpv);
-GPtrArray *gmpv_mpv_get_track_list(GmpvMpv *mpv);
void gmpv_mpv_initialize(GmpvMpv *mpv);
void gmpv_mpv_init_gl(GmpvMpv *mpv);
void gmpv_mpv_reset(GmpvMpv *mpv);
@@ -61,7 +61,6 @@ void gmpv_mpv_quit(GmpvMpv *mpv);
void gmpv_mpv_load_track(GmpvMpv *mpv, const gchar *uri, TrackType type);
void gmpv_mpv_load_file(GmpvMpv *mpv, const gchar *uri, gboolean append);
void gmpv_mpv_load(GmpvMpv *mpv, const gchar *uri, gboolean append);
-void gmpv_mpv_free(gpointer data);
G_END_DECLS
diff --git a/src/gmpv_mpv_opt.c b/src/gmpv_mpv_opt.c
deleted file mode 100644
index f6c2a05..0000000
--- a/src/gmpv_mpv_opt.c
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- * Copyright (c) 2016 gnome-mpv
- *
- * This file is part of GNOME MPV.
- *
- * GNOME MPV 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.
- *
- * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <gdk/gdk.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <string.h>
-#include <mpv/client.h>
-
-#include "gmpv_mpv_opt.h"
-#include "gmpv_mpv.h"
-#include "gmpv_mpv_private.h"
-#include "gmpv_mpv_wrapper.h"
-#include "gmpv_geometry.h"
-#include "gmpv_def.h"
-
-static gboolean parse_geom_token(const gchar **iter, GValue *value);
-static gboolean parse_dim_string(const gchar *geom_str, gint64 dim[2]);
-static gboolean parse_pos_token_prefix(const gchar **iter, gchar **prefix);
-static gboolean parse_pos_token( const gchar **iter,
- GValue *value,
- gboolean *flip );
-static gboolean parse_pos_string( const gchar *geom_str,
- gboolean flip[2],
- GValue pos[2] );
-static void parse_geom_string( GmpvMpv *mpv,
- const gchar *geom_str,
- GmpvGeometry **geom );
-
-static gboolean parse_geom_token(const gchar **iter, GValue *value)
-{
- gchar *end = NULL;
- gint64 token_value = g_ascii_strtoll(*iter, &end, 10);
- gboolean rc = FALSE;
-
- if(end)
- {
- if(*end == '%')
- {
- g_value_init(value, G_TYPE_DOUBLE);
- g_value_set_double(value, (gdouble)token_value/100.0);
-
- end++;
- }
- else
- {
- g_value_init(value, G_TYPE_INT64);
- g_value_set_int64(value, token_value);
- }
-
- rc = !!end && *iter != end;
- *iter = end;
- }
-
- return rc;
-}
-
-static gboolean parse_dim_string(const gchar *geom_str, gint64 dim[2])
-{
- GdkScreen *screen = gdk_screen_get_default();
- gint screen_dim[2] = {0, 0};
- gdouble multiplier[2] = {-1, -1};
- gchar **tokens = g_strsplit(geom_str, "x", 2);
- gint i = -1;
-
- dim[0] = -1;
- dim[1] = -1;
- screen_dim[0] = gdk_screen_get_width(screen);
- screen_dim[1] = gdk_screen_get_height(screen);
-
- while(tokens && tokens[++i] && i < 3)
- {
- gint value = (gint)g_ascii_strtoll(tokens[i], NULL, 0);
-
- if((i == 0 && value > 0) || i == 1)
- {
- if(tokens[i][strnlen(tokens[i], 256)-1] == '%')
- {
- multiplier[i] = value/100.0;
- }
- else if(i == 1 && multiplier[0] != -1)
- {
- multiplier[i] = multiplier[0];
- }
-
- if(multiplier[i] == -1)
- {
- dim[i] = value;
- }
- else
- {
- dim[i] = (gint)(multiplier[i]*screen_dim[i]);
- }
- }
- }
-
- g_strfreev(tokens);
-
- return (dim[0] > 0 && dim[1] > 0);
-}
-
-static gboolean parse_pos_token_prefix(const gchar **iter, gchar **prefix)
-{
- const gchar *start = *iter;
- const gchar *end = *iter;
- gboolean rc = FALSE;
-
- while(*end && (*end == '+' || *end == '-'))
- {
- end++;
- }
-
- rc = (end-start <= 2);
-
- if(rc)
- {
- if(end-start == 2)
- {
- end--;
- }
-
- *prefix = g_strndup(start, (gsize)(end-start));
- *iter = end;
- }
-
- return rc;
-}
-
-static gboolean parse_pos_token( const gchar **iter,
- GValue *value,
- gboolean *flip )
-{
- gchar *prefix = NULL;
- gboolean rc = TRUE;
-
- rc = rc && parse_pos_token_prefix(iter, &prefix);
- rc = rc && parse_geom_token(iter, value);
- *flip = (prefix && *prefix == '-');
-
- g_free(prefix);
-
- return rc;
-}
-
-static gboolean parse_pos_string( const gchar *geom_str,
- gboolean flip[2],
- GValue pos[2] )
-{
- gboolean rc = TRUE;
-
- rc = rc && parse_pos_token(&geom_str, &pos[0], &flip[0]);
- rc = rc && parse_pos_token(&geom_str, &pos[1], &flip[1]);
-
- return rc;
-}
-
-static void parse_geom_string( GmpvMpv *mpv,
- const gchar *geom_str,
- GmpvGeometry **geom )
-{
- gint64 dim[2] = {0, 0};
- GValue pos[2] = {G_VALUE_INIT, G_VALUE_INIT};
- gboolean flip[2] = {FALSE, FALSE};
- gboolean dim_valid = FALSE;
- gboolean pos_valid = FALSE;
-
- if(!!geom_str)
- {
- *geom = g_new0(GmpvGeometry, 1);
-
- if(geom_str[0] != '+' && geom_str[0] != '-')
- {
- dim_valid = parse_dim_string(geom_str, dim);
- }
-
- /* Move the beginning of the string to the 'position' section */
- while(*geom_str && *geom_str != '+' && *geom_str != '-')
- {
- geom_str++;
- }
-
- pos_valid = parse_pos_string(geom_str, flip, pos);
-
- (*geom)->flags |= !dim_valid*GMPV_GEOMETRY_IGNORE_DIM;
- (*geom)->flags |= !pos_valid*GMPV_GEOMETRY_IGNORE_POS;
- (*geom)->flags |= flip[0]*GMPV_GEOMETRY_FLIP_X;
- (*geom)->flags |= flip[1]*GMPV_GEOMETRY_FLIP_Y;
-
- (*geom)->x = pos[0];
- (*geom)->y = pos[1];
- (*geom)->width = dim[0];
- (*geom)->height = dim[1];
- }
- else
- {
- *geom = NULL;
-
- g_warning("Failed to parse geometry string: %s", geom_str);
- }
-}
-
-void gmpv_mpv_opt_handle_geometry(GmpvMpv *mpv)
-{
- gchar *opt_buf;
-
- opt_buf = mpv_get_property_string
- (mpv->mpv_ctx, "options/geometry");
-
- if(opt_buf)
- {
- parse_geom_string(mpv, opt_buf, &mpv->geometry);
-
- mpv_free(opt_buf);
- }
-}
-
-void gmpv_mpv_opt_handle_autofit(GmpvMpv *mpv)
-{
- gchar *scale_str = NULL;
- gchar *autofit_str = NULL;
- gchar *larger_str = NULL;
- gchar *smaller_str = NULL;
- gboolean scale_set = FALSE;
- gboolean autofit_set = FALSE;
- gboolean larger_set = FALSE;
- gboolean smaller_set = FALSE;
-
- scale_str = mpv_get_property_string
- (mpv->mpv_ctx, "options/window-scale");
- autofit_str = mpv_get_property_string
- (mpv->mpv_ctx, "options/autofit");
- larger_str = mpv_get_property_string
- (mpv->mpv_ctx, "options/autofit-larger");
- smaller_str = mpv_get_property_string
- (mpv->mpv_ctx, "options/autofit-smaller");
-
- scale_set = scale_str && scale_str[0] != '\0';
- autofit_set = autofit_str && autofit_str[0] != '\0';
- larger_set = larger_str && larger_str[0] != '\0';
- smaller_set = smaller_str && smaller_str[0] != '\0';
-
- if(scale_set || autofit_set || larger_set || smaller_set)
- {
- gint64 larger_dim[2] = {G_MAXINT, G_MAXINT};
- gint64 smaller_dim[2] = {0, 0};
- gint64 autofit_dim[2] = {0, 0};
- gint64 vid_dim[2];
- gdouble ratio[2];
- gdouble scale = 1;
- gint rc = 0;
-
- rc |= mpv_get_property( mpv->mpv_ctx,
- "dwidth",
- MPV_FORMAT_INT64,
- &vid_dim[0] );
- rc |= mpv_get_property( mpv->mpv_ctx,
- "dheight",
- MPV_FORMAT_INT64,
- &vid_dim[1] );
-
- if(rc >= 0)
- {
- g_debug( "Retrieved video size: "
- "%" G_GINT64_FORMAT "x"
- "%" G_GINT64_FORMAT,
- vid_dim[0], vid_dim[1] );
- }
-
- if(rc >= 0 && scale_set)
- {
- g_debug( "Retrieved option --window-scale=%s",
- scale_str);
-
- /* This should never fail since mpv_set_option() will
- * refuse to set invalid values.
- */
- scale = g_ascii_strtod(scale_str, NULL);
- }
-
- if(rc >= 0 && larger_set)
- {
- g_debug( "Retrieved option --autofit-larger=%s",
- larger_str);
-
- parse_dim_string(larger_str, larger_dim);
- }
-
- if(rc >= 0 && smaller_set)
- {
- g_debug( "Retrieved option --autofit-smaller=%s",
- smaller_str);
-
- parse_dim_string(smaller_str, smaller_dim);
- }
-
- if(rc >= 0)
- {
- if(autofit_set)
- {
- g_debug( "Retrieved option --autofit=%s",
- autofit_str );
-
- parse_dim_string(autofit_str, autofit_dim);
- }
- else
- {
- autofit_dim[0] = vid_dim[0];
- autofit_dim[1] = vid_dim[1];
- }
-
- if(scale_set)
- {
- autofit_dim[0]
- = (gint64)(scale*(gdouble)autofit_dim[0]);
- autofit_dim[1]
- = (gint64)(scale*(gdouble)autofit_dim[1]);
- }
- }
-
- if(rc >= 0)
- {
- autofit_dim[0] = MIN(autofit_dim[0], larger_dim[0]);
- autofit_dim[1] = MIN(autofit_dim[1], larger_dim[1]);
-
- autofit_dim[0] = MAX(autofit_dim[0], smaller_dim[0]);
- autofit_dim[1] = MAX(autofit_dim[1], smaller_dim[1]);
-
- if(!autofit_set
- && autofit_dim[0] == vid_dim[0]
- && autofit_dim[1] == vid_dim[1])
- {
- /* Do not resize if --autofit is not set and the
- * video size does not exceed the limits imposed
- * by --autofit-larger and --autofit-smaller.
- */
- ratio[0] = scale_set?scale:0;
- ratio[1] = scale_set?scale:0;
- }
- else
- {
- g_debug( "Target video area size: "
- "%" G_GINT64_FORMAT
- "x%" G_GINT64_FORMAT,
- autofit_dim[0], autofit_dim[1] );
-
- ratio[0] = (gdouble)autofit_dim[0]/
- (gdouble)vid_dim[0];
- ratio[1] = (gdouble)autofit_dim[1]/
- (gdouble)vid_dim[1];
- }
- }
-
- if(rc >= 0 && ratio[0] > 0 && ratio[1] > 0)
- {
- /* Resize the window so that it is as big as possible
- * while preseving the aspect ratio.
- */
- mpv->autofit_ratio = MIN(ratio[0], ratio[1]);
-
- g_debug( "Set video size multiplier to %f",
- mpv->autofit_ratio );
- }
- else
- {
- mpv->autofit_ratio = -1;
- }
- }
-
- mpv_free(scale_str);
- mpv_free(autofit_str);
- mpv_free(larger_str);
- mpv_free(smaller_str);
-}
-
-void gmpv_mpv_opt_handle_fs(GmpvMpv *mpv)
-{
- gchar *optbuf;
-
- optbuf = gmpv_mpv_get_property_string(mpv, "options/fs");
-
- if(g_strcmp0(optbuf, "yes") == 0)
- {
- gmpv_mpv_command_string
- (mpv, "script-message gmpv-action toggle-fullscreen");
- }
-
- mpv_free(optbuf);
-}
-
-void gmpv_mpv_opt_handle_msg_level(GmpvMpv *mpv)
-{
- const struct
- {
- gchar *name;
- mpv_log_level level;
- }
- level_map[] = { {"no", MPV_LOG_LEVEL_NONE},
- {"fatal", MPV_LOG_LEVEL_FATAL},
- {"error", MPV_LOG_LEVEL_ERROR},
- {"warn", MPV_LOG_LEVEL_WARN},
- {"info", MPV_LOG_LEVEL_INFO},
- {"v", MPV_LOG_LEVEL_V},
- {"debug", MPV_LOG_LEVEL_DEBUG},
- {"trace", MPV_LOG_LEVEL_TRACE},
- {NULL, MPV_LOG_LEVEL_NONE} };
-
- gchar *optbuf = NULL;
- gchar **tokens = NULL;
- mpv_log_level min_level = DEFAULT_LOG_LEVEL;
- gint i;
-
- optbuf = mpv_get_property_string(mpv->mpv_ctx, "options/msg-level");
-
- if(optbuf)
- {
- tokens = g_strsplit(optbuf, ",", 0);
- }
-
- if(mpv->log_level_list)
- {
- g_slist_free_full(mpv->log_level_list, g_free);
-
- mpv->log_level_list = NULL;
- }
-
- for(i = 0; tokens && tokens[i]; i++)
- {
- gchar **pair = g_strsplit(tokens[i], "=", 2);
- module_log_level *level = g_malloc(sizeof(module_log_level));
- gboolean found = FALSE;
- gint j;
-
- level->prefix = g_strdup(pair[0]);
-
- for(j = 0; level_map[j].name && !found; j++)
- {
- if(g_strcmp0(pair[1], level_map[j].name) == 0)
- {
- level->level = level_map[j].level;
- found = TRUE;
- }
- }
-
-
- /* Ignore if the given level is invalid */
- if(found)
- {
- /* Lower log levels have higher values */
- if(level->level > min_level)
- {
- min_level = level->level;
- }
-
- if(g_strcmp0(level->prefix, "all") != 0)
- {
- mpv->log_level_list
- = g_slist_append
- (mpv->log_level_list, level);
- }
- }
-
- g_strfreev(pair);
- }
-
- for(i = 0; level_map[i].level != min_level; i++);
- mpv_request_log_messages(mpv->mpv_ctx, level_map[i].name);
-
- mpv_free(optbuf);
- g_strfreev(tokens);
-}
-
diff --git a/src/gmpv_mpv_private.h b/src/gmpv_mpv_private.h
index eb485c6..d94ce01 100644
--- a/src/gmpv_mpv_private.h
+++ b/src/gmpv_mpv_private.h
@@ -22,31 +22,25 @@
#include <gtk/gtk.h>
-#include "gmpv_mpv_opt.h"
-
G_BEGIN_DECLS
+typedef struct _GmpvMpvPrivate GmpvMpvPrivate;
+
enum
{
PROP_0,
PROP_WID,
+ PROP_READY,
N_PROPERTIES
};
-struct _GmpvMpv
+struct _GmpvMpvPrivate
{
- GObject parent;
- GmpvMpvState state;
mpv_handle *mpv_ctx;
mpv_opengl_cb_context *opengl_ctx;
- GPtrArray *playlist;
- GPtrArray *metadata;
- GPtrArray *track_list;
- GtkGLArea *glarea;
+ gboolean ready;
gchar *tmp_input_file;
GSList *log_level_list;
- gdouble autofit_ratio;
- GmpvGeometry *geometry;
gboolean init_vo_config;
gboolean force_opengl;
gboolean use_opengl;
@@ -55,10 +49,8 @@ struct _GmpvMpv
void (*opengl_cb_callback)(void *data);
};
-struct _GmpvMpvClass
-{
- GObjectClass parent_class;
-};
+#define get_private(mpv) \
+ G_TYPE_INSTANCE_GET_PRIVATE(mpv, GMPV_TYPE_MPV, GmpvMpvPrivate)
void mpv_check_error(int status);
diff --git a/src/gmpv_mpv_wrapper.c b/src/gmpv_mpv_wrapper.c
index 5a9b814..aa0500d 100644
--- a/src/gmpv_mpv_wrapper.c
+++ b/src/gmpv_mpv_wrapper.c
@@ -22,11 +22,12 @@
gint gmpv_mpv_command(GmpvMpv *mpv, const gchar **cmd)
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
- rc = mpv_command(mpv->mpv_ctx, cmd);
+ rc = mpv_command(priv->mpv_ctx, cmd);
}
if(rc < 0)
@@ -45,11 +46,12 @@ gint gmpv_mpv_command(GmpvMpv *mpv, const gchar **cmd)
gint gmpv_mpv_command_string(GmpvMpv *mpv, const gchar *cmd)
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
- rc = mpv_command_string(mpv->mpv_ctx, cmd);
+ rc = mpv_command_string(priv->mpv_ctx, cmd);
}
if(rc < 0)
@@ -63,16 +65,24 @@ gint gmpv_mpv_command_string(GmpvMpv *mpv, const gchar *cmd)
return rc;
}
+gint gmpv_mpv_set_option_string( GmpvMpv *mpv,
+ const gchar *name,
+ const gchar *value )
+{
+ return mpv_set_option_string(get_private(mpv)->mpv_ctx, name, value);
+}
+
gint gmpv_mpv_get_property( GmpvMpv *mpv,
const gchar *name,
mpv_format format,
void *data )
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
- rc = mpv_get_property(mpv->mpv_ctx, name, format, data);
+ rc = mpv_get_property(priv->mpv_ctx, name, format, data);
}
if(rc < 0)
@@ -89,11 +99,12 @@ gint gmpv_mpv_get_property( GmpvMpv *mpv,
gchar *gmpv_mpv_get_property_string(GmpvMpv *mpv, const gchar *name)
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gchar *value = NULL;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
- value = mpv_get_property_string(mpv->mpv_ctx, name);
+ value = mpv_get_property_string(priv->mpv_ctx, name);
}
if(!value)
@@ -106,13 +117,14 @@ gchar *gmpv_mpv_get_property_string(GmpvMpv *mpv, const gchar *name)
gboolean gmpv_mpv_get_property_flag(GmpvMpv *mpv, const gchar *name)
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gboolean value = FALSE;
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
rc = mpv_get_property
- (mpv->mpv_ctx, name, MPV_FORMAT_FLAG, &value);
+ (priv->mpv_ctx, name, MPV_FORMAT_FLAG, &value);
}
if(rc < 0)
@@ -131,11 +143,12 @@ gint gmpv_mpv_set_property( GmpvMpv *mpv,
mpv_format format,
void *data )
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
- rc = mpv_set_property(mpv->mpv_ctx, name, format, data);
+ rc = mpv_set_property(priv->mpv_ctx, name, format, data);
}
if(rc < 0)
@@ -154,11 +167,12 @@ gint gmpv_mpv_set_property_string( GmpvMpv *mpv,
const gchar *name,
const char *data )
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
- rc = mpv_set_property_string(mpv->mpv_ctx, name, data);
+ rc = mpv_set_property_string(priv->mpv_ctx, name, data);
}
if(rc < 0)
@@ -175,12 +189,13 @@ gint gmpv_mpv_set_property_flag( GmpvMpv *mpv,
const gchar *name,
gboolean value )
{
+ GmpvMpvPrivate *priv = get_private(mpv);
gint rc = MPV_ERROR_UNINITIALIZED;
- if(mpv->mpv_ctx)
+ if(priv->mpv_ctx)
{
rc = mpv_set_property
- (mpv->mpv_ctx, name, MPV_FORMAT_FLAG, &value);
+ (priv->mpv_ctx, name, MPV_FORMAT_FLAG, &value);
}
if(rc < 0)
@@ -197,12 +212,34 @@ void gmpv_mpv_set_opengl_cb_callback( GmpvMpv *mpv,
mpv_opengl_cb_update_fn func,
void *data )
{
- mpv->opengl_cb_callback = func;
- mpv->opengl_cb_callback_data = data;
+ GmpvMpvPrivate *priv = get_private(mpv);
- if(mpv->opengl_ctx)
+ priv->opengl_cb_callback = func;
+ priv->opengl_cb_callback_data = data;
+
+ if(priv->opengl_ctx)
{
- mpv_opengl_cb_set_update_callback(mpv->opengl_ctx, func, data);
+ mpv_opengl_cb_set_update_callback(priv->opengl_ctx, func, data);
}
}
+gint gmpv_mpv_load_config_file(GmpvMpv *mpv, const gchar *filename)
+{
+ return mpv_load_config_file(get_private(mpv)->mpv_ctx, filename);
+}
+
+gint gmpv_mpv_observe_property( GmpvMpv *mpv,
+ guint64 reply_userdata,
+ const gchar *name,
+ mpv_format format )
+{
+ return mpv_observe_property( get_private(mpv)->mpv_ctx,
+ reply_userdata,
+ name,
+ format );
+}
+
+gint gmpv_mpv_request_log_messages(GmpvMpv *mpv, const gchar *min_level)
+{
+ return mpv_request_log_messages(get_private(mpv)->mpv_ctx, min_level);
+}
diff --git a/src/gmpv_mpv_wrapper.h b/src/gmpv_mpv_wrapper.h
index 7670cec..11f70fc 100644
--- a/src/gmpv_mpv_wrapper.h
+++ b/src/gmpv_mpv_wrapper.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 gnome-mpv
+ * Copyright (c) 2016-2017 gnome-mpv
*
* This file is part of GNOME MPV.
*
@@ -28,6 +28,9 @@
gint gmpv_mpv_command(GmpvMpv *mpv, const gchar **cmd);
gint gmpv_mpv_command_string(GmpvMpv *mpv, const gchar *cmd);
+gint gmpv_mpv_set_option_string( GmpvMpv *mpv,
+ const gchar *name,
+ const gchar *value );
gint gmpv_mpv_get_property( GmpvMpv *mpv,
const gchar *name,
mpv_format format,
@@ -50,5 +53,11 @@ void gmpv_mpv_set_event_callback( GmpvMpv *mpv,
void gmpv_mpv_set_opengl_cb_callback( GmpvMpv *mpv,
mpv_opengl_cb_update_fn func,
void *data );
+gint gmpv_mpv_load_config_file(GmpvMpv *mpv, const gchar *filename);
+gint gmpv_mpv_observe_property( GmpvMpv *mpv,
+ guint64 reply_userdata,
+ const gchar *name,
+ mpv_format format );
+gint gmpv_mpv_request_log_messages(GmpvMpv *mpv, const gchar *min_level);
#endif
diff --git a/src/gmpv_open_location_dialog.c b/src/gmpv_open_location_dialog.c
index fe0feab..6c32afc 100644
--- a/src/gmpv_open_location_dialog.c
+++ b/src/gmpv_open_location_dialog.c
@@ -87,9 +87,10 @@ static void clipboard_text_received_handler( GtkClipboard *clipboard,
{
GmpvOpenLocationDialog *dlg = data;
- if(text && *text)
+ if(text && *text && (g_path_is_absolute(text) || strstr(text, "://") != NULL))
{
gtk_entry_set_text(GTK_ENTRY(dlg->loc_entry), text);
+ gtk_editable_select_region(GTK_EDITABLE(dlg->loc_entry), 0, -1);
}
g_object_unref(dlg);
diff --git a/src/gmpv_player.c b/src/gmpv_player.c
new file mode 100644
index 0000000..680d581
--- /dev/null
+++ b/src/gmpv_player.c
@@ -0,0 +1,1094 @@
+/*
+ * Copyright (c) 2017 gnome-mpv
+ *
+ * This file is part of GNOME MPV.
+ *
+ * GNOME MPV 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.
+ *
+ * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <string.h>
+#include <glib/gstdio.h>
+#include <glib/gi18n.h>
+
+#include "gmpv_player.h"
+#include "gmpv_player_options.h"
+#include "gmpv_marshal.h"
+#include "gmpv_metadata_cache.h"
+#include "gmpv_mpv_wrapper.h"
+#include "gmpv_def.h"
+
+typedef struct _GmpvLogLevel GmpvLogLevel;
+
+enum
+{
+ PROP_0,
+ PROP_PLAYLIST,
+ PROP_METADATA,
+ PROP_TRACK_LIST,
+ N_PROPERTIES
+};
+
+struct _GmpvLogLevel
+{
+ const gchar *prefix;
+ mpv_log_level level;
+};
+
+struct _GmpvPlayer
+{
+ GmpvMpv parent;
+ GmpvMetadataCache *cache;
+ GPtrArray *playlist;
+ GPtrArray *metadata;
+ GPtrArray *track_list;
+ GHashTable *log_levels;
+ gboolean loaded;
+ gboolean new_file;
+ gboolean init_vo_config;
+ gchar *tmp_input_config;
+};
+
+struct _GmpvPlayerClass
+{
+ GmpvMpvClass parent_class;
+};
+
+static void set_property( GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec );
+static void get_property( GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec );
+static void finalize(GObject *object);
+static void mpv_event_notify(GmpvMpv *mpv, gint event_id, gpointer event_data);
+static void mpv_log_message( GmpvMpv *mpv,
+ mpv_log_level log_level,
+ const gchar *prefix,
+ const gchar *text );
+static void mpv_property_changed( GmpvMpv *mpv,
+ const gchar *name,
+ gpointer value );
+static void observe_properties(GmpvMpv *mpv);
+static void apply_default_options(GmpvMpv *mpv);
+static void initialize(GmpvMpv *mpv);
+static gint apply_options_array_string(GmpvMpv *mpv, gchar *args);
+static void apply_extra_options(GmpvMpv *mpv);
+static void load_file(GmpvMpv *mpv, const gchar *uri, gboolean append);
+static void reset(GmpvMpv *mpv);
+static void load_input_conf(GmpvPlayer *player, const gchar *input_conf);
+static void load_config_file(GmpvMpv *mpv);
+static void load_input_config_file(GmpvPlayer *player);
+static void load_scripts(GmpvPlayer *player);
+static GmpvTrack *parse_track_entry(mpv_node_list *node);
+static void add_file_to_playlist(GmpvPlayer *player, const gchar *uri);
+static void load_from_playlist(GmpvPlayer *player);
+static GmpvPlaylistEntry *parse_playlist_entry(mpv_node_list *node);
+static void update_playlist(GmpvPlayer *player);
+static void update_metadata(GmpvPlayer *player);
+static void update_track_list(GmpvPlayer *player);
+static void cache_update_handler( GmpvMetadataCache *cache,
+ const gchar *uri,
+ gpointer data );
+
+G_DEFINE_TYPE(GmpvPlayer, gmpv_player, GMPV_TYPE_MPV)
+
+static void set_property( GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec )
+{
+ switch(property_id)
+ {
+ case PROP_PLAYLIST:
+ case PROP_METADATA:
+ case PROP_TRACK_LIST:
+ g_critical("Attempted to set read-only property");
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+}
+
+static void get_property( GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec )
+{
+ GmpvPlayer *self = GMPV_PLAYER(object);
+
+ switch(property_id)
+ {
+ case PROP_PLAYLIST:
+ g_value_set_pointer(value, self->playlist);
+ break;
+
+ case PROP_METADATA:
+ g_value_set_pointer(value, self->metadata);
+ break;
+
+ case PROP_TRACK_LIST:
+ g_value_set_pointer(value, self->track_list);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+}
+
+static void finalize(GObject *object)
+{
+ GmpvPlayer *player = GMPV_PLAYER(object);
+
+ if(player->tmp_input_config)
+ {
+ g_unlink(player->tmp_input_config);
+ }
+
+ g_free(player->tmp_input_config);
+ g_ptr_array_free(player->playlist, TRUE);
+ g_ptr_array_free(player->metadata, TRUE);
+ g_ptr_array_free(player->track_list, TRUE);
+
+ G_OBJECT_CLASS(gmpv_player_parent_class)->finalize(object);
+}
+
+static void mpv_event_notify(GmpvMpv *mpv, gint event_id, gpointer event_data)
+{
+ GmpvPlayer *player = GMPV_PLAYER(mpv);
+
+ if(event_id == MPV_EVENT_START_FILE)
+ {
+ gboolean vo_configured = FALSE;
+
+ gmpv_mpv_get_property( mpv,
+ "vo-configured",
+ MPV_FORMAT_FLAG,
+ &vo_configured );
+
+ /* If the vo is not configured yet, save the content of mpv's
+ * playlist. This will be loaded again when the vo is
+ * configured.
+ */
+ if(!vo_configured)
+ {
+ update_playlist(GMPV_PLAYER(mpv));
+ }
+ }
+ else if(event_id == MPV_EVENT_END_FILE)
+ {
+ if(player->loaded)
+ {
+ player->new_file = FALSE;
+ }
+ }
+ else if(event_id == MPV_EVENT_IDLE)
+ {
+ player->loaded = FALSE;
+ }
+ else if(event_id == MPV_EVENT_FILE_LOADED)
+ {
+ player->loaded = TRUE;
+ }
+ else if(event_id == MPV_EVENT_VIDEO_RECONFIG)
+ {
+ if(player->new_file)
+ {
+ g_signal_emit_by_name(player, "autofit");
+ }
+ }
+
+ GMPV_MPV_CLASS(gmpv_player_parent_class)
+ ->mpv_event_notify(mpv, event_id, event_data);
+}
+
+static void mpv_log_message( GmpvMpv *mpv,
+ mpv_log_level log_level,
+ const gchar *prefix,
+ const gchar *text )
+{
+ GmpvPlayer *player = GMPV_PLAYER(mpv);
+ gsize prefix_len = strlen(prefix);
+ gboolean found = FALSE;
+ const gchar *iter_prefix;
+ mpv_log_level iter_level;
+ GHashTableIter iter;
+
+ g_hash_table_iter_init(&iter, player->log_levels);
+
+ while( !found &&
+ g_hash_table_iter_next( &iter,
+ (gpointer *)&iter_prefix,
+ (gpointer *)&iter_level) )
+ {
+ gsize iter_prefix_len = strlen(iter_prefix);
+ gint cmp = strncmp( iter_prefix,
+ prefix,
+ (prefix_len < iter_prefix_len)?
+ prefix_len:iter_prefix_len );
+
+ /* Allow both exact match and prefix match */
+ if(cmp == 0
+ && (iter_prefix_len == prefix_len
+ || (iter_prefix_len < prefix_len
+ && prefix[iter_prefix_len] == '/')))
+ {
+ found = TRUE;
+ }
+ }
+
+ if(!found || (log_level <= iter_level))
+ {
+ gchar *buf = g_strdup(text);
+ gsize len = strlen(buf);
+
+ if(len > 1)
+ {
+ /* g_message() automatically adds a newline
+ * character when using the default log handler,
+ * but log messages from mpv already come
+ * terminated with a newline character so we
+ * need to take it out.
+ */
+ if(buf[len-1] == '\n')
+ {
+ buf[len-1] = '\0';
+ }
+
+ g_message("[%s] %s", prefix, buf);
+ }
+
+ g_free(buf);
+ }
+
+ GMPV_MPV_CLASS(gmpv_player_parent_class)
+ ->mpv_log_message(mpv, log_level, prefix, text);
+}
+
+static void mpv_property_changed( GmpvMpv *mpv,
+ const gchar *name,
+ gpointer value )
+{
+ GmpvPlayer *player = GMPV_PLAYER(mpv);
+
+ if(g_strcmp0(name, "pause") == 0)
+ {
+ gboolean idle_active = FALSE;
+ gboolean pause = value?*((int *)value):TRUE;
+
+ gmpv_mpv_get_property( mpv,
+ "idle-active",
+ MPV_FORMAT_FLAG,
+ &idle_active );
+
+ if(idle_active && !pause && !player->init_vo_config)
+ {
+ load_from_playlist(player);
+ }
+ }
+ else if(g_strcmp0(name, "playlist") == 0)
+ {
+ gint64 playlist_count = 0;
+ gboolean idle_active = FALSE;
+ gboolean was_empty = FALSE;
+
+ gmpv_mpv_get_property( mpv,
+ "playlist-count",
+ MPV_FORMAT_INT64,
+ &playlist_count );
+ gmpv_mpv_get_property( mpv,
+ "idle-active",
+ MPV_FORMAT_FLAG,
+ &idle_active );
+
+ was_empty = (player->playlist->len == 0);
+
+ if(!idle_active)
+ {
+ update_playlist(player);
+ }
+
+ /* Check if we're transitioning from empty playlist to non-empty
+ * playlist.
+ */
+ if(was_empty && player->playlist->len > 0)
+ {
+ gmpv_mpv_set_property_flag(mpv, "pause", FALSE);
+ }
+ }
+ else if(g_strcmp0(name, "metadata") == 0)
+ {
+ update_metadata(player);
+ }
+ else if(g_strcmp0(name, "track-list") == 0)
+ {
+ update_track_list(player);
+ }
+ else if(g_strcmp0(name, "vo-configured") == 0)
+ {
+ if(player->init_vo_config)
+ {
+ player->init_vo_config = FALSE;
+ load_scripts(player);
+ load_from_playlist(player);
+ }
+ }
+
+ GMPV_MPV_CLASS(gmpv_player_parent_class)
+ ->mpv_property_changed(mpv, name, value);
+}
+
+static void observe_properties(GmpvMpv *mpv)
+{
+ gmpv_mpv_observe_property(mpv, 0, "aid", MPV_FORMAT_STRING);
+ gmpv_mpv_observe_property(mpv, 0, "vid", MPV_FORMAT_STRING);
+ gmpv_mpv_observe_property(mpv, 0, "sid", MPV_FORMAT_STRING);
+ gmpv_mpv_observe_property(mpv, 0, "chapters", MPV_FORMAT_INT64);
+ gmpv_mpv_observe_property(mpv, 0, "core-idle", MPV_FORMAT_FLAG);
+ gmpv_mpv_observe_property(mpv, 0, "idle-active", MPV_FORMAT_FLAG);
+ gmpv_mpv_observe_property(mpv, 0, "fullscreen", MPV_FORMAT_FLAG);
+ gmpv_mpv_observe_property(mpv, 0, "pause", MPV_FORMAT_FLAG);
+ gmpv_mpv_observe_property(mpv, 0, "loop", MPV_FORMAT_STRING);
+ gmpv_mpv_observe_property(mpv, 0, "duration", MPV_FORMAT_DOUBLE);
+ gmpv_mpv_observe_property(mpv, 0, "media-title", MPV_FORMAT_STRING);
+ gmpv_mpv_observe_property(mpv, 0, "metadata", MPV_FORMAT_NODE);
+ gmpv_mpv_observe_property(mpv, 0, "playlist", MPV_FORMAT_NODE);
+ gmpv_mpv_observe_property(mpv, 0, "playlist-count", MPV_FORMAT_INT64);
+ gmpv_mpv_observe_property(mpv, 0, "playlist-pos", MPV_FORMAT_INT64);
+ gmpv_mpv_observe_property(mpv, 0, "speed", MPV_FORMAT_DOUBLE);
+ gmpv_mpv_observe_property(mpv, 0, "track-list", MPV_FORMAT_NODE);
+ gmpv_mpv_observe_property(mpv, 0, "vo-configured", MPV_FORMAT_FLAG);
+ gmpv_mpv_observe_property(mpv, 0, "volume", MPV_FORMAT_DOUBLE);
+}
+
+static void apply_default_options(GmpvMpv *mpv)
+{
+ gchar *config_dir = get_config_dir_path();
+ gchar *watch_dir = get_watch_dir_path();
+
+ const struct
+ {
+ const gchar *name;
+ const gchar *value;
+ }
+ options[] = { {"vo", "opengl,vdpau,vaapi,xv,x11,opengl-cb,"},
+ {"osd-level", "1"},
+ {"softvol", "yes"},
+ {"force-window", "immediate"},
+ {"input-default-bindings", "yes"},
+ {"audio-client-name", ICON_NAME},
+ {"title", "${media-title}"},
+ {"autofit-larger", "75%"},
+ {"window-scale", "1"},
+ {"pause", "yes"},
+ {"ytdl", "yes"},
+ {"load-scripts", "no"},
+ {"osd-bar", "no"},
+ {"input-cursor", "no"},
+ {"cursor-autohide", "no"},
+ {"softvol-max", "100"},
+ {"config", "no"},
+ {"config-dir", config_dir},
+ {"watch-later-directory", watch_dir},
+ {"screenshot-template", "gnome-mpv-shot%n"},
+ {NULL, NULL} };
+
+ for(gint i = 0; options[i].name; i++)
+ {
+ g_debug( "Applying default option --%s=%s",
+ options[i].name,
+ options[i].value );
+
+ gmpv_mpv_set_option_string( mpv,
+ options[i].name,
+ options[i].value );
+ }
+
+ g_free(config_dir);
+ g_free(watch_dir);
+}
+
+static void initialize(GmpvMpv *mpv)
+{
+
+ GSettings *win_settings = g_settings_new(CONFIG_WIN_STATE);
+ gdouble volume = g_settings_get_double(win_settings, "volume")*100;
+
+ apply_default_options(mpv);
+ load_config_file(mpv);
+ load_input_config_file(GMPV_PLAYER(mpv));
+ apply_extra_options(mpv);
+ observe_properties(mpv);
+ gmpv_player_options_init(GMPV_PLAYER(mpv));
+
+ GMPV_MPV_CLASS(gmpv_player_parent_class)->initialize(mpv);
+
+ g_debug("Setting volume to %f", volume);
+ gmpv_mpv_set_property(mpv, "volume", MPV_FORMAT_DOUBLE, &volume);
+
+ gmpv_player_options_init(GMPV_PLAYER(mpv));
+
+ g_object_unref(win_settings);
+}
+
+static gint apply_options_array_string(GmpvMpv *mpv, gchar *args)
+{
+ gint fail_count = 0;
+ gchar **tokens = g_regex_split_simple( "(^|\\s+)--",
+ args,
+ G_REGEX_NO_AUTO_CAPTURE,
+ 0 );
+
+ /* Skip the first token if it's non-NULL, since it is just going to be
+ * empty string for any valid args.
+ */
+ for(gint i = tokens[0]?1:0; tokens[i]; i++)
+ {
+ gchar **parts = g_strsplit(g_strchomp(tokens[i]), "=", 2);
+ const gchar *option = parts[0];
+ const gchar *value = (option?parts[1]:NULL)?:"";
+
+ g_debug("Applying option: --%s", tokens[i]);
+
+ if(gmpv_mpv_set_option_string(mpv, option, value) < 0)
+ {
+ fail_count++;
+
+ g_warning("Failed to apply option: --%s\n", tokens[i]);
+ }
+
+ g_strfreev(parts);
+ }
+
+ g_strfreev(tokens);
+
+ return fail_count*(-1);
+}
+
+static void apply_extra_options(GmpvMpv *mpv)
+{
+ GSettings *settings = g_settings_new(CONFIG_ROOT);
+ gchar *extra_options = g_settings_get_string(settings, "mpv-options");
+
+ g_debug("Applying extra mpv options: %s", extra_options);
+
+ /* Apply extra options */
+ if(apply_options_array_string(mpv, extra_options) < 0)
+ {
+ const gchar *msg = _("Failed to apply one or more MPV options.");
+ g_signal_emit_by_name(mpv, "error", msg);
+ }
+
+ g_free(extra_options);
+ g_object_unref(settings);
+}
+
+static void load_file(GmpvMpv *mpv, const gchar *uri, gboolean append)
+{
+ GmpvPlayer *player = GMPV_PLAYER(mpv);
+ gboolean ready = FALSE;
+ gboolean idle_active = FALSE;
+
+ g_object_get(mpv, "ready", &ready, NULL);
+ gmpv_mpv_get_property( mpv,
+ "idle-active",
+ MPV_FORMAT_FLAG,
+ &idle_active );
+
+ if(idle_active || !ready)
+ {
+ if(!append)
+ {
+ g_ptr_array_set_size(player->playlist, 0);
+ }
+
+ add_file_to_playlist(player, uri);
+ }
+ else
+ {
+ if(!append)
+ {
+ player->new_file = TRUE;
+ player->loaded = FALSE;
+ }
+
+ GMPV_MPV_CLASS(gmpv_player_parent_class)
+ ->load_file(mpv, uri, append);
+ }
+
+ /* Playlist items added when mpv is idle doesn't get added directly to
+ * its internal playlist, so the property change signal won't be fired.
+ * We need to emit notify signal here manually to ensure that the
+ * playlist widget gets updated.
+ */
+ if(idle_active)
+ {
+ g_object_notify(G_OBJECT(player), "playlist");
+ }
+}
+
+static void reset(GmpvMpv *mpv)
+{
+ gboolean idle_active = FALSE;
+ gint64 playlist_pos = 0;
+
+ gmpv_mpv_get_property( mpv,
+ "idle-active",
+ MPV_FORMAT_FLAG,
+ &idle_active );
+ gmpv_mpv_get_property( mpv,
+ "playlist-pos",
+ MPV_FORMAT_INT64,
+ &playlist_pos );
+
+ GMPV_MPV_CLASS(gmpv_player_parent_class)->reset(mpv);
+
+ if(!idle_active)
+ {
+ load_from_playlist(GMPV_PLAYER(mpv));
+ }
+
+ if(playlist_pos > 0)
+ {
+ gmpv_mpv_set_property( mpv,
+ "playlist-pos",
+ MPV_FORMAT_INT64,
+ &playlist_pos );
+ }
+}
+
+static void load_input_conf(GmpvPlayer *player, const gchar *input_conf)
+{
+ const gchar *default_keybinds[] = DEFAULT_KEYBINDS;
+ gchar *tmp_path;
+ FILE *tmp_file;
+ gint tmp_fd;
+
+ if(player->tmp_input_config)
+ {
+ g_unlink(player->tmp_input_config);
+ g_free(player->tmp_input_config);
+ }
+
+ tmp_fd = g_file_open_tmp(NULL, &tmp_path, NULL);
+ tmp_file = fdopen(tmp_fd, "w");
+ player->tmp_input_config = tmp_path;
+
+ if(!tmp_file)
+ {
+ g_error("Failed to open temporary input config file");
+ }
+
+ for(gint i = 0; default_keybinds[i]; i++)
+ {
+ const gsize len = strlen(default_keybinds[i]);
+ gsize write_size = fwrite(default_keybinds[i], len, 1, tmp_file);
+ gint rc = fputc('\n', tmp_file);
+
+ if(write_size != 1 || rc != '\n')
+ {
+ g_error( "Error writing default keybindings to "
+ "temporary input config file" );
+ }
+ }
+
+ g_debug("Using temporary input config file: %s", tmp_path);
+ gmpv_mpv_set_option_string(GMPV_MPV(player), "input-conf", tmp_path);
+
+ if(input_conf && strlen(input_conf) > 0)
+ {
+ const gsize buf_size = 65536;
+ void *buf = g_malloc(buf_size);
+ FILE *src_file = g_fopen(input_conf, "r");
+ gsize read_size = buf_size;
+
+ if(!src_file)
+ {
+ g_warning( "Cannot open input config file: %s",
+ input_conf );
+ }
+
+ while(src_file && read_size == buf_size)
+ {
+ read_size = fread(buf, 1, buf_size, src_file);
+
+ if(read_size != fwrite(buf, 1, read_size, tmp_file))
+ {
+ g_error( "Error writing requested input "
+ "config file to temporary "
+ "input config file" );
+ }
+ }
+
+ g_info("Loaded input config file: %s", input_conf);
+
+ g_free(buf);
+ }
+
+ fclose(tmp_file);
+}
+
+static void load_config_file(GmpvMpv *mpv)
+{
+ GSettings *settings = g_settings_new(CONFIG_ROOT);
+
+ if(g_settings_get_boolean(settings, "mpv-config-enable"))
+ {
+ gchar *mpv_conf = g_settings_get_string
+ (settings, "mpv-config-file");
+
+ g_info("Loading config file: %s", mpv_conf);
+ gmpv_mpv_load_config_file(mpv, mpv_conf);
+
+ g_free(mpv_conf);
+ }
+
+ g_object_unref(settings);
+}
+
+static void load_input_config_file(GmpvPlayer *player)
+{
+ GSettings *settings = g_settings_new(CONFIG_ROOT);
+ gchar *input_conf = NULL;
+
+ if(g_settings_get_boolean(settings, "mpv-input-config-enable"))
+ {
+ input_conf = g_settings_get_string
+ (settings, "mpv-input-config-file");
+
+ g_info("Loading input config file: %s", input_conf);
+ }
+
+ load_input_conf(player, input_conf);
+
+ g_free(input_conf);
+ g_object_unref(settings);
+}
+
+static void load_scripts(GmpvPlayer *player)
+{
+ gchar *path = get_scripts_dir_path();
+ GDir *dir = g_dir_open(path, 0, NULL);
+
+ if(dir)
+ {
+ const gchar *name;
+
+ do
+ {
+ gchar *full_path;
+
+ name = g_dir_read_name(dir);
+ full_path = g_build_filename(path, name, NULL);
+
+ if(g_file_test(full_path, G_FILE_TEST_IS_REGULAR))
+ {
+ const gchar *cmd[]
+ = {"load-script", full_path, NULL};
+
+ g_info("Loading script: %s", full_path);
+ gmpv_mpv_command(GMPV_MPV(player), cmd);
+ }
+
+ g_free(full_path);
+ }
+ while(name);
+
+ g_dir_close(dir);
+ }
+ else
+ {
+ g_warning("Failed to open scripts directory: %s", path);
+ }
+
+ g_free(path);
+}
+
+static GmpvTrack *parse_track_entry(mpv_node_list *node)
+{
+ GmpvTrack *entry = gmpv_track_new();
+
+ for(gint i = 0; i < node->num; i++)
+ {
+ if(g_strcmp0(node->keys[i], "type") == 0)
+ {
+ const gchar *type = node->values[i].u.string;
+
+ if(g_strcmp0(type, "audio") == 0)
+ {
+ entry->type = TRACK_TYPE_AUDIO;
+ }
+ else if(g_strcmp0(type, "video") == 0)
+ {
+ entry->type = TRACK_TYPE_VIDEO;
+ }
+ else if(g_strcmp0(type, "sub") == 0)
+ {
+ entry->type = TRACK_TYPE_SUBTITLE;
+ }
+ }
+ else if(g_strcmp0(node->keys[i], "title") == 0)
+ {
+ entry->title = g_strdup(node->values[i].u.string);
+ }
+ else if(g_strcmp0(node->keys[i], "lang") == 0)
+ {
+ entry->lang = g_strdup(node->values[i].u.string);
+ }
+ else if(g_strcmp0(node->keys[i], "id") == 0)
+ {
+ entry->id = node->values[i].u.int64;
+ }
+ }
+
+ return entry;
+}
+
+static void add_file_to_playlist(GmpvPlayer *player, const gchar *uri)
+{
+ GmpvPlaylistEntry *entry = gmpv_playlist_entry_new(uri, NULL);
+
+ g_ptr_array_add(player->playlist, entry);
+}
+
+static void load_from_playlist(GmpvPlayer *player)
+{
+ GmpvMpv *mpv = GMPV_MPV(player);
+ GPtrArray *playlist = player->playlist;
+
+ for(guint i = 0; playlist && i < playlist->len; i++)
+ {
+ GmpvPlaylistEntry *entry = g_ptr_array_index(playlist, i);
+
+ /* Do not append on first iteration */
+ GMPV_MPV_CLASS(gmpv_player_parent_class)
+ ->load_file(mpv, entry->filename, i != 0);
+ }
+}
+
+static GmpvPlaylistEntry *parse_playlist_entry(mpv_node_list *node)
+{
+ const gchar *filename = NULL;
+ const gchar *title = NULL;
+
+ for(gint i = 0; i < node->num; i++)
+ {
+ if(g_strcmp0(node->keys[i], "filename") == 0)
+ {
+ filename = node->values[i].u.string;
+ }
+ else if(g_strcmp0(node->keys[i], "title") == 0)
+ {
+ title = node->values[i].u.string;
+ }
+ }
+
+ return gmpv_playlist_entry_new(filename, title);
+}
+
+static void update_playlist(GmpvPlayer *player)
+{
+ GSettings *settings;
+ gboolean prefetch_metadata;
+ const mpv_node_list *org_list;
+ mpv_node playlist;
+
+ settings = g_settings_new(CONFIG_ROOT);
+ prefetch_metadata = g_settings_get_boolean(settings, "prefetch-metadata");
+
+ g_ptr_array_set_size(player->playlist, 0);
+
+ gmpv_mpv_get_property
+ (GMPV_MPV(player), "playlist", MPV_FORMAT_NODE, &playlist);
+
+ org_list = playlist.u.list;
+
+ if(playlist.format == MPV_FORMAT_NODE_ARRAY)
+ {
+ for(gint i = 0; i < org_list->num; i++)
+ {
+ GmpvPlaylistEntry *entry;
+
+ entry = parse_playlist_entry(org_list->values[i].u.list);
+
+ if(!entry->title && prefetch_metadata)
+ {
+ GmpvMetadataCacheEntry *cache_entry;
+
+ cache_entry = gmpv_metadata_cache_lookup
+ (player->cache, entry->filename);
+ entry->title = g_strdup(cache_entry->title);
+ }
+
+ g_ptr_array_add(player->playlist, entry);
+ }
+
+ mpv_free_node_contents(&playlist);
+ g_object_notify(G_OBJECT(player), "playlist");
+ }
+
+
+ if(prefetch_metadata)
+ {
+ gmpv_metadata_cache_load_playlist
+ (player->cache, player->playlist);
+ }
+
+ g_object_unref(settings);
+}
+
+static void update_metadata(GmpvPlayer *player)
+{
+ mpv_node_list *org_list = NULL;
+ mpv_node metadata;
+
+ g_ptr_array_set_size(player->metadata, 0);
+ gmpv_mpv_get_property( GMPV_MPV(player),
+ "metadata",
+ MPV_FORMAT_NODE,
+ &metadata );
+ org_list = metadata.u.list;
+
+ if(metadata.format == MPV_FORMAT_NODE_MAP && org_list->num > 0)
+ {
+ for(gint i = 0; i < org_list->num; i++)
+ {
+ const gchar *key;
+ mpv_node value;
+
+ key = org_list->keys[i];
+ value = org_list->values[i];
+
+ if(value.format == MPV_FORMAT_STRING)
+ {
+ GmpvMetadataEntry *entry;
+
+ entry = gmpv_metadata_entry_new
+ (key, value.u.string);
+
+ g_ptr_array_add(player->metadata, entry);
+ }
+ else
+ {
+ g_warning( "Ignored metadata field %s "
+ "with unexpected format %d",
+ key,
+ value.format );
+ }
+ }
+
+ mpv_free_node_contents(&metadata);
+ g_object_notify(G_OBJECT(player), "metadata");
+ }
+}
+
+static void update_track_list(GmpvPlayer *player)
+{
+ mpv_node_list *org_list = NULL;
+ mpv_node track_list;
+
+ g_ptr_array_set_size(player->track_list, 0);
+ gmpv_mpv_get_property( GMPV_MPV(player),
+ "track-list",
+ MPV_FORMAT_NODE,
+ &track_list );
+ org_list = track_list.u.list;
+
+ if(track_list.format == MPV_FORMAT_NODE_ARRAY)
+ {
+ for(gint i = 0; i < org_list->num; i++)
+ {
+ GmpvTrack *entry = parse_track_entry
+ (org_list->values[i].u.list);
+
+ g_ptr_array_add(player->track_list, entry);
+ }
+
+ mpv_free_node_contents(&track_list);
+ g_object_notify(G_OBJECT(player), "track-list");
+ }
+}
+
+static void cache_update_handler( GmpvMetadataCache *cache,
+ const gchar *uri,
+ gpointer data )
+{
+ GmpvPlayer *player = data;
+
+ for(guint i = 0; i < player->playlist->len; i++)
+ {
+ GmpvPlaylistEntry *entry = g_ptr_array_index(player->playlist, i);
+
+ if(g_strcmp0(entry->filename, uri) == 0)
+ {
+ GmpvMetadataCacheEntry *cache_entry;
+
+ cache_entry = gmpv_metadata_cache_lookup(cache, uri);
+ g_free(entry->title);
+ entry->title = g_strdup(cache_entry->title);
+
+ g_signal_emit_by_name(data, "metadata-update", i);
+ }
+ }
+}
+
+static void gmpv_player_class_init(GmpvPlayerClass *klass)
+{
+ GmpvMpvClass *mpv_class = GMPV_MPV_CLASS(klass);
+ GObjectClass *obj_class = G_OBJECT_CLASS(klass);
+ GParamSpec *pspec = NULL;
+
+ mpv_class->mpv_event_notify = mpv_event_notify;
+ mpv_class->mpv_log_message = mpv_log_message;
+ mpv_class->mpv_property_changed = mpv_property_changed;
+ mpv_class->initialize = initialize;
+ mpv_class->load_file = load_file;
+ mpv_class->reset = reset;
+ obj_class->set_property = set_property;
+ obj_class->get_property = get_property;
+ obj_class->finalize = finalize;
+
+ pspec = g_param_spec_pointer
+ ( "playlist",
+ "Playlist",
+ "The playlist",
+ G_PARAM_READABLE );
+ g_object_class_install_property(obj_class, PROP_PLAYLIST, pspec);
+
+ pspec = g_param_spec_pointer
+ ( "metadata",
+ "Metadata",
+ "The metadata tags of the current file",
+ G_PARAM_READABLE );
+ g_object_class_install_property(obj_class, PROP_METADATA, pspec);
+
+ pspec = g_param_spec_pointer
+ ( "track-list",
+ "Track list",
+ "Audio, video, and subtitle tracks of the current file",
+ G_PARAM_READABLE );
+ g_object_class_install_property(obj_class, PROP_TRACK_LIST, pspec);
+
+ g_signal_new( "autofit",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0 );
+ g_signal_new( "metadata-update",
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_gen_marshal_VOID__INT64,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_INT64 );
+}
+
+static void gmpv_player_init(GmpvPlayer *player)
+{
+ player->cache = gmpv_metadata_cache_new();
+ player->playlist = g_ptr_array_new_with_free_func
+ ((GDestroyNotify)gmpv_playlist_entry_free);
+ player->metadata = g_ptr_array_new_with_free_func
+ ((GDestroyNotify)gmpv_metadata_entry_free);
+ player->track_list = g_ptr_array_new_with_free_func
+ ((GDestroyNotify)gmpv_track_free);
+ player->log_levels = g_hash_table_new_full( g_str_hash,
+ g_str_equal,
+ g_free,
+ NULL );
+ player->loaded = FALSE;
+ player->new_file = TRUE;
+ player->init_vo_config = TRUE;
+ player->tmp_input_config = NULL;
+
+ g_signal_connect( player->cache,
+ "update",
+ G_CALLBACK(cache_update_handler),
+ player );
+}
+
+GmpvPlayer *gmpv_player_new(gint64 wid)
+{
+ return GMPV_PLAYER(g_object_new( gmpv_player_get_type(),
+ "wid", wid,
+ NULL ));
+}
+
+void gmpv_player_set_log_level( GmpvPlayer *player,
+ const gchar *prefix,
+ const gchar *level )
+{
+ const struct
+ {
+ gchar *name;
+ mpv_log_level level;
+ }
+ level_map[] = { {"no", MPV_LOG_LEVEL_NONE},
+ {"fatal", MPV_LOG_LEVEL_FATAL},
+ {"error", MPV_LOG_LEVEL_ERROR},
+ {"warn", MPV_LOG_LEVEL_WARN},
+ {"info", MPV_LOG_LEVEL_INFO},
+ {"v", MPV_LOG_LEVEL_V},
+ {"debug", MPV_LOG_LEVEL_DEBUG},
+ {"trace", MPV_LOG_LEVEL_TRACE},
+ {NULL, MPV_LOG_LEVEL_NONE} };
+
+ GHashTableIter iter;
+ mpv_log_level iter_level = DEFAULT_LOG_LEVEL;
+ mpv_log_level max_level = DEFAULT_LOG_LEVEL;
+ gboolean found = FALSE;
+ gint i = 0;
+
+ for(i = 0; level_map[i].name && !found; i++)
+ {
+ if(g_strcmp0(level, level_map[i].name) == 0)
+ {
+ found = TRUE;
+ }
+ }
+
+ if(found && g_strcmp0(prefix, "all") != 0)
+ {
+ g_hash_table_replace( player->log_levels,
+ g_strdup(prefix),
+ GINT_TO_POINTER(level_map[i].level) );
+ }
+
+ max_level = level_map[i].level;
+
+ g_hash_table_iter_init(&iter, player->log_levels);
+
+ while(g_hash_table_iter_next(&iter, NULL, (gpointer *)&iter_level))
+ {
+ if(iter_level > max_level)
+ {
+ iter_level = max_level;
+ }
+ }
+
+ for(i = 0; level_map[i].level != max_level; i++)
+ gmpv_mpv_request_log_messages(GMPV_MPV(player), level_map[i].name);
+}
+
diff --git a/src/gmpv_pref_dialog.h b/src/gmpv_player.h
similarity index 68%
copy from src/gmpv_pref_dialog.h
copy to src/gmpv_player.h
index 95bf1a1..a51b5e7 100644
--- a/src/gmpv_pref_dialog.h
+++ b/src/gmpv_player.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 gnome-mpv
+ * Copyright (c) 2017 gnome-mpv
*
* This file is part of GNOME MPV.
*
@@ -17,20 +17,23 @@
* along with GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef PREF_DIALOG_H
-#define PREF_DIALOG_H
+#ifndef PLAYER_H
+#define PLAYER_H
-#include <glib.h>
#include <glib-object.h>
-#include <gtk/gtk.h>
+
+#include "gmpv_mpv.h"
G_BEGIN_DECLS
-#define GMPV_TYPE_PREF_DIALOG (gmpv_pref_dialog_get_type ())
+#define GMPV_TYPE_PLAYER (gmpv_player_get_type())
-G_DECLARE_FINAL_TYPE(GmpvPrefDialog, gmpv_pref_dialog, GMPV, PREF_DIALOG, GtkDialog)
+G_DECLARE_FINAL_TYPE(GmpvPlayer, gmpv_player, GMPV, PLAYER, GmpvMpv)
-GtkWidget *gmpv_pref_dialog_new(GtkWindow *parent);
+GmpvPlayer *gmpv_player_new(gint64 wid);
+void gmpv_player_set_log_level( GmpvPlayer *player,
+ const gchar *prefix,
+ const gchar *level );
G_END_DECLS
diff --git a/src/gmpv_player_options.c b/src/gmpv_player_options.c
new file mode 100644
index 0000000..c09ca62
--- /dev/null
+++ b/src/gmpv_player_options.c
@@ -0,0 +1,423 @@
+/*
+ * Copyright (c) 2016-2017 gnome-mpv
+ *
+ * This file is part of GNOME MPV.
+ *
+ * GNOME MPV 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.
+ *
+ * GNOME MPV 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 GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gdk/gdk.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <string.h>
+#include <mpv/client.h>
+
+#include "gmpv_player_options.h"
+#include "gmpv_mpv.h"
+#include "gmpv_mpv_private.h"
+#include "gmpv_mpv_wrapper.h"
+#include "gmpv_def.h"
+
+static gboolean parse_geom_token(const gchar **iter, GValue *value);
+static gboolean parse_dim_string(const gchar *geom_str, gint64 dim[2]);
+static gboolean parse_pos_token_prefix(const gchar **iter, gchar **prefix);
+static gboolean parse_pos_token( const gchar **iter,
+ GValue *value,
+ gboolean *flip );
+static gboolean parse_pos_string( const gchar *geom_str,
+ gboolean flip[2],
+ GValue pos[2] );
+static void parse_geom_string( GmpvMpv *mpv,
+ const gchar *geom_str,
+ gboolean flip[2],
+ GValue pos[2],
+ gint64 dim[2] );
+static gboolean get_video_dimensions(GmpvMpv *mpv, gint64 dim[2]);
+static void handle_window_scale(GmpvMpv *mpv, gint64 dim[2]);
+static void handle_autofit(GmpvMpv *mpv, gint64 dim[2]);
+static void handle_geometry(GmpvPlayer *player);
+static void handle_fs(GmpvPlayer *player);
+static void handle_msg_level(GmpvPlayer *player);
+static void ready_handler(GObject *object, GParamSpec *pspec, gpointer data);
+static void autofit_handler(GmpvMpv *mpv, gpointer data);
+
+static gboolean parse_geom_token(const gchar **iter, GValue *value)
+{
+ gchar *end = NULL;
+ gint64 token_value = g_ascii_strtoll(*iter, &end, 10);
+ gboolean rc = FALSE;
+
+ if(end)
+ {
+ if(*end == '%')
+ {
+ g_value_init(value, G_TYPE_DOUBLE);
+ g_value_set_double(value, (gdouble)token_value/100.0);
+
+ end++;
+ }
+ else
+ {
+ g_value_init(value, G_TYPE_INT64);
+ g_value_set_int64(value, token_value);
+ }
+
+ rc = !!end && *iter != end;
+ *iter = end;
+ }
+
+ return rc;
+}
+
+static gboolean parse_dim_string(const gchar *geom_str, gint64 dim[2])
+{
+ GdkScreen *screen = gdk_screen_get_default();
+ gint screen_dim[2] = {0, 0};
+ gdouble multiplier[2] = {-1, -1};
+ gchar **tokens = g_strsplit(geom_str, "x", 2);
+ gint i = -1;
+
+ dim[0] = -1;
+ dim[1] = -1;
+ screen_dim[0] = gdk_screen_get_width(screen);
+ screen_dim[1] = gdk_screen_get_height(screen);
+
+ while(tokens && tokens[++i] && i < 3)
+ {
+ gint value = (gint)g_ascii_strtoll(tokens[i], NULL, 0);
+
+ if((i == 0 && value > 0) || i == 1)
+ {
+ if(tokens[i][strnlen(tokens[i], 256)-1] == '%')
+ {
+ multiplier[i] = value/100.0;
+ }
+ else if(i == 1 && multiplier[0] != -1)
+ {
+ multiplier[i] = multiplier[0];
+ }
+
+ if(multiplier[i] == -1)
+ {
+ dim[i] = value;
+ }
+ else
+ {
+ dim[i] = (gint)(multiplier[i]*screen_dim[i]);
+ }
+ }
+ }
+
+ g_strfreev(tokens);
+
+ return (dim[0] > 0 && dim[1] > 0);
+}
+
+static gboolean parse_pos_token_prefix(const gchar **iter, gchar **prefix)
+{
+ const gchar *start = *iter;
+ const gchar *end = *iter;
+ gboolean rc = FALSE;
+
+ while(*end && (*end == '+' || *end == '-'))
+ {
+ end++;
+ }
+
+ rc = (end-start <= 2);
+
+ if(rc)
+ {
+ if(end-start == 2)
+ {
+ end--;
+ }
+
+ *prefix = g_strndup(start, (gsize)(end-start));
+ *iter = end;
+ }
+
+ return rc;
+}
+
+static gboolean parse_pos_token( const gchar **iter,
+ GValue *value,
+ gboolean *flip )
+{
+ gchar *prefix = NULL;
+ gboolean rc = TRUE;
+
+ rc = rc && parse_pos_token_prefix(iter, &prefix);
+ rc = rc && parse_geom_token(iter, value);
+ *flip = (prefix && *prefix == '-');
+
+ g_free(prefix);
+
+ return rc;
+}
+
+static gboolean parse_pos_string( const gchar *geom_str,
+ gboolean flip[2],
+ GValue pos[2] )
+{
+ gboolean rc = TRUE;
+
+ rc = rc && parse_pos_token(&geom_str, &pos[0], &flip[0]);
+ rc = rc && parse_pos_token(&geom_str, &pos[1], &flip[1]);
+
+ return rc;
+}
+
+static void parse_geom_string( GmpvMpv *mpv,
+ const gchar *geom_str,
+ gboolean flip[2],
+ GValue pos[2],
+ gint64 dim[2] )
+{
+ if(!!geom_str)
+ {
+ if(geom_str[0] != '+' && geom_str[0] != '-')
+ {
+ parse_dim_string(geom_str, dim);
+ }
+
+ /* Move the beginning of the string to the 'position' section */
+ while(*geom_str && *geom_str != '+' && *geom_str != '-')
+ {
+ geom_str++;
+ }
+
+ parse_pos_string(geom_str, flip, pos);
+ }
+}
+
+static gboolean get_video_dimensions(GmpvMpv *mpv, gint64 dim[2])
+{
+ GmpvMpvPrivate *priv = get_private(mpv);
+ gint rc = 0;
+
+ rc |= mpv_get_property(priv->mpv_ctx, "dwidth", MPV_FORMAT_INT64, &dim[0]);
+ rc |= mpv_get_property(priv->mpv_ctx, "dheight", MPV_FORMAT_INT64, &dim[1]);
+
+ return (rc >= 0);
+}
+
+static void ready_handler(GObject *object, GParamSpec *pspec, gpointer data)
+{
+ GmpvPlayer *player = GMPV_PLAYER(object);
+
+ handle_geometry(player);
+ handle_fs(player);
+ handle_msg_level(player);
+}
+
+static void autofit_handler(GmpvMpv *mpv, gpointer data)
+{
+ gint64 dim[2] = {0, 0};
+
+ handle_window_scale(mpv, dim);
+ handle_autofit(mpv, dim);
+
+ if(dim[0] > 0 && dim[1] > 0)
+ {
+ g_signal_emit_by_name(mpv, "window-resize", dim[0], dim[1]);
+ }
+}
+
+static void handle_window_scale(GmpvMpv *mpv, gint64 dim[2])
+{
+ gint64 vid_dim[2] = {0, 0};
+ gchar *scale_str;
+ gboolean scale_set;
+
+ scale_str = mpv_get_property_string
+ (get_private(mpv)->mpv_ctx, "options/window-scale");
+ scale_set = scale_str && *scale_str;
+
+ get_video_dimensions(mpv, vid_dim);
+
+ if(scale_set)
+ {
+ gdouble scale;
+
+ g_debug("Retrieved option --window-scale=%s", scale_str);
+
+ /* This should never fail since mpv_set_option() will
+ * refuse to set invalid values.
+ */
+ scale = g_ascii_strtod(scale_str, NULL);
+ dim[0] = (gint64)(scale*(gdouble)vid_dim[0]);
+ dim[1] = (gint64)(scale*(gdouble)vid_dim[1]);
+ }
+
+ mpv_free(scale_str);
+}
+
+static void handle_autofit(GmpvMpv *mpv, gint64 dim[2])
+{
+ GmpvMpvPrivate *priv = get_private(mpv);
+ gint64 vid_dim[2] = {0, 0};
+ gint64 autofit_dim[2] = {0, 0};
+ gint64 larger_dim[2] = {G_MAXINT64, G_MAXINT64};
+ gint64 smaller_dim[2] = {0, 0};
+ gchar *autofit_str = NULL;
+ gchar *larger_str = NULL;
+ gchar *smaller_str = NULL;
+ gboolean autofit_set = FALSE;
+ gboolean larger_set = FALSE;
+ gboolean smaller_set = FALSE;
+
+ autofit_str = mpv_get_property_string
+ (priv->mpv_ctx, "options/autofit");
+ larger_str = mpv_get_property_string
+ (priv->mpv_ctx, "options/autofit-larger");
+ smaller_str = mpv_get_property_string
+ (priv->mpv_ctx, "options/autofit-smaller");
+
+ autofit_set = autofit_str && *autofit_str;
+ larger_set = larger_str && *larger_str;
+ smaller_set = smaller_str && *smaller_str;
+
+ if(autofit_set)
+ {
+ g_debug("Retrieved option --autofit=%s", autofit_str);
+ parse_dim_string(autofit_str, autofit_dim);
+ }
+
+ if(larger_set)
+ {
+ g_debug("Retrieved option --autofit-larger=%s", larger_str);
+ parse_dim_string(larger_str, larger_dim);
+ }
+
+ if(smaller_set)
+ {
+ g_debug("Retrieved option --autofit-smaller=%s", smaller_str);
+ parse_dim_string(smaller_str, smaller_dim);
+ }
+
+ if( (autofit_set || larger_set || smaller_set) &&
+ get_video_dimensions(mpv, vid_dim) )
+ {
+ gdouble ratio = 1.0;
+
+ autofit_dim[0] = CLAMP( autofit_dim[0],
+ smaller_dim[0],
+ larger_dim[0] );
+ autofit_dim[1] = CLAMP( autofit_dim[1],
+ smaller_dim[1],
+ larger_dim[1] );
+ dim[0] = CLAMP(vid_dim[0], autofit_dim[0], larger_dim[0]);
+ dim[1] = CLAMP(vid_dim[1], autofit_dim[1], larger_dim[1]);
+
+ ratio = MIN( (gdouble)dim[0]/(gdouble)vid_dim[0],
+ (gdouble)dim[1]/(gdouble)vid_dim[1] );
+ dim[0] = (gint64)(ratio*(gdouble)vid_dim[0]);
+ dim[1] = (gint64)(ratio*(gdouble)vid_dim[1]);
+ }
+
+ mpv_free(autofit_str);
+ mpv_free(larger_str);
+ mpv_free(smaller_str);
+}
+
+static void handle_geometry(GmpvPlayer *player)
+{
+ gchar *geometry_str = gmpv_mpv_get_property_string
+ (GMPV_MPV(player), "options/geometry");
+
+ if(geometry_str)
+ {
+ gint64 dim[2] = {0, 0};
+ GValue pos[2] = {G_VALUE_INIT, G_VALUE_INIT};
+ gboolean flip[2] = {FALSE, FALSE};
+
+ parse_geom_string(GMPV_MPV(player), geometry_str, flip, pos, dim);
+
+ if(G_IS_VALUE(&pos[0]) && G_IS_VALUE(&pos[1]))
+ {
+ g_signal_emit_by_name( player,
+ "window-move",
+ flip[0], flip[1],
+ &pos[0], &pos[1] );
+ }
+
+ if(dim[0] > 0 && dim[1] > 0)
+ {
+ g_signal_emit_by_name( player,
+ "window-resize",
+ dim[0], dim[1] );
+ }
+ }
+
+ mpv_free(geometry_str);
+}
+
+static void handle_fs(GmpvPlayer *player)
+{
+ GmpvMpv *mpv = GMPV_MPV(player);
+ gchar *fs_str = gmpv_mpv_get_property_string(mpv, "options/fs");
+
+ if(g_strcmp0(fs_str, "yes") == 0)
+ {
+ gmpv_mpv_command_string
+ (mpv, "script-message gmpv-action win.enter-fullscreen");
+ }
+
+ mpv_free(fs_str);
+}
+
+static void handle_msg_level(GmpvPlayer *player)
+{
+ GmpvMpv *mpv = GMPV_MPV(player);
+ gchar *optbuf = NULL;
+ gchar **tokens = NULL;
+ gint i;
+
+ optbuf = gmpv_mpv_get_property_string(mpv, "options/msg-level");
+
+ if(optbuf)
+ {
+ tokens = g_strsplit(optbuf, ",", 0);
+ }
+
+ for(i = 0; tokens && tokens[i]; i++)
+ {
+ gchar **pair = g_strsplit(tokens[i], "=", 2);
+
+ gmpv_player_set_log_level(player, pair[0], pair[1]);
+ g_strfreev(pair);
+ }
+
+ mpv_free(optbuf);
+ g_strfreev(tokens);
+}
+
+void module_log_level_free(module_log_level *level)
+{
+ g_free(level->prefix);
+ g_free(level);
+}
+
+void gmpv_player_options_init(GmpvPlayer *player)
+{
+ g_signal_connect( player,
+ "notify::ready",
+ G_CALLBACK(ready_handler),
+ NULL );
+ g_signal_connect( player,
+ "autofit",
+ G_CALLBACK(autofit_handler),
+ NULL );
+}
diff --git a/src/gmpv_mpv_opt.h b/src/gmpv_player_options.h
similarity index 75%
rename from src/gmpv_mpv_opt.h
rename to src/gmpv_player_options.h
index 268757f..71bbac6 100644
--- a/src/gmpv_mpv_opt.h
+++ b/src/gmpv_player_options.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 gnome-mpv
+ * Copyright (c) 2016-2017 gnome-mpv
*
* This file is part of GNOME MPV.
*
@@ -17,13 +17,13 @@
* along with GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MPV_OPT_H
-#define MPV_OPT_H
+#ifndef PLAYER_OPTIONS_H
+#define PLAYER_OPTIONS_H
#include <glib.h>
#include <mpv/client.h>
-#include "gmpv_mpv.h"
+#include "gmpv_player.h"
G_BEGIN_DECLS
@@ -35,10 +35,8 @@ struct module_log_level
mpv_log_level level;
};
-void gmpv_mpv_opt_handle_geometry(GmpvMpv *mpv);
-void gmpv_mpv_opt_handle_autofit(GmpvMpv *mpv);
-void gmpv_mpv_opt_handle_fs(GmpvMpv *mpv);
-void gmpv_mpv_opt_handle_msg_level(GmpvMpv *mpv);
+void module_log_level_free(module_log_level *level);
+void gmpv_player_options_init(GmpvPlayer *player);
G_END_DECLS
diff --git a/src/gmpv_playlist_widget.c b/src/gmpv_playlist_widget.c
index 4d398a6..e69e352 100644
--- a/src/gmpv_playlist_widget.c
+++ b/src/gmpv_playlist_widget.c
@@ -25,6 +25,7 @@
#include <glib/gi18n.h>
#include "gmpv_playlist_widget.h"
+#include "gmpv_metadata_cache.h"
#include "gmpv_marshal.h"
#include "gmpv_common.h"
#include "gmpv_def.h"
@@ -522,6 +523,7 @@ static gboolean mouse_press_handler( GtkWidget *widget,
GMenu *menu;
GMenuItem *add_menu_item;
GMenuItem *add_loc_menu_item;
+ GMenuItem *shuffle_menu_item;
GMenuItem *loop_menu_item;
GtkWidget *ctx_menu;
@@ -529,15 +531,17 @@ static gboolean mouse_press_handler( GtkWidget *widget,
add_menu_item
= g_menu_item_new
( _("_Add…"),
- "app.show-open-dialog(true)" );
+ "win.show-open-dialog(true)" );
add_loc_menu_item
= g_menu_item_new
( _("Add _Location…"),
- "app.show-open-location-dialog(true)" );
- loop_menu_item = g_menu_item_new(_("Loop"), "app.toggle-loop");
+ "win.show-open-location-dialog(true)" );
+ shuffle_menu_item = g_menu_item_new(_("_Shuffle"), "win.shuffle-playlist");
+ loop_menu_item = g_menu_item_new(_("L_oop"), "win.toggle-loop");
g_menu_append_item(menu, add_menu_item);
g_menu_append_item(menu, add_loc_menu_item);
+ g_menu_append_item(menu, shuffle_menu_item);
g_menu_append_item(menu, loop_menu_item);
g_menu_freeze(menu);
@@ -733,11 +737,14 @@ void gmpv_playlist_widget_update_contents( GmpvPlaylistWidget *wgt,
g_assert(playlist);
+ g_signal_handlers_block_by_func(wgt->store, row_inserted_handler, wgt);
+ g_signal_handlers_block_by_func(wgt->store, row_deleted_handler, wgt);
+
iter_end = !gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter);
for(guint i = 0; i < playlist->len; i++)
{
- GmpvPlaylistEntry *entry = g_ptr_array_index(playlist, i);
+ GmpvPlaylistEntry *entry= g_ptr_array_index(playlist, i);
gchar *uri = entry->filename;
gchar *title = entry->title;
gchar *name = title?g_strdup(title):get_name_from_path(uri);
@@ -745,18 +752,19 @@ void gmpv_playlist_widget_update_contents( GmpvPlaylistWidget *wgt,
/* Overwrite current entry if it doesn't match the new value */
if(!iter_end)
{
- gchar *old_name = NULL;
- gchar *old_uri = NULL;
- gboolean name_update;
- gboolean uri_update;
-
- gtk_tree_model_get
- ( GTK_TREE_MODEL(store), &iter,
- PLAYLIST_NAME_COLUMN, &old_name,
- PLAYLIST_URI_COLUMN, &old_uri, -1 );
+ gchar *old_name = NULL;
+ gchar *old_uri = NULL;
+ gboolean name_update = FALSE;
+ gboolean uri_update = FALSE;
+
+ gtk_tree_model_get( GTK_TREE_MODEL(store),
+ &iter,
+ PLAYLIST_NAME_COLUMN, &old_name,
+ PLAYLIST_URI_COLUMN, &old_uri,
+ -1 );
- name_update = (g_strcmp0(name, old_name) != 0);
- uri_update = (g_strcmp0(uri, old_uri) != 0);
+ name_update = (g_strcmp0(name, old_name) != 0);
+ uri_update = (g_strcmp0(uri, old_uri) != 0);
/* Only set the name if either the title can be
* retrieved or the name is unset. This preserves the
@@ -765,19 +773,23 @@ void gmpv_playlist_widget_update_contents( GmpvPlaylistWidget *wgt,
*/
if(name_update && (!old_name || title || uri_update))
{
- gtk_list_store_set
- ( store, &iter,
- PLAYLIST_NAME_COLUMN, name, -1 );
+ gtk_list_store_set( store,
+ &iter,
+ PLAYLIST_NAME_COLUMN,
+ name,
+ -1 );
}
if(uri_update)
{
- gtk_list_store_set
- ( store, &iter,
- PLAYLIST_URI_COLUMN, uri, -1 );
+ gtk_list_store_set( store,
+ &iter,
+ PLAYLIST_URI_COLUMN,
+ uri,
+ -1 );
}
- iter_end = !gtk_tree_model_iter_next
+ iter_end = !gtk_tree_model_iter_next
(GTK_TREE_MODEL(store), &iter);
g_free(old_name);
@@ -789,12 +801,18 @@ void gmpv_playlist_widget_update_contents( GmpvPlaylistWidget *wgt,
else
{
gtk_list_store_append(store, &iter);
- gtk_list_store_set( store, &iter,
- PLAYLIST_NAME_COLUMN, name,
+ gtk_list_store_set( store,
+ &iter,
+ PLAYLIST_NAME_COLUMN,
+ name,
-1 );
- gtk_list_store_set( store, &iter,
- PLAYLIST_URI_COLUMN, uri,
+ gtk_list_store_set( store,
+ &iter,
+ PLAYLIST_URI_COLUMN,
+ uri,
-1 );
+
+ wgt->playlist_count++;
}
g_free(name);
@@ -805,8 +823,15 @@ void gmpv_playlist_widget_update_contents( GmpvPlaylistWidget *wgt,
*/
if(!iter_end)
{
- while(gtk_list_store_remove(store, &iter));
+ while(gtk_list_store_remove(store, &iter))
+ {
+ wgt->playlist_count--;
+ }
}
+
+ g_signal_handlers_unblock_by_func(wgt->store, row_inserted_handler, wgt);
+ g_signal_handlers_unblock_by_func(wgt->store, row_deleted_handler, wgt);
+ g_object_notify(G_OBJECT(wgt), "playlist-count");
}
GPtrArray *gmpv_playlist_widget_get_contents(GmpvPlaylistWidget *wgt)
diff --git a/src/gmpv_playlist_widget.h b/src/gmpv_playlist_widget.h
index 19e1a0b..84a5830 100644
--- a/src/gmpv_playlist_widget.h
+++ b/src/gmpv_playlist_widget.h
@@ -24,6 +24,8 @@
#include <glib-object.h>
#include <gtk/gtk.h>
+#include "gmpv_metadata_cache.h"
+
G_BEGIN_DECLS
#define GMPV_TYPE_PLAYLIST_WIDGET (gmpv_playlist_widget_get_type ())
diff --git a/src/gmpv_plugins_manager.c b/src/gmpv_plugins_manager.c
index 90b1916..58d96c8 100644
--- a/src/gmpv_plugins_manager.c
+++ b/src/gmpv_plugins_manager.c
@@ -79,7 +79,6 @@ static void gmpv_plugins_manager_constructed(GObject *object)
GmpvPluginsManager *self = GMPV_PLUGINS_MANAGER(object);
gchar *scripts_dir = get_scripts_dir_path();
- g_mkdir_with_parents(scripts_dir, 0700);
gmpv_plugins_manager_set_directory(self, scripts_dir);
g_free(scripts_dir);
diff --git a/src/gmpv_pref_dialog.c b/src/gmpv_preferences_dialog.c
similarity index 83%
rename from src/gmpv_pref_dialog.c
rename to src/gmpv_preferences_dialog.c
index 1a14bee..9a63f90 100644
--- a/src/gmpv_pref_dialog.c
+++ b/src/gmpv_preferences_dialog.c
@@ -23,27 +23,27 @@
#include <glib-object.h>
#include <glib/gi18n.h>
-#include "gmpv_pref_dialog.h"
+#include "gmpv_preferences_dialog.h"
#include "gmpv_plugins_manager.h"
#include "gmpv_main_window.h"
#include "gmpv_def.h"
-typedef struct PrefDialogItem PrefDialogItem;
-typedef enum PrefDialogItemType PrefDialogItemType;
+typedef struct PreferencesDialogItem PreferencesDialogItem;
+typedef enum PreferencesDialogItemType PreferencesDialogItemType;
-struct _GmpvPrefDialog
+struct _GmpvPreferencesDialog
{
GtkDialog parent_instance;
GSettings *settings;
GtkWidget *notebook;
};
-struct _GmpvPrefDialogClass
+struct _GmpvPreferencesDialogClass
{
GtkDialogClass parent_class;
};
-enum PrefDialogItemType
+enum PreferencesDialogItemType
{
ITEM_TYPE_INVALID,
ITEM_TYPE_GROUP,
@@ -53,19 +53,19 @@ enum PrefDialogItemType
ITEM_TYPE_TEXT_BOX
};
-struct PrefDialogItem
+struct PreferencesDialogItem
{
const gchar *label;
const gchar *key;
- PrefDialogItemType type;
+ PreferencesDialogItemType type;
};
-G_DEFINE_TYPE(GmpvPrefDialog, gmpv_pref_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE(GmpvPreferencesDialog, gmpv_preferences_dialog, GTK_TYPE_DIALOG)
static void file_set_handler(GtkFileChooserButton *widget, gpointer data)
{
GtkWidget *toplevel = gtk_widget_get_toplevel(GTK_WIDGET(widget));
- GmpvPrefDialog *dlg = GMPV_PREF_DIALOG(toplevel);
+ GmpvPreferencesDialog *dlg = GMPV_PREFERENCES_DIALOG(toplevel);
GtkFileChooser *chooser = GTK_FILE_CHOOSER(widget);
const gchar *key = data;
gchar *filename = gtk_file_chooser_get_filename(chooser)?:g_strdup("");
@@ -77,7 +77,7 @@ static void file_set_handler(GtkFileChooserButton *widget, gpointer data)
static void response_handler(GtkDialog *dialog, gint response_id)
{
- GmpvPrefDialog *dlg = GMPV_PREF_DIALOG(dialog);
+ GmpvPreferencesDialog *dlg = GMPV_PREFERENCES_DIALOG(dialog);
if(response_id == GTK_RESPONSE_ACCEPT)
{
@@ -109,11 +109,12 @@ static gboolean key_press_handler(GtkWidget *widget, GdkEventKey *event)
gtk_dialog_response(GTK_DIALOG(widget), GTK_RESPONSE_ACCEPT);
}
- return GTK_WIDGET_CLASS(gmpv_pref_dialog_parent_class)
+ return GTK_WIDGET_CLASS(gmpv_preferences_dialog_parent_class)
->key_press_event(widget, event);
}
-static GtkWidget *build_page(const PrefDialogItem *items, GSettings *settings)
+static GtkWidget *build_page( const PreferencesDialogItem *items,
+ GSettings *settings )
{
GtkWidget *grid = gtk_grid_new();
@@ -125,7 +126,7 @@ static GtkWidget *build_page(const PrefDialogItem *items, GSettings *settings)
{
const gchar *label = items[i].label;
const gchar *key = items[i].key;
- const PrefDialogItemType type = items[i].type;
+ const PreferencesDialogItemType type = items[i].type;
GtkWidget *widget = NULL;
gboolean separate_label = FALSE;
gint width = 1;
@@ -253,7 +254,7 @@ static GtkWidget *build_page(const PrefDialogItem *items, GSettings *settings)
return grid;
}
-static void pref_dialog_constructed(GObject *obj)
+static void preferences_dialog_constructed(GObject *obj)
{
gboolean csd_enabled;
@@ -261,28 +262,31 @@ static void pref_dialog_constructed(GObject *obj)
if(!csd_enabled)
{
- GtkWidget *content_area = gtk_dialog_get_content_area
- (GTK_DIALOG(obj));
+ GtkWidget *content_area;
+ GtkWidget *notebook;
+
+ content_area = gtk_dialog_get_content_area(GTK_DIALOG(obj));
+ notebook = GMPV_PREFERENCES_DIALOG(obj)->notebook;
gtk_widget_set_margin_bottom(content_area, 12);
- gtk_widget_set_margin_bottom(GMPV_PREF_DIALOG(obj)->notebook, 6);
+ gtk_widget_set_margin_bottom(notebook, 6);
}
- G_OBJECT_CLASS(gmpv_pref_dialog_parent_class)->constructed(obj);
+ G_OBJECT_CLASS(gmpv_preferences_dialog_parent_class)->constructed(obj);
}
-static void gmpv_pref_dialog_class_init(GmpvPrefDialogClass *klass)
+static void gmpv_preferences_dialog_class_init(GmpvPreferencesDialogClass *klass)
{
GtkWidgetClass *wid_class = GTK_WIDGET_CLASS(klass);
wid_class->key_press_event = key_press_handler;
GTK_DIALOG_CLASS(klass)->response = response_handler;
- G_OBJECT_CLASS(klass)->constructed = pref_dialog_constructed;
+ G_OBJECT_CLASS(klass)->constructed = preferences_dialog_constructed;
}
-static void gmpv_pref_dialog_init(GmpvPrefDialog *dlg)
+static void gmpv_preferences_dialog_init(GmpvPreferencesDialog *dlg)
{
- const PrefDialogItem general_items[]
+ const PreferencesDialogItem general_items[]
= { {_("<b>User Interface</b>"),
NULL,
ITEM_TYPE_GROUP},
@@ -319,8 +323,17 @@ static void gmpv_pref_dialog_init(GmpvPrefDialog *dlg)
{_("<b>Miscellaneous</b>"),
NULL,
ITEM_TYPE_GROUP},
- {_("Allow multiple instances"),
- "multiple-instances-enable",
+ {_("Always open new window"),
+ "always-open-new-window",
+ ITEM_TYPE_CHECK_BOX},
+ {_("Prefetch metadata"),
+ "prefetch-metadata",
+ ITEM_TYPE_CHECK_BOX},
+ {_("Enable MPRIS support"),
+ "mpris-enable",
+ ITEM_TYPE_CHECK_BOX},
+ {_("Enable media keys support"),
+ "media-keys-enable",
ITEM_TYPE_CHECK_BOX},
{_("Extra MPV options:"),
NULL,
@@ -372,7 +385,7 @@ static void gmpv_pref_dialog_init(GmpvPrefDialog *dlg)
}
-GtkWidget *gmpv_pref_dialog_new(GtkWindow *parent)
+GtkWidget *gmpv_preferences_dialog_new(GtkWindow *parent)
{
GtkWidget *dlg;
GtkWidget *header_bar;
@@ -380,7 +393,7 @@ GtkWidget *gmpv_pref_dialog_new(GtkWindow *parent)
csd_enabled = gmpv_main_window_get_csd_enabled(GMPV_MAIN_WINDOW(parent));
- dlg = g_object_new( gmpv_pref_dialog_get_type(),
+ dlg = g_object_new( gmpv_preferences_dialog_get_type(),
"title", _("Preferences"),
"modal", TRUE,
"transient-for", parent,
diff --git a/src/gmpv_pref_dialog.h b/src/gmpv_preferences_dialog.h
similarity index 70%
rename from src/gmpv_pref_dialog.h
rename to src/gmpv_preferences_dialog.h
index 95bf1a1..c37c7ae 100644
--- a/src/gmpv_pref_dialog.h
+++ b/src/gmpv_preferences_dialog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 gnome-mpv
+ * Copyright (c) 2014-2017 gnome-mpv
*
* This file is part of GNOME MPV.
*
@@ -17,8 +17,8 @@
* along with GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef PREF_DIALOG_H
-#define PREF_DIALOG_H
+#ifndef PREFERENCES_DIALOG_H
+#define PREFERENCES_DIALOG_H
#include <glib.h>
#include <glib-object.h>
@@ -26,11 +26,11 @@
G_BEGIN_DECLS
-#define GMPV_TYPE_PREF_DIALOG (gmpv_pref_dialog_get_type ())
+#define GMPV_TYPE_PREFERENCES_DIALOG (gmpv_preferences_dialog_get_type ())
-G_DECLARE_FINAL_TYPE(GmpvPrefDialog, gmpv_pref_dialog, GMPV, PREF_DIALOG, GtkDialog)
+G_DECLARE_FINAL_TYPE(GmpvPreferencesDialog, gmpv_preferences_dialog, GMPV, PREFERENCES_DIALOG, GtkDialog)
-GtkWidget *gmpv_pref_dialog_new(GtkWindow *parent);
+GtkWidget *gmpv_preferences_dialog_new(GtkWindow *parent);
G_END_DECLS
diff --git a/src/gmpv_video_area.c b/src/gmpv_video_area.c
index 6a9dbbf..3326e46 100644
--- a/src/gmpv_video_area.c
+++ b/src/gmpv_video_area.c
@@ -65,9 +65,10 @@ static void get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec );
+static void destroy(GtkWidget *widget);
static void set_cursor_visible(GmpvVideoArea *area, gboolean visible);
static gboolean timeout_handler(gpointer data);
-static gboolean motion_notify_handler(GtkWidget *widget, GdkEventMotion *event);
+static gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event);
static gboolean fs_control_crossing_handler( GtkWidget *widget,
GdkEventCrossing *event,
gpointer data );
@@ -116,6 +117,17 @@ static void get_property( GObject *object,
}
}
+static void destroy(GtkWidget *widget)
+{
+ GmpvVideoArea *area = GMPV_VIDEO_AREA(widget);
+
+ if(area->timeout_tag > 0)
+ {
+ g_source_remove(area->timeout_tag);
+ area->timeout_tag = 0;
+ }
+}
+
static void set_cursor_visible(GmpvVideoArea *area, gboolean visible)
{
GdkWindow *window;
@@ -170,7 +182,7 @@ static gboolean timeout_handler(gpointer data)
return (area->timeout_tag != 0);
}
-static gboolean motion_notify_handler(GtkWidget *widget, GdkEventMotion *event)
+static gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event)
{
GmpvVideoArea *area = GMPV_VIDEO_AREA(widget);
GdkCursor *cursor;
@@ -189,6 +201,7 @@ static gboolean motion_notify_handler(GtkWidget *widget, GdkEventMotion *event)
if(area->timeout_tag > 0)
{
g_source_remove(area->timeout_tag);
+ area->timeout_tag = 0;
}
area->timeout_tag = g_timeout_add_seconds( FS_CONTROL_HIDE_DELAY,
@@ -205,7 +218,7 @@ static gboolean render_handler( GtkGLArea *gl_area,
{
g_signal_emit_by_name(data, "render");
- return FALSE;
+ return TRUE;
}
static void notify_handler( GObject *gobject,
@@ -226,7 +239,7 @@ static void notify_handler( GObject *gobject,
"child-revealed", &child_revealed,
NULL );
- gtk_widget_set_visible( GTK_WIDGET(area),
+ gtk_widget_set_visible( GTK_WIDGET(area->header_bar_revealer),
area->fullscreen &&
(reveal_child || child_revealed) );
}
@@ -248,7 +261,8 @@ static void gmpv_video_area_class_init(GmpvVideoAreaClass *klass)
obj_class->set_property = set_property;
obj_class->get_property = get_property;
- wgt_class->motion_notify_event = motion_notify_handler;
+ wgt_class->destroy = destroy;
+ wgt_class->motion_notify_event = motion_notify_event;
g_signal_new( "render",
G_TYPE_FROM_CLASS(klass),
@@ -285,7 +299,7 @@ static void gmpv_video_area_init(GmpvVideoArea *area)
area->stack = gtk_stack_new();
area->draw_area = gtk_drawing_area_new();
area->gl_area = gtk_gl_area_new();
- area->control_box = NULL;
+ area->control_box = gmpv_control_box_new();
area->header_bar = gmpv_header_bar_new();
area->control_box_revealer = gtk_revealer_new();
area->header_bar_revealer = gtk_revealer_new();
@@ -307,15 +321,17 @@ static void gmpv_video_area_init(GmpvVideoArea *area)
gtk_widget_add_events(area->gl_area, extra_events);
gtk_widget_set_valign(area->control_box_revealer, GTK_ALIGN_END);
- gtk_widget_show(area->control_box_revealer);
gtk_revealer_set_reveal_child
(GTK_REVEALER(area->control_box_revealer), FALSE);
gtk_widget_set_valign(area->header_bar_revealer, GTK_ALIGN_START);
- gtk_widget_show(area->header_bar_revealer);
gtk_revealer_set_reveal_child
(GTK_REVEALER(area->header_bar_revealer), FALSE);
+ gtk_widget_show_all(area->control_box);
+ gtk_widget_hide(area->control_box_revealer);
+ gtk_widget_set_no_show_all(area->control_box_revealer, TRUE);
+
gtk_widget_show_all(area->header_bar);
gtk_widget_hide(area->header_bar_revealer);
gtk_widget_set_no_show_all(area->header_bar_revealer, TRUE);
@@ -327,11 +343,11 @@ static void gmpv_video_area_init(GmpvVideoArea *area)
g_signal_connect( area->header_bar_revealer,
"notify::reveal-child",
G_CALLBACK(notify_handler),
- area->header_bar_revealer );
+ area );
g_signal_connect( area->header_bar_revealer,
"notify::child-revealed",
G_CALLBACK(notify_handler),
- area->header_bar_revealer );
+ area );
g_signal_connect( area,
"enter-notify-event",
G_CALLBACK(fs_control_crossing_handler),
@@ -347,6 +363,8 @@ static void gmpv_video_area_init(GmpvVideoArea *area)
gtk_container_add( GTK_CONTAINER(area->header_bar_revealer),
area->header_bar );
+ gtk_container_add( GTK_CONTAINER(area->control_box_revealer),
+ area->control_box );
gtk_overlay_add_overlay(GTK_OVERLAY(area), area->control_box_revealer);
gtk_overlay_add_overlay(GTK_OVERLAY(area), area->header_bar_revealer);
@@ -391,22 +409,10 @@ void gmpv_video_area_set_fullscreen_state( GmpvVideoArea *area,
}
}
-void gmpv_video_area_set_control_box( GmpvVideoArea *area,
- GtkWidget *control_box )
+void gmpv_video_area_set_control_box_visible( GmpvVideoArea *area,
+ gboolean visible )
{
- GtkContainer *revealer = GTK_CONTAINER(area->control_box_revealer);
-
- if(area->control_box)
- {
- gtk_container_remove(revealer, area->control_box);
- }
-
- area->control_box = control_box;
-
- if(control_box)
- {
- gtk_container_add(revealer, control_box);
- }
+ gtk_widget_set_visible(area->control_box_revealer, visible);
}
void gmpv_video_area_set_use_opengl(GmpvVideoArea *area, gboolean use_opengl)
@@ -431,6 +437,11 @@ GtkGLArea *gmpv_video_area_get_gl_area(GmpvVideoArea *area)
return GTK_GL_AREA(area->gl_area);
}
+GmpvControlBox *gmpv_video_area_get_control_box(GmpvVideoArea *area)
+{
+ return GMPV_CONTROL_BOX(area->control_box);
+}
+
gint64 gmpv_video_area_get_xid(GmpvVideoArea *area)
{
#ifdef GDK_WINDOWING_X11
diff --git a/src/gmpv_video_area.h b/src/gmpv_video_area.h
index b3626db..29688e3 100644
--- a/src/gmpv_video_area.h
+++ b/src/gmpv_video_area.h
@@ -24,6 +24,8 @@
#include <glib-object.h>
#include <gtk/gtk.h>
+#include "gmpv_control_box.h"
+
#define GMPV_TYPE_VIDEO_AREA (gmpv_video_area_get_type ())
G_DECLARE_FINAL_TYPE(GmpvVideoArea, gmpv_video_area, GMPV, VIDEO_AREA, GtkOverlay)
@@ -33,12 +35,13 @@ void gmpv_video_area_update_track_list( GmpvVideoArea *hdr,
const GPtrArray *track_list );
void gmpv_video_area_set_fullscreen_state( GmpvVideoArea *area,
gboolean fullscreen );
-void gmpv_video_area_set_control_box( GmpvVideoArea *area,
- GtkWidget *control_box );
+void gmpv_video_area_set_control_box_visible( GmpvVideoArea *area,
+ gboolean visible );
void gmpv_video_area_set_use_opengl(GmpvVideoArea *area, gboolean use_opengl);
void gmpv_video_area_queue_render(GmpvVideoArea *area);
GtkDrawingArea *gmpv_video_area_get_draw_area(GmpvVideoArea *area);
GtkGLArea *gmpv_video_area_get_gl_area(GmpvVideoArea *area);
+GmpvControlBox *gmpv_video_area_get_control_box(GmpvVideoArea *area);
gint64 gmpv_video_area_get_xid(GmpvVideoArea *area);
#endif
diff --git a/src/gmpv_view.c b/src/gmpv_view.c
index f7028f0..afa8f35 100644
--- a/src/gmpv_view.c
+++ b/src/gmpv_view.c
@@ -22,10 +22,11 @@
#include "gmpv_view.h"
#include "gmpv_file_chooser.h"
#include "gmpv_open_location_dialog.h"
-#include "gmpv_pref_dialog.h"
+#include "gmpv_preferences_dialog.h"
#include "gmpv_shortcuts_window.h"
#include "gmpv_authors.h"
#include "gmpv_marshal.h"
+#include "gmpv_menu.h"
#include "gmpv_common.h"
#include "gmpv_def.h"
@@ -41,7 +42,6 @@ enum
PROP_PLAYLIST_POS,
PROP_TRACK_LIST,
PROP_CHAPTERS_ENABLED,
- PROP_CONTROL_BOX_ENABLED,
PROP_FULLSCREEN,
N_PROPERTIES
};
@@ -80,6 +80,8 @@ static void get_property( GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec );
+static void dispose(GObject * object);
+static void finalize(GObject * object);
static void load_css(GmpvView *view);
static void save_playlist(GmpvView *view, GFile *file, GError **error);
static void show_message_dialog( GmpvMainWindow *wnd,
@@ -88,14 +90,11 @@ static void show_message_dialog( GmpvMainWindow *wnd,
const gchar *prefix,
const gchar *msg );
-/* Property changes */
-static void play_button_handler(GtkButton *button, gpointer data);
-static void stop_button_handler(GtkButton *button, gpointer data);
-static void next_button_handler(GtkButton *button, gpointer data);
-static void previous_button_handler(GtkButton *button, gpointer data);
-static void forward_button_handler(GtkButton *button, gpointer data);
-static void rewind_button_handler(GtkButton *button, gpointer data);
-static void seek_handler(GtkWidget *widget, gdouble value, gpointer data);
+/* Control box signals */
+static void button_clicked_handler( GtkWidget *widget,
+ const gchar *button,
+ gpointer data );
+static void seek_handler(GtkWidget *widget, gdouble value, gpointer data);
/* Dialog responses */
static void open_dialog_response_handler( GtkDialog *dialog,
@@ -185,13 +184,10 @@ static void constructed(GObject *object)
load_css(view);
gtk_widget_show_all(GTK_WIDGET(view->wnd));
- if(csd_enable)
- {
- gmpv_control_box_set_fullscreen_button_visible(control_box, FALSE);
- }
-
- gmpv_control_box_set_chapter_enabled(control_box, FALSE);
-
+ g_object_set( control_box,
+ "show-fullscreen-button", !csd_enable,
+ "chapters-enabled", FALSE,
+ NULL );
g_object_set( gtk_settings_get_default(),
"gtk-application-prefer-dark-theme",
dark_theme_enable,
@@ -202,6 +198,15 @@ static void constructed(GObject *object)
g_object_bind_property( view, "title",
view->wnd, "title",
G_BINDING_DEFAULT );
+ g_object_bind_property( view, "duration",
+ control_box, "duration",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( view, "pause",
+ control_box, "pause",
+ G_BINDING_DEFAULT );
+ g_object_bind_property( view, "chapters-enabled",
+ control_box, "chapters-enabled",
+ G_BINDING_DEFAULT );
g_object_bind_property( view, "volume",
control_box, "volume",
G_BINDING_BIDIRECTIONAL );
@@ -209,31 +214,11 @@ static void constructed(GObject *object)
view, "playlist-count",
G_BINDING_DEFAULT );
- g_signal_connect( control_box,
- "play-button-clicked",
- G_CALLBACK(play_button_handler),
- view );
- g_signal_connect( control_box,
- "stop-button-clicked",
- G_CALLBACK(stop_button_handler),
- view );
- g_signal_connect( control_box,
- "next-button-clicked",
- G_CALLBACK(next_button_handler),
- view );
- g_signal_connect( control_box,
- "previous-button-clicked",
- G_CALLBACK(previous_button_handler),
- view );
- g_signal_connect( control_box,
- "forward-button-clicked",
- G_CALLBACK(forward_button_handler),
- view );
- g_signal_connect( control_box,
- "rewind-button-clicked",
- G_CALLBACK(rewind_button_handler),
+ g_signal_connect( view->wnd,
+ "button-clicked",
+ G_CALLBACK(button_clicked_handler),
view );
- g_signal_connect( control_box,
+ g_signal_connect( view->wnd,
"seek",
G_CALLBACK(seek_handler),
view );
@@ -307,6 +292,8 @@ static void constructed(GObject *object)
"rows-reordered",
G_CALLBACK(playlist_row_reordered_handler),
view );
+
+ G_OBJECT_CLASS(gmpv_view_parent_class)->constructed(object);
}
static void set_property( GObject *object,
@@ -330,8 +317,11 @@ static void set_property( GObject *object,
case PROP_PLAYLIST_COUNT:
self->playlist_count = g_value_get_int(value);
- gmpv_control_box_set_enabled
- (control_box, self->playlist_count > 0);
+
+ g_object_set( control_box,
+ "enabled",
+ self->playlist_count > 0,
+ NULL );
if(self->playlist_count <= 0)
{
@@ -341,7 +331,6 @@ static void set_property( GObject *object,
case PROP_PAUSE:
self->pause = g_value_get_boolean(value);
- gmpv_control_box_set_playing_state(control_box, !self->pause);
break;
case PROP_TITLE:
@@ -355,8 +344,6 @@ static void set_property( GObject *object,
case PROP_DURATION:
self->duration = g_value_get_double(value);
- gmpv_control_box_set_seek_bar_duration
- (control_box, (gint)self->duration);
break;
case PROP_PLAYLIST_POS:
@@ -372,14 +359,6 @@ static void set_property( GObject *object,
case PROP_CHAPTERS_ENABLED:
self->chapters_enabled = g_value_get_boolean(value);
- gmpv_control_box_set_chapter_enabled
- (control_box, self->chapters_enabled);
- break;
-
- case PROP_CONTROL_BOX_ENABLED:
- self->control_box_enabled = g_value_get_boolean(value);
- gmpv_control_box_set_enabled
- (control_box, self->control_box_enabled);
break;
case PROP_FULLSCREEN:
@@ -438,10 +417,6 @@ static void get_property( GObject *object,
g_value_set_boolean(value, self->chapters_enabled);
break;
- case PROP_CONTROL_BOX_ENABLED:
- g_value_set_boolean(value, self->control_box_enabled);
- break;
-
case PROP_FULLSCREEN:
g_value_set_boolean(value, self->fullscreen);
break;
@@ -452,6 +427,26 @@ static void get_property( GObject *object,
}
}
+static void dispose(GObject *object)
+{
+ GmpvView *view = GMPV_VIEW(object);
+
+ if(view->wnd)
+ {
+ gtk_widget_destroy(GTK_WIDGET(view->wnd));
+ view->wnd = NULL;
+ }
+
+ G_OBJECT_CLASS(gmpv_view_parent_class)->dispose(object);
+}
+
+static void finalize(GObject *object)
+{
+ g_free(GMPV_VIEW(object)->title);
+
+ G_OBJECT_CLASS(gmpv_view_parent_class)->finalize(object);
+}
+
static void load_css(GmpvView *view)
{
const gchar *style;
@@ -582,34 +577,14 @@ void show_message_dialog( GmpvMainWindow *wnd,
gtk_widget_show_all(dialog);
}
-static void play_button_handler(GtkButton *button, gpointer data)
-{
- g_signal_emit_by_name(data, "button-clicked::play");
-}
-
-static void stop_button_handler(GtkButton *button, gpointer data)
-{
- g_signal_emit_by_name(data, "button-clicked::stop");
-}
-
-static void next_button_handler(GtkButton *button, gpointer data)
-{
- g_signal_emit_by_name(data, "button-clicked::next");
-}
-
-static void previous_button_handler(GtkButton *button, gpointer data)
-{
- g_signal_emit_by_name(data, "button-clicked::previous");
-}
-
-static void forward_button_handler(GtkButton *button, gpointer data)
+static void button_clicked_handler( GtkWidget *widget,
+ const gchar *button,
+ gpointer data )
{
- g_signal_emit_by_name(data, "button-clicked::forward");
-}
+ gchar *name = g_strconcat("button-clicked::", button, NULL);
-static void rewind_button_handler(GtkButton *button, gpointer data)
-{
- g_signal_emit_by_name(data, "button-clicked::rewind");
+ g_signal_emit_by_name(data, name);
+ g_free(name);
}
static void seek_handler(GtkWidget *widget, gdouble value, gpointer data)
@@ -722,16 +697,10 @@ static void preferences_dialog_response_handler( GtkDialog *dialog,
GmpvView *view;
GSettings *settings;
gboolean csd_enable;
- gboolean dark_theme_enable;
- gboolean always_floating;
view = data;
settings = g_settings_new(CONFIG_ROOT);
csd_enable = g_settings_get_boolean(settings, "csd-enable");
- dark_theme_enable = g_settings_get_boolean
- (settings, "dark-theme-enable");
- always_floating = g_settings_get_boolean
- (settings, "always-use-floating-controls");
if(gmpv_main_window_get_csd_enabled(view->wnd) != csd_enable)
{
@@ -745,15 +714,6 @@ static void preferences_dialog_response_handler( GtkDialog *dialog,
"take effect.") );
}
- g_object_set( gtk_settings_get_default(),
- "gtk-application-prefer-dark-theme",
- dark_theme_enable,
- NULL );
- g_object_set( view->wnd,
- "always-use-floating-controls",
- always_floating,
- NULL );
-
gtk_widget_queue_draw(GTK_WIDGET(view->wnd));
g_signal_emit_by_name(data, "preferences-updated");
@@ -830,8 +790,7 @@ static gboolean draw_handler(GtkWidget *widget, cairo_t *cr, gpointer data)
GmpvControlBox *control_box;
control_box = gmpv_main_window_get_control_box(view->wnd);
-
- gmpv_control_box_set_enabled(control_box, FALSE);
+ g_object_set(control_box, "enabled", FALSE, NULL);
}
g_signal_emit_by_name(view, "ready");
@@ -961,6 +920,8 @@ static void gmpv_view_class_init(GmpvViewClass *klass)
object_class->constructed = constructed;
object_class->set_property = set_property;
object_class->get_property = get_property;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
pspec = g_param_spec_pointer
( "window",
@@ -1274,10 +1235,33 @@ static void gmpv_view_init(GmpvView *view)
view->fullscreen = FALSE;
}
-GmpvView *gmpv_view_new(GmpvMainWindow *wnd)
+GmpvView *gmpv_view_new(GmpvApplication *app, gboolean always_floating)
{
+ GtkApplication *gtk_app = GTK_APPLICATION(app);
+ GSettings *settings = g_settings_new(CONFIG_ROOT);
+ GtkWidget *window = gmpv_main_window_new(gtk_app, always_floating);
+
+ if(g_settings_get_boolean(settings, "csd-enable"))
+ {
+ GMenu *app_menu = g_menu_new();
+
+ gmpv_menu_build_app_menu(app_menu);
+ gtk_application_set_app_menu(gtk_app, G_MENU_MODEL(app_menu));
+ gmpv_main_window_enable_csd(GMPV_MAIN_WINDOW(window));
+ }
+ else
+ {
+ GMenu *full_menu = g_menu_new();
+
+ gmpv_menu_build_full(full_menu, NULL);
+ gtk_application_set_app_menu(gtk_app, NULL);
+ gtk_application_set_menubar(gtk_app, G_MENU_MODEL(full_menu));
+ }
+
+ g_object_unref(settings);
+
return GMPV_VIEW(g_object_new( gmpv_view_get_type(),
- "window", wnd,
+ "window", window,
NULL ));
}
@@ -1423,14 +1407,14 @@ void gmpv_view_show_save_playlist_dialog(GmpvView *view)
void gmpv_view_show_preferences_dialog(GmpvView *view)
{
- GtkWidget *pref_dialog = gmpv_pref_dialog_new(GTK_WINDOW(view->wnd));
+ GtkWidget *dialog = gmpv_preferences_dialog_new(GTK_WINDOW(view->wnd));
- g_signal_connect_after( pref_dialog,
+ g_signal_connect_after( dialog,
"response",
G_CALLBACK(preferences_dialog_response_handler),
view );
- gtk_widget_show_all(pref_dialog);
+ gtk_widget_show_all(dialog);
}
void gmpv_view_show_shortcuts_dialog(GmpvView *view)
@@ -1531,6 +1515,46 @@ void gmpv_view_get_video_area_geometry(GmpvView *view, gint *width, gint *height
*height = allocation.height;
}
+void gmpv_view_move( GmpvView *view,
+ gboolean flip_x,
+ gboolean flip_y,
+ GValue *x,
+ GValue *y )
+{
+ GdkScreen *screen = gdk_screen_get_default();
+ GtkWindow *window = GTK_WINDOW(view->wnd);
+ gint64 x_pos = -1;
+ gint64 y_pos = -1;
+ gint window_width = 0;
+ gint window_height = 0;
+ gint space_x;
+ gint space_y;
+
+ gtk_window_get_size(window, &window_width, &window_height);
+ space_x = gdk_screen_get_width(screen)-window_width;
+ space_y = gdk_screen_get_height(screen)-window_height;
+
+ if(G_VALUE_HOLDS_DOUBLE(x))
+ {
+ x_pos = (gint64)(g_value_get_double(x)*space_x);
+ }
+ else
+ {
+ x_pos = flip_x?space_x-g_value_get_int64(x):g_value_get_int64(x);
+ }
+
+ if(G_VALUE_HOLDS_DOUBLE(y))
+ {
+ y_pos = (gint64)(g_value_get_double(y)*space_y);
+ }
+ else
+ {
+ y_pos = flip_y?space_y-g_value_get_int64(y):g_value_get_int64(y);
+ }
+
+ gtk_window_move(window, (gint)x_pos, (gint)y_pos);
+}
+
void gmpv_view_resize_video_area(GmpvView *view, gint width, gint height)
{
gmpv_main_window_resize_video_area(view->wnd, width, height);
@@ -1547,20 +1571,38 @@ void gmpv_view_set_time_position(GmpvView *view, gdouble position)
GmpvControlBox *control_box;
control_box = gmpv_main_window_get_control_box(view->wnd);
- gmpv_control_box_set_seek_bar_pos(control_box, position);
+ g_object_set(control_box, "time-position", position, NULL);
}
void gmpv_view_update_playlist(GmpvView *view, GPtrArray *playlist)
{
- if(playlist)
- {
- GmpvPlaylistWidget *pl = gmpv_main_window_get_playlist(view->wnd);
+ GmpvPlaylistWidget *wgt = gmpv_main_window_get_playlist(view->wnd);
- gmpv_playlist_widget_update_contents(pl, playlist);
- }
+ gmpv_playlist_widget_update_contents(wgt, playlist);
}
void gmpv_view_set_playlist_pos(GmpvView *view, gint64 pos)
{
g_object_set(view, "playlist-pos", pos, NULL);
}
+
+void gmpv_view_set_playlist_visible(GmpvView *view, gboolean visible)
+{
+ gmpv_main_window_set_playlist_visible(view->wnd, visible);
+}
+
+gboolean gmpv_view_get_playlist_visible(GmpvView *view)
+{
+ return gmpv_main_window_get_playlist_visible(view->wnd);
+}
+
+void gmpv_view_set_controls_visible(GmpvView *view, gboolean visible)
+{
+ gmpv_main_window_set_controls_visible(view->wnd, visible);
+}
+
+gboolean gmpv_view_get_controls_visible(GmpvView *view)
+{
+ return gmpv_main_window_get_controls_visible(view->wnd);
+}
+
diff --git a/src/gmpv_view.h b/src/gmpv_view.h
index caae668..258b3f6 100644
--- a/src/gmpv_view.h
+++ b/src/gmpv_view.h
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(GmpvView, gmpv_view, GMPV, VIEW, GObject)
-GmpvView *gmpv_view_new(GmpvMainWindow *wnd);
+GmpvView *gmpv_view_new(GmpvApplication *app, gboolean always_floating);
GmpvMainWindow *gmpv_view_get_main_window(GmpvView *view);
void gmpv_view_show_open_dialog(GmpvView *view, gboolean append);
void gmpv_view_show_open_location_dialog(GmpvView *view, gboolean append);
@@ -53,11 +53,20 @@ void gmpv_view_make_gl_context_current(GmpvView *view);
void gmpv_view_set_use_opengl_cb(GmpvView *view, gboolean use_opengl_cb);
gint gmpv_view_get_scale_factor(GmpvView *view);
void gmpv_view_get_video_area_geometry(GmpvView *view, gint *width, gint *height);
+void gmpv_view_move( GmpvView *view,
+ gboolean flip_x,
+ gboolean flip_y,
+ GValue *x,
+ GValue *y );
void gmpv_view_resize_video_area(GmpvView *view, gint width, gint height);
void gmpv_view_set_fullscreen(GmpvView *view, gboolean fullscreen);
void gmpv_view_set_time_position(GmpvView *view, gdouble position);
void gmpv_view_update_playlist(GmpvView *view, GPtrArray *playlist);
void gmpv_view_set_playlist_pos(GmpvView *view, gint64 pos);
+void gmpv_view_set_playlist_visible(GmpvView *view, gboolean visible);
+gboolean gmpv_view_get_playlist_visible(GmpvView *view);
+void gmpv_view_set_controls_visible(GmpvView *view, gboolean visible);
+gboolean gmpv_view_get_controls_visible(GmpvView *view);
G_END_DECLS
diff --git a/src/media_keys/gmpv_media_keys.c b/src/media_keys/gmpv_media_keys.c
index 564667d..973cf44 100644
--- a/src/media_keys/gmpv_media_keys.c
+++ b/src/media_keys/gmpv_media_keys.c
@@ -17,79 +17,164 @@
* along with GNOME MPV. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include <gdk/gdk.h>
-
-#include "gmpv_application_private.h"
-#include "gmpv_main_window.h"
#include "gmpv_media_keys.h"
-#include "gmpv_model.h"
#include "gmpv_def.h"
-static gboolean delete_handler( GtkWidget *widget,
- GdkEvent *event,
+enum
+{
+ PROP_0,
+ PROP_CONTROLLER,
+ N_PROPERTIES
+};
+
+struct _GmpvMediaKeys
+{
+ GObject parent;
+ GmpvController *controller;
+ gulong focus_sig_id;
+ GDBusProxy *proxy;
+ GDBusProxy *compat_proxy;
+ GDBusConnection *session_bus_conn;
+};
+
+struct _GmpvMediaKeysClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE(GmpvMediaKeys, gmpv_media_keys, G_TYPE_OBJECT)
+
+static void constructed(GObject *object);
+static void dispose(GObject *object);
+static void set_property( GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec );
+static void get_property( GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec );
+static gboolean window_state_handler( GtkWidget *widget,
+ GdkEventWindowState *event,
+ gpointer data );
+static void g_signal_handler( GDBusProxy *proxy,
+ gchar *sender_name,
+ gchar *signal_name,
+ GVariant *parameters,
gpointer data );
-static void media_key_press_handler( GDBusProxy *proxy,
- gchar *sender_name,
- gchar *signal_name,
- GVariant *parameters,
- gpointer data );
static void proxy_ready_handler( GObject *source_object,
GAsyncResult *res,
gpointer data );
+static void compat_proxy_ready_handler( GObject *source_object,
+ GAsyncResult *res,
+ gpointer data );
static void session_ready_handler( GObject *source_object,
GAsyncResult *res,
gpointer data );
-static gboolean delete_handler( GtkWidget *widget,
- GdkEvent *event,
- gpointer data )
+static void constructed(GObject *object)
{
- gmpv_media_keys *inst = data;
- GmpvMainWindow *wnd = gmpv_application_get_main_window(inst->gmpv_ctx);
+ GmpvMediaKeys *self = GMPV_MEDIA_KEYS(object);
+ GmpvView *view = gmpv_controller_get_view(self->controller);
- g_signal_handler_disconnect(wnd, inst->shutdown_sig_id);
- g_signal_handler_disconnect(wnd, inst->focus_sig_id);
- g_signal_handler_disconnect(inst->proxy, inst->g_signal_sig_id);
+ self->focus_sig_id = g_signal_connect
+ ( gmpv_view_get_main_window(view),
+ "window-state-event",
+ G_CALLBACK(window_state_handler),
+ self );
- g_object_unref(inst->proxy);
- g_object_unref(inst->session_bus_conn);
- g_free(inst);
+ g_bus_get(G_BUS_TYPE_SESSION, NULL, session_ready_handler, self);
+}
- return FALSE;
+static void dispose(GObject *object)
+{
+ GmpvMediaKeys *self = GMPV_MEDIA_KEYS(object);
+ GmpvView *view = gmpv_controller_get_view(self->controller);
+ GmpvMainWindow *window = gmpv_view_get_main_window(view);
+
+ if(self->focus_sig_id > 0)
+ {
+ g_signal_handler_disconnect(window, self->focus_sig_id);
+ self->focus_sig_id = 0;
+ }
+
+ g_clear_object(&self->proxy);
+ g_clear_object(&self->compat_proxy);
+ g_clear_object(&self->session_bus_conn);
+
+ G_OBJECT_CLASS(gmpv_media_keys_parent_class)->dispose(object);
+}
+
+static void set_property( GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec )
+{
+ GmpvMediaKeys *self = GMPV_MEDIA_KEYS(object);
+
+ switch(property_id)
+ {
+ case PROP_CONTROLLER:
+ self->controller = g_value_get_pointer(value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+
+ G_OBJECT_CLASS(gmpv_media_keys_parent_class)->constructed(object);
+}
+
+static void get_property( GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec )
+{
+ GmpvMediaKeys *self = GMPV_MEDIA_KEYS(object);
+
+ switch(property_id)
+ {
+ case PROP_CONTROLLER:
+ g_value_set_pointer(value, self->controller);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
}
static gboolean window_state_handler( GtkWidget *widget,
GdkEventWindowState *event,
gpointer data )
{
- gmpv_media_keys *inst = data;
+ GmpvMediaKeys *self = data;
if (event->changed_mask & GDK_WINDOW_STATE_FOCUSED
&& event->new_window_state & GDK_WINDOW_STATE_FOCUSED
- && inst->proxy != NULL)
+ && self->proxy != NULL)
{
- g_dbus_proxy_call( inst->proxy,
+ g_dbus_proxy_call( self->proxy,
"GrabMediaPlayerKeys",
g_variant_new("(su)", APP_ID, 0),
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,
NULL,
- inst );
+ self );
}
return FALSE;
}
-static void media_key_press_handler( GDBusProxy *proxy,
- gchar *sender_name,
- gchar *signal_name,
- GVariant *parameters,
- gpointer data )
+static void g_signal_handler( GDBusProxy *proxy,
+ gchar *sender_name,
+ gchar *signal_name,
+ GVariant *parameters,
+ gpointer data )
{
- gmpv_media_keys *inst = data;
+ GmpvMediaKeys *self = data;
gchar *gmpv_application = NULL;
gchar *key = NULL;
@@ -100,7 +185,7 @@ static void media_key_press_handler( GDBusProxy *proxy,
if(g_strcmp0(gmpv_application, APP_ID) == 0)
{
- GmpvModel *model = GMPV_APPLICATION(inst->gmpv_ctx)->model;
+ GmpvModel *model = gmpv_controller_get_model(self->controller);
if(g_strcmp0(key, "Next") == 0)
{
@@ -140,17 +225,37 @@ static void proxy_ready_handler( GObject *source_object,
GAsyncResult *res,
gpointer data )
{
- gmpv_media_keys *inst = data;
+ GmpvMediaKeys *self = data;
+
+ self->proxy = g_dbus_proxy_new_finish(res, NULL);
+
+ g_signal_connect( self->proxy,
+ "g-signal",
+ G_CALLBACK(g_signal_handler),
+ self );
+ g_dbus_proxy_call( self->proxy,
+ "GrabMediaPlayerKeys",
+ g_variant_new("(su)", APP_ID, 0),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL,
+ NULL );
+}
- inst->proxy = g_dbus_proxy_new_finish(res, NULL);
+static void compat_proxy_ready_handler( GObject *source_object,
+ GAsyncResult *res,
+ gpointer data )
+{
+ GmpvMediaKeys *self = data;
- inst->g_signal_sig_id
- = g_signal_connect( inst->proxy,
- "g-signal",
- G_CALLBACK(media_key_press_handler),
- inst );
+ self->compat_proxy = g_dbus_proxy_new_finish(res, NULL);
- g_dbus_proxy_call( inst->proxy,
+ g_signal_connect( self->proxy,
+ "g-signal",
+ G_CALLBACK(g_signal_handler),
+ self );
+ g_dbus_proxy_call( self->compat_proxy,
"GrabMediaPlayerKeys",
g_variant_new("(su)", APP_ID, 0),
G_DBUS_CALL_FLAGS_NONE,
@@ -164,9 +269,9 @@ static void session_ready_handler( GObject *source_object,
GAsyncResult *res,
gpointer data )
{
- gmpv_media_keys *inst = data;
+ GmpvMediaKeys *self = data;
- inst->session_bus_conn = g_bus_get_finish(res, NULL);
+ self->session_bus_conn = g_bus_get_finish(res, NULL);
/* The MediaKeys plugin for gnome-settings-daemon <= 3.24.1 used the
* bus name org.gnome.SettingsDaemon despite the documentation stating
@@ -175,7 +280,7 @@ static void session_ready_handler( GObject *source_object,
* documentation. To remain compatible with older versions, create
* proxies for both names.
*/
- g_dbus_proxy_new( inst->session_bus_conn,
+ g_dbus_proxy_new( self->session_bus_conn,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.gnome.SettingsDaemon.MediaKeys",
@@ -183,36 +288,48 @@ static void session_ready_handler( GObject *source_object,
"org.gnome.SettingsDaemon.MediaKeys",
NULL,
proxy_ready_handler,
- inst );
- g_dbus_proxy_new( inst->session_bus_conn,
+ self );
+ g_dbus_proxy_new( self->session_bus_conn,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.gnome.SettingsDaemon",
"/org/gnome/SettingsDaemon/MediaKeys",
"org.gnome.SettingsDaemon.MediaKeys",
NULL,
- proxy_ready_handler,
- inst );
+ compat_proxy_ready_handler,
+ self );
}
-void gmpv_media_keys_init(GmpvApplication *gmpv_ctx)
+static void gmpv_media_keys_init(GmpvMediaKeys *self)
{
- gmpv_media_keys *inst = g_new0(gmpv_media_keys, 1);
- GmpvMainWindow *wnd = gmpv_application_get_main_window(gmpv_ctx);
+ self->controller = NULL;
+ self->focus_sig_id = 0;
+ self->proxy = NULL;
+ self->compat_proxy = NULL;
+ self->session_bus_conn = NULL;
+}
- inst->gmpv_ctx = gmpv_ctx;
+static void gmpv_media_keys_class_init(GmpvMediaKeysClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GParamSpec *pspec = NULL;
- inst->shutdown_sig_id = g_signal_connect
- ( wnd,
- "delete-event",
- G_CALLBACK(delete_handler),
- inst );
+ object_class->constructed = constructed;
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
- inst->focus_sig_id = g_signal_connect
- ( wnd,
- "window-state-event",
- G_CALLBACK(window_state_handler),
- inst );
+ pspec = g_param_spec_pointer
+ ( "controller",
+ "Controller",
+ "The GmpvController to use",
+ G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_CONTROLLER, pspec);
+}
- g_bus_get(G_BUS_TYPE_SESSION, NULL, session_ready_handler, inst);
+GmpvMediaKeys *gmpv_media_keys_new(GmpvController *controller)
+{
+ return GMPV_MEDIA_KEYS(g_object_new( gmpv_media_keys_get_type(),
+ "controller", controller,
+ NULL ));
}
diff --git a/src/media_keys/gmpv_media_keys.h b/src/media_keys/gmpv_media_keys.h
index a34d711..4e7c905 100644
--- a/src/media_keys/gmpv_media_keys.h
+++ b/src/media_keys/gmpv_media_keys.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2016 gnome-mpv
+ * Copyright (c) 2015-2017 gnome-mpv
*
* This file is part of GNOME MPV.
*
@@ -20,23 +20,16 @@
#ifndef MEDIA_KEYS_H
#define MEDIA_KEYS_H
-#include <gio/gio.h>
-#include <glib.h>
+#include "gmpv_controller.h"
-#include "gmpv_application.h"
+G_BEGIN_DECLS
-typedef struct gmpv_media_keys gmpv_media_keys;
+#define GMPV_TYPE_MEDIA_KEYS (gmpv_media_keys_get_type ())
-struct gmpv_media_keys
-{
- GmpvApplication *gmpv_ctx;
- gulong g_signal_sig_id;
- gulong shutdown_sig_id;
- gulong focus_sig_id;
- GDBusProxy *proxy;
- GDBusConnection *session_bus_conn;
-};
+G_DECLARE_FINAL_TYPE(GmpvMediaKeys, gmpv_media_keys, GMPV, MEDIA_KEYS, GObject)
-void gmpv_media_keys_init(GmpvApplication *gmpv_ctx);
+GmpvMediaKeys *gmpv_media_keys_new(GmpvController *controller);
+
+G_END_DECLS
#endif
diff --git a/src/meson.build b/src/meson.build
index d2ee9dd..bfe2eae 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -2,25 +2,27 @@ gnome = import('gnome')
sources = [
'gmpv_application.c',
- 'gmpv_application_action.c',
'gmpv_common.c',
'gmpv_control_box.c',
'gmpv_controller.c',
+ 'gmpv_controller_actions.c',
'gmpv_controller_input.c',
'gmpv_file_chooser.c',
'gmpv_header_bar.c',
'gmpv_main.c',
'gmpv_main_window.c',
'gmpv_menu.c',
+ 'gmpv_metadata_cache.c',
'gmpv_model.c',
'gmpv_mpv.c',
- 'gmpv_mpv_opt.c',
'gmpv_mpv_wrapper.c',
'gmpv_open_location_dialog.c',
+ 'gmpv_player.c',
+ 'gmpv_player_options.c',
'gmpv_playlist_widget.c',
'gmpv_plugins_manager.c',
'gmpv_plugins_manager_item.c',
- 'gmpv_pref_dialog.c',
+ 'gmpv_preferences_dialog.c',
'gmpv_seek_bar.c',
'gmpv_shortcuts_window.c',
'gmpv_video_area.c',
@@ -44,11 +46,6 @@ sources += custom_target('authors',
]
)
-sources += gnome.genmarshal('gmpv_marshal',
- sources: '../data/gmpv_marshal.lst',
- prefix: 'g_cclosure_gen_marshal',
-)
-
libgtk = dependency('gtk+-3.0', version: '>= 3.18')
localedir = join_paths(get_option('prefix'), get_option('localedir'))
cflags = [
@@ -111,6 +108,19 @@ else
includes = include_directories('..')
endif
+generated_marshal_sources = gnome.genmarshal('gmpv_marshal',
+ sources: '../data/gmpv_marshal.lst',
+ prefix: 'g_cclosure_gen_marshal',
+)
+
+# Silence warning about missing prototypes in genmarshal-generated files
+extra_libs += static_library('marshal',
+ generated_marshal_sources,
+ c_args: cflags + ['-Wno-missing-prototypes'],
+ dependencies: libgio,
+ include_directories: include_directories('..')
+)
+
executable('gnome-mpv', sources,
dependencies: [
libgtk,
diff --git a/src/mpris/gmpv_mpris.c b/src/mpris/gmpv_mpris.c
index 78ec1c4..b83b9f3 100644
--- a/src/mpris/gmpv_mpris.c
+++ b/src/mpris/gmpv_mpris.c
@@ -30,32 +30,144 @@
#include "gmpv_mpris_track_list.h"
#include "gmpv_def.h"
+enum
+{
+ PROP_0,
+ PROP_CONTROLLER,
+ N_PROPERTIES
+};
+
+struct _GmpvMpris
+{
+ GObject parent;
+ GmpvController *controller;
+ GmpvMprisModule *base;
+ GmpvMprisModule *player;
+ GmpvMprisModule *track_list;
+ guint name_id;
+ GDBusConnection *session_bus_conn;
+};
+
+struct _GmpvMprisClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE(GmpvMpris, gmpv_mpris, G_TYPE_OBJECT)
+
+static void constructed(GObject *object);
+static void dispose(GObject *object);
+static void set_property( GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec );
+static void get_property( GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec );
static void name_acquired_handler( GDBusConnection *connection,
const gchar *name,
gpointer data );
static void name_lost_handler( GDBusConnection *connection,
const gchar *name,
gpointer data );
-static gboolean shutdown_handler(GtkApplication *app, gpointer data);
-static void unregister(gmpv_mpris *inst);
+static void unregister(GmpvMpris *mpris);
+
+static void constructed(GObject *object)
+{
+ GmpvMpris *self = GMPV_MPRIS(object);
+ gchar *name = NULL;
+
+ /* sizeof(pid_t) can theoretically be larger than sizeof(gint64), but
+ * even then the chance of collision would be minimal.
+ */
+ name = g_strdup_printf
+ ( MPRIS_BUS_NAME ".instance%" G_GINT64_FORMAT,
+ ABS((gint64)getpid()) );
+
+ self->name_id = g_bus_own_name( G_BUS_TYPE_SESSION,
+ name,
+ G_BUS_NAME_OWNER_FLAGS_NONE,
+ NULL,
+ (GBusNameAcquiredCallback)
+ name_acquired_handler,
+ (GBusNameLostCallback)
+ name_lost_handler,
+ self,
+ NULL );
+
+ g_free(name);
+
+ G_OBJECT_CLASS(gmpv_mpris_parent_class)->constructed(object);
+}
+
+static void dispose(GObject *object)
+{
+ GmpvMpris *self = GMPV_MPRIS(object);
+
+ unregister(self);
+ g_clear_object(&self->base);
+ g_clear_object(&self->player);
+ g_clear_object(&self->track_list);
+ g_bus_unown_name(self->name_id);
+
+ G_OBJECT_CLASS(gmpv_mpris_parent_class)->dispose(object);
+}
+
+static void set_property( GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec )
+{
+ GmpvMpris *self = GMPV_MPRIS(object);
+
+ switch(property_id)
+ {
+ case PROP_CONTROLLER:
+ self->controller = g_value_get_pointer(value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+
+}
+
+static void get_property( GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec )
+{
+ GmpvMpris *self = GMPV_MPRIS(object);
+
+ switch(property_id)
+ {
+ case PROP_CONTROLLER:
+ g_value_set_pointer(value, self->controller);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+
+}
static void name_acquired_handler( GDBusConnection *connection,
const gchar *name,
gpointer data )
{
- gmpv_mpris *inst = data;
-
- inst->session_bus_conn = connection;
- inst->base = GMPV_MPRIS_MODULE(gmpv_mpris_base_new( inst->gmpv_ctx,
- connection ));
- inst->player = GMPV_MPRIS_MODULE(gmpv_mpris_player_new( inst->gmpv_ctx,
- connection ));
- inst->track_list = GMPV_MPRIS_MODULE(gmpv_mpris_track_list_new( inst->gmpv_ctx,
- connection ));
-
- gmpv_mpris_module_register_interface(inst->base);
- gmpv_mpris_module_register_interface(inst->player);
- gmpv_mpris_module_register_interface(inst->track_list);
+ GmpvMpris *self = data;
+
+ self->session_bus_conn = connection;
+ self->base = gmpv_mpris_base_new(self->controller, connection);
+ self->player = gmpv_mpris_player_new(self->controller, connection);
+ self->track_list = gmpv_mpris_track_list_new(self->controller, connection);
+
+ gmpv_mpris_module_register(self->base);
+ gmpv_mpris_module_register(self->player);
+ gmpv_mpris_module_register(self->track_list);
}
static void name_lost_handler( GDBusConnection *connection,
@@ -65,24 +177,39 @@ static void name_lost_handler( GDBusConnection *connection,
unregister(data);
}
-static gboolean shutdown_handler(GtkApplication *app, gpointer data)
+static void unregister(GmpvMpris *mpris)
{
- gmpv_mpris *inst = data;
-
- g_signal_handler_disconnect(app, inst->shutdown_sig_id);
-
- unregister(inst);
- g_bus_unown_name(inst->name_id);
- g_free(inst);
+ gmpv_mpris_module_unregister(mpris->base);
+ gmpv_mpris_module_unregister(mpris->player);
+ gmpv_mpris_module_unregister(mpris->track_list);
+}
- return FALSE;
+static void gmpv_mpris_init(GmpvMpris *mpris)
+{
+ mpris->controller = NULL;
+ mpris->base = NULL;
+ mpris->player = NULL;
+ mpris->track_list = NULL;
+ mpris->name_id = 0;
+ mpris->session_bus_conn = NULL;
}
-static void unregister(gmpv_mpris *inst)
+static void gmpv_mpris_class_init(GmpvMprisClass *klass)
{
- gmpv_mpris_module_unregister_interface(inst->base);
- gmpv_mpris_module_unregister_interface(inst->player);
- gmpv_mpris_module_unregister_interface(inst->track_list);
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ GParamSpec *pspec = NULL;
+
+ object_class->constructed = constructed;
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ pspec = g_param_spec_pointer
+ ( "controller",
+ "Controller",
+ "The GmpvController to use",
+ G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
+ g_object_class_install_property(object_class, PROP_CONTROLLER, pspec);
}
GVariant *gmpv_mpris_build_g_variant_string_array(const gchar** list)
@@ -100,43 +227,9 @@ GVariant *gmpv_mpris_build_g_variant_string_array(const gchar** list)
return g_variant_new("as", &builder);
}
-void gmpv_mpris_init(GmpvApplication *gmpv_ctx)
+GmpvMpris *gmpv_mpris_new(GmpvController *controller)
{
- gmpv_mpris *inst;
- gchar *name;
-
- inst = g_malloc(sizeof(gmpv_mpris));
-
- /* sizeof(pid_t) can theoretically be larger than sizeof(gint64), but
- * even then the chance of collision would be minimal.
- */
- name = g_strdup_printf
- ( MPRIS_BUS_NAME ".instance%" G_GINT64_FORMAT,
- ABS((gint64)getpid()) );
-
- inst->gmpv_ctx = gmpv_ctx;
- inst->base = NULL;
- inst->player = NULL;
- inst->track_list = NULL;
- inst->name_id = 0;
- inst->shutdown_sig_id = 0;
- inst->pending_seek = -1;
- inst->session_bus_conn = NULL;
- inst->shutdown_sig_id = g_signal_connect
- ( gmpv_ctx,
- "shutdown",
- G_CALLBACK(shutdown_handler),
- inst );
- inst->name_id = g_bus_own_name( G_BUS_TYPE_SESSION,
- name,
- G_BUS_NAME_OWNER_FLAGS_NONE,
- NULL,
- (GBusNameAcquiredCallback)
- name_acquired_handler,
- (GBusNameLostCallback)
- name_lost_handler,
- inst,
- NULL );
-
- g_free(name);
+ return GMPV_MPRIS(g_object_new( gmpv_mpris_get_type(),
+ "controller", controller,
+ NULL ));
}
diff --git a/src/mpris/gmpv_mpris.h b/src/mpris/gmpv_mpris.h
index d13fecd..9626591 100644
--- a/src/mpris/gmpv_mpris.h
+++ b/src/mpris/gmpv_mpris.h
@@ -23,28 +23,17 @@
#include <gio/gio.h>
#include <glib.h>
-#include "gmpv_application.h"
-#include "gmpv_mpris_module.h"
-
-typedef struct gmpv_mpris gmpv_mpris;
-typedef struct gmpv_mpris_prop gmpv_mpris_prop;
-
-struct gmpv_mpris
-{
- GmpvApplication* gmpv_ctx;
- GmpvMprisModule *base;
- GmpvMprisModule *player;
- GmpvMprisModule *track_list;
- guint name_id;
- guint player_reg_id;
- gulong shutdown_sig_id;
- gulong *player_sig_id_list;
- gdouble pending_seek;
- GHashTable *player_prop_table;
- GDBusConnection *session_bus_conn;
-};
+#include "gmpv_controller.h"
+
+G_BEGIN_DECLS
+
+#define GMPV_TYPE_MPRIS (gmpv_mpris_get_type ())
+
+G_DECLARE_FINAL_TYPE(GmpvMpris, gmpv_mpris, GMPV, MPRIS, GObject)
GVariant *gmpv_mpris_build_g_variant_string_array(const gchar** list);
-void gmpv_mpris_init(GmpvApplication *gmpv_ctx);
+GmpvMpris *gmpv_mpris_new(GmpvController *controller);
+
+G_END_DECLS
#endif
diff --git a/src/mpris/gmpv_mpris_base.c b/src/mpris/gmpv_mpris_base.c
index 30d9f1a..47030b8 100644
--- a/src/mpris/gmpv_mpris_base.c
+++ b/src/mpris/gmpv_mpris_base.c
@@ -23,7 +23,6 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
-#include "gmpv_application_private.h"
#include "gmpv_view.h"
#include "gmpv_mpris.h"
#include "gmpv_mpris_module.h"
@@ -34,7 +33,7 @@
enum
{
PROP_0,
- PROP_APP,
+ PROP_CONTROLLER,
N_PROPERTIES
};
@@ -42,7 +41,7 @@ enum
struct _GmpvMprisBase
{
GmpvMprisModule parent;
- GmpvApplication *app;
+ GmpvController *controller;
guint reg_id;
};
@@ -88,6 +87,7 @@ static gboolean set_prop_handler( GDBusConnection *connection,
static void fullscreen_handler( GObject *object,
GParamSpec *pspec,
gpointer data );
+static void update_fullscreen(GmpvMprisBase *base);
static GVariant *get_supported_uri_schemes(void);
static GVariant *get_supported_mime_types(void);
static void gmpv_mpris_base_class_init(GmpvMprisBaseClass *klass);
@@ -104,7 +104,7 @@ static void register_interface(GmpvMprisModule *module)
GDBusConnection *conn;
base = GMPV_MPRIS_BASE(module);
- view = base->app->view;
+ view = gmpv_controller_get_view(base->controller);
g_object_get(module, "conn", &conn, "iface", &iface, NULL);
@@ -140,6 +140,8 @@ static void register_interface(GmpvMprisModule *module)
module,
NULL,
NULL );
+
+ update_fullscreen(GMPV_MPRIS_BASE(module));
}
static void unregister_interface(GmpvMprisModule *module)
@@ -160,8 +162,8 @@ static void set_property( GObject *object,
switch(property_id)
{
- case PROP_APP:
- self->app = g_value_get_pointer(value);
+ case PROP_CONTROLLER:
+ self->controller = g_value_get_pointer(value);
break;
default:
@@ -179,8 +181,8 @@ static void get_property( GObject *object,
switch(property_id)
{
- case PROP_APP:
- g_value_set_pointer(value, self->app);
+ case PROP_CONTROLLER:
+ g_value_set_pointer(value, self->controller);
break;
default:
@@ -202,11 +204,11 @@ static void method_handler( GDBusConnection *connection,
if(g_strcmp0(method_name, "Raise") == 0)
{
- gmpv_view_present(base->app->view);
+ gmpv_view_present(gmpv_controller_get_view(base->controller));
}
else if(g_strcmp0(method_name, "Quit") == 0)
{
- gmpv_application_quit(base->app);
+ gmpv_controller_quit(base->controller);
}
g_dbus_method_invocation_return_value
@@ -241,8 +243,9 @@ static gboolean set_prop_handler( GDBusConnection *connection,
if(g_strcmp0(property_name, "Fullscreen") == 0)
{
- gmpv_view_set_fullscreen
- (base->app->view, g_variant_get_boolean(value));
+ GmpvView *view = gmpv_controller_get_view(base->controller);
+
+ gmpv_view_set_fullscreen(view, g_variant_get_boolean(value));
}
else
{
@@ -258,21 +261,26 @@ static void fullscreen_handler( GObject *object,
GParamSpec *pspec,
gpointer data )
{
- GmpvMprisModule *module = data;
+ update_fullscreen(data);
+}
+
+static void update_fullscreen(GmpvMprisBase *base)
+{
+ GmpvMprisModule *module = GMPV_MPRIS_MODULE(base);
+ GmpvModel *model = gmpv_controller_get_model(base->controller);
GVariant *old_value = NULL;
gboolean fullscreen = FALSE;
gmpv_mpris_module_get_properties(module, "Fullscreen", &old_value, NULL);
- g_object_get(object, "fullscreen", &fullscreen, NULL);
+ g_object_get(G_OBJECT(model), "fullscreen", &fullscreen, NULL);
if(g_variant_get_boolean(old_value) != fullscreen)
{
gmpv_mpris_module_set_properties
- ( GMPV_MPRIS_MODULE(data),
+ ( module,
"Fullscreen", g_variant_new_boolean(fullscreen),
NULL );
}
-
}
static GVariant *get_supported_uri_schemes(void)
@@ -301,27 +309,28 @@ static void gmpv_mpris_base_class_init(GmpvMprisBaseClass *klass)
object_class->get_property = get_property;
pspec = g_param_spec_pointer
- ( "app",
- "Application",
- "The GmpvApplication to use",
+ ( "controller",
+ "Controller",
+ "The GmpvController to use",
G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
- g_object_class_install_property(object_class, PROP_APP, pspec);
+ g_object_class_install_property(object_class, PROP_CONTROLLER, pspec);
}
static void gmpv_mpris_base_init(GmpvMprisBase *base)
{
- base->app = NULL;
+ base->controller = NULL;
base->reg_id = 0;
}
-GmpvMprisBase *gmpv_mpris_base_new(GmpvApplication *app, GDBusConnection *conn)
+GmpvMprisModule *gmpv_mpris_base_new( GmpvController *controller,
+ GDBusConnection *conn )
{
GDBusInterfaceInfo *iface;
iface = gmpv_mpris_org_mpris_media_player2_interface_info();
- return GMPV_MPRIS_BASE(g_object_new( gmpv_mpris_base_get_type(),
- "app", app,
+ return GMPV_MPRIS_MODULE(g_object_new( gmpv_mpris_base_get_type(),
+ "controller", controller,
"conn", conn,
"iface", iface,
NULL ));
diff --git a/src/mpris/gmpv_mpris_base.h b/src/mpris/gmpv_mpris_base.h
index e898aa9..938ba18 100644
--- a/src/mpris/gmpv_mpris_base.h
+++ b/src/mpris/gmpv_mpris_base.h
@@ -21,13 +21,16 @@
#define MPRIS_BASE_H
#include "gmpv_mpris.h"
+#include "gmpv_mpris_module.h"
+#include "gmpv_controller.h"
G_BEGIN_DECLS
#define GMPV_TYPE_MPRIS_BASE (gmpv_mpris_base_get_type())
G_DECLARE_FINAL_TYPE(GmpvMprisBase, gmpv_mpris_base, GMPV, MPRIS_BASE, GmpvMprisModule)
-GmpvMprisBase *gmpv_mpris_base_new(GmpvApplication *app, GDBusConnection *conn);
+GmpvMprisModule *gmpv_mpris_base_new( GmpvController *controller,
+ GDBusConnection *conn );
G_END_DECLS
diff --git a/src/mpris/gmpv_mpris_module.c b/src/mpris/gmpv_mpris_module.c
index 2fd61dc..cdfe900 100644
--- a/src/mpris/gmpv_mpris_module.c
+++ b/src/mpris/gmpv_mpris_module.c
@@ -58,7 +58,7 @@ static void get_property( GObject *object,
GParamSpec *pspec );
static void dispose(GObject *object);
static void finalize(GObject *object);
-static void disconnect_signal(GmpvSignalHandlerInfo *info);
+static void disconnect_signal(GmpvSignalHandlerInfo *info, gpointer data);
static void gmpv_mpris_module_class_init(GmpvMprisModuleClass *klass);
static void gmpv_mpris_module_init(GmpvMprisModule *module);
@@ -123,7 +123,7 @@ static void dispose(GObject *object)
g_hash_table_unref(priv->prop_table);
- G_OBJECT_GET_CLASS(object)->dispose(object);
+ G_OBJECT_CLASS(gmpv_mpris_module_parent_class)->dispose(object);
}
static void finalize(GObject *object)
@@ -133,12 +133,13 @@ static void finalize(GObject *object)
priv = G_TYPE_INSTANCE_GET_PRIVATE
(object, GMPV_TYPE_MPRIS_MODULE, GmpvMprisModulePrivate);
- g_slist_free_full(priv->signal_ids, (GDestroyNotify)disconnect_signal);
+ g_slist_foreach(priv->signal_ids, (GFunc)disconnect_signal, NULL);
+ g_slist_free_full(priv->signal_ids, g_free);
- G_OBJECT_GET_CLASS(object)->finalize(object);
+ G_OBJECT_CLASS(gmpv_mpris_module_parent_class)->finalize(object);
}
-static void disconnect_signal(GmpvSignalHandlerInfo *info)
+static void disconnect_signal(GmpvSignalHandlerInfo *info, gpointer data)
{
g_signal_handler_disconnect(info->instance, info->id);
}
@@ -281,7 +282,7 @@ void gmpv_mpris_module_set_properties_full( GmpvMprisModule *module,
NULL );
}
-void gmpv_mpris_module_register_interface(GmpvMprisModule *module)
+void gmpv_mpris_module_register(GmpvMprisModule *module)
{
if(module)
{
@@ -295,7 +296,7 @@ void gmpv_mpris_module_register_interface(GmpvMprisModule *module)
}
}
-void gmpv_mpris_module_unregister_interface(GmpvMprisModule *module)
+void gmpv_mpris_module_unregister(GmpvMprisModule *module)
{
if(module)
{
diff --git a/src/mpris/gmpv_mpris_module.h b/src/mpris/gmpv_mpris_module.h
index 6de69d2..168a785 100644
--- a/src/mpris/gmpv_mpris_module.h
+++ b/src/mpris/gmpv_mpris_module.h
@@ -46,8 +46,8 @@ void gmpv_mpris_module_get_properties(GmpvMprisModule *module, ...);
void gmpv_mpris_module_set_properties_full( GmpvMprisModule *module,
gboolean send_new_value,
... );
-void gmpv_mpris_module_register_interface(GmpvMprisModule *module);
-void gmpv_mpris_module_unregister_interface(GmpvMprisModule *module);
+void gmpv_mpris_module_register(GmpvMprisModule *module);
+void gmpv_mpris_module_unregister(GmpvMprisModule *module);
G_END_DECLS
diff --git a/src/mpris/gmpv_mpris_player.c b/src/mpris/gmpv_mpris_player.c
index a6b12e3..d2b2a65 100644
--- a/src/mpris/gmpv_mpris_player.c
+++ b/src/mpris/gmpv_mpris_player.c
@@ -24,7 +24,6 @@
#include <string.h>
#include "gmpv_mpris_player.h"
-#include "gmpv_application_private.h"
#include "gmpv_common.h"
#include "gmpv_main_window.h"
#include "gmpv_mpris.h"
@@ -35,14 +34,14 @@
enum
{
PROP_0,
- PROP_APP,
+ PROP_CONTROLLER,
N_PROPERTIES
};
struct _GmpvMprisPlayer
{
GmpvMprisModule parent;
- GmpvApplication *app;
+ GmpvController *controller;
guint reg_id;
};
@@ -86,8 +85,12 @@ static gboolean set_prop_handler( GDBusConnection *connection,
GVariant *value,
GError **error,
gpointer data );
+
static void update_playback_status(GmpvMprisPlayer *player);
static void update_playlist_state(GmpvMprisPlayer *player);
+static void update_speed(GmpvMprisPlayer *player);
+static void update_metadata(GmpvMprisPlayer *player);
+static void update_volume(GmpvMprisPlayer *player);
static void idle_active_handler( GObject *object,
GParamSpec *pspec,
@@ -120,7 +123,7 @@ G_DEFINE_TYPE(GmpvMprisPlayer, gmpv_mpris_player, GMPV_TYPE_MPRIS_MODULE);
static void register_interface(GmpvMprisModule *module)
{
GmpvMprisPlayer *player = GMPV_MPRIS_PLAYER(module);
- GmpvModel *model = player->app->model;
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
GDBusConnection *conn;
GDBusInterfaceInfo *iface;
GDBusInterfaceVTable vtable;
@@ -204,6 +207,12 @@ static void register_interface(GmpvMprisModule *module)
player,
NULL,
NULL );
+
+ update_playback_status(player);
+ update_playlist_state(player);
+ update_speed(player);
+ update_metadata(player);
+ update_volume(player);
}
static void unregister_interface(GmpvMprisModule *module)
@@ -224,8 +233,8 @@ static void set_property( GObject *object,
switch(property_id)
{
- case PROP_APP:
- self->app = g_value_get_pointer(value);
+ case PROP_CONTROLLER:
+ self->controller = g_value_get_pointer(value);
break;
default:
@@ -243,8 +252,8 @@ static void get_property( GObject *object,
switch(property_id)
{
- case PROP_APP:
- g_value_set_pointer(value, self->app);
+ case PROP_CONTROLLER:
+ g_value_set_pointer(value, self->controller);
break;
default:
@@ -288,11 +297,7 @@ static void append_metadata_tags(GVariantBuilder *builder, GPtrArray *list)
tag_name = tag_map[j].mpv_name?tag_map[j].tag_name:entry->key;
is_array = tag_map[j].mpv_name?tag_map[j].is_array:FALSE;
- if(!is_array)
- {
- tag_value = g_variant_new_string(entry->value);
- }
- else if(is_array)
+ if(is_array)
{
GVariantBuilder tag_builder;
GVariant *elem_value;
@@ -306,6 +311,10 @@ static void append_metadata_tags(GVariantBuilder *builder, GPtrArray *list)
tag_value = g_variant_new("as", &tag_builder);
}
+ else
+ {
+ tag_value = g_variant_new_string(entry->value);
+ }
g_debug("Adding metadata tag \"%s\"", tag_name);
g_variant_builder_add(builder, "{sv}", tag_name, tag_value);
@@ -322,7 +331,7 @@ static void method_handler( GDBusConnection *connection,
gpointer data )
{
GmpvMprisPlayer *player = data;
- GmpvModel *model = player->app->model;
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
if(g_strcmp0(method_name, "Next") == 0)
{
@@ -404,7 +413,7 @@ static GVariant *get_prop_handler( GDBusConnection *connection,
GmpvModel *model;
gdouble position;
- model = player->app->model;
+ model = gmpv_controller_get_model(player->controller);
position = gmpv_model_get_time_position(model);
value = g_variant_new_int64((gint64)(position*1e6));
}
@@ -428,7 +437,7 @@ static gboolean set_prop_handler( GDBusConnection *connection,
gpointer data )
{
GmpvMprisPlayer *player = data;
- GmpvModel *model = player->app->model;
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
if(g_strcmp0(property_name, "Rate") == 0)
{
@@ -452,7 +461,7 @@ static gboolean set_prop_handler( GDBusConnection *connection,
static void update_playback_status(GmpvMprisPlayer *player)
{
- GmpvModel *model = player->app->model;
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
const gchar *state;
gint idle_active;
gint core_idle;
@@ -489,7 +498,7 @@ static void update_playback_status(GmpvMprisPlayer *player)
static void update_playlist_state(GmpvMprisPlayer *player)
{
- GmpvModel *model = player->app->model;
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
gboolean can_prev;
gboolean can_next;
gint64 playlist_count;
@@ -512,53 +521,22 @@ static void update_playlist_state(GmpvMprisPlayer *player)
NULL );
}
-static void idle_active_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- update_playback_status(data);
-}
-
-static void core_idle_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- update_playback_status(data);
-}
-
-static void playlist_pos_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- update_playlist_state(data);
-}
-
-static void playlist_count_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
-{
- update_playlist_state(data);
-}
-
-static void speed_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
+static void update_speed(GmpvMprisPlayer *player)
{
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
gdouble speed = 1.0;
- g_object_get(object, "speed", &speed, NULL);
+ g_object_get(G_OBJECT(model), "speed", &speed, NULL);
- gmpv_mpris_module_set_properties( GMPV_MPRIS_MODULE(data),
+ gmpv_mpris_module_set_properties( GMPV_MPRIS_MODULE(player),
"Rate",
g_variant_new_double(speed),
NULL );
}
-static void metadata_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
+static void update_metadata(GmpvMprisPlayer *player)
{
- GmpvModel *model = GMPV_MODEL(object);
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
GPtrArray *metadata = NULL;
GVariantBuilder builder;
gchar *path;
@@ -569,7 +547,7 @@ static void metadata_handler( GObject *object,
gint64 playlist_pos = 0;
g_variant_builder_init(&builder, G_VARIANT_TYPE("a{sv}"));
- path = gmpv_model_get_current_path(model);
+ path = gmpv_model_get_current_path(model)?:g_strdup("");
uri = g_filename_to_uri(path, NULL, NULL)?:g_strdup(path);
if(uri)
@@ -604,7 +582,7 @@ static void metadata_handler( GObject *object,
append_metadata_tags(&builder, metadata);
- gmpv_mpris_module_set_properties( GMPV_MPRIS_MODULE(data),
+ gmpv_mpris_module_set_properties( GMPV_MPRIS_MODULE(player),
"Metadata",
g_variant_new("a{sv}", &builder),
NULL );
@@ -615,21 +593,69 @@ static void metadata_handler( GObject *object,
g_free(trackid);
}
-static void volume_handler( GObject *object,
- GParamSpec *pspec,
- gpointer data )
+static void update_volume(GmpvMprisPlayer *player)
{
+ GmpvModel *model = gmpv_controller_get_model(player->controller);
gdouble volume = 0.0;
- g_object_get(object, "volume", &volume, NULL);
+ g_object_get(G_OBJECT(model), "volume", &volume, NULL);
gmpv_mpris_module_set_properties
- ( GMPV_MPRIS_MODULE(data),
+ ( GMPV_MPRIS_MODULE(player),
"Volume",
g_variant_new_double(volume/100.0),
NULL );
}
+static void idle_active_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_playback_status(data);
+}
+
+static void core_idle_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_playback_status(data);
+}
+
+static void playlist_pos_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_playlist_state(data);
+}
+
+static void playlist_count_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_playlist_state(data);
+}
+
+static void speed_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_speed(data);
+}
+
+static void metadata_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_metadata(data);
+}
+
+static void volume_handler( GObject *object,
+ GParamSpec *pspec,
+ gpointer data )
+{
+ update_volume(data);
+}
+
static void playback_restart_handler(GmpvModel *model, gpointer data)
{
GDBusConnection *conn;
@@ -665,28 +691,28 @@ static void gmpv_mpris_player_class_init(GmpvMprisPlayerClass *klass)
object_class->get_property = get_property;
pspec = g_param_spec_pointer
- ( "app",
- "Application",
+ ( "controller",
+ "Controller",
"The GmpvApplication to use",
G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
- g_object_class_install_property(object_class, PROP_APP, pspec);
+ g_object_class_install_property(object_class, PROP_CONTROLLER, pspec);
}
static void gmpv_mpris_player_init(GmpvMprisPlayer *player)
{
- player->app = NULL;
+ player->controller = NULL;
player->reg_id = 0;
}
-GmpvMprisPlayer *gmpv_mpris_player_new( GmpvApplication *app,
+GmpvMprisModule *gmpv_mpris_player_new( GmpvController *controller,
GDBusConnection *conn )
{
GDBusInterfaceInfo *iface;
iface = gmpv_mpris_org_mpris_media_player2_player_interface_info();
- return GMPV_MPRIS_PLAYER(g_object_new( gmpv_mpris_player_get_type(),
- "app", app,
+ return GMPV_MPRIS_MODULE(g_object_new( gmpv_mpris_player_get_type(),
+ "controller", controller,
"conn", conn,
"iface", iface,
NULL ));
diff --git a/src/mpris/gmpv_mpris_player.h b/src/mpris/gmpv_mpris_player.h
index e38181f..8b7f8fb 100644
--- a/src/mpris/gmpv_mpris_player.h
+++ b/src/mpris/gmpv_mpris_player.h
@@ -21,13 +21,15 @@
#define MPRIS_PLAYER_H
#include "gmpv_mpris.h"
+#include "gmpv_mpris_module.h"
+#include "gmpv_controller.h"
G_BEGIN_DECLS
#define GMPV_TYPE_MPRIS_PLAYER (gmpv_mpris_player_get_type())
G_DECLARE_FINAL_TYPE(GmpvMprisPlayer, gmpv_mpris_player, GMPV, MPRIS_PLAYER, GmpvMprisModule)
-GmpvMprisPlayer *gmpv_mpris_player_new( GmpvApplication *app,
+GmpvMprisModule *gmpv_mpris_player_new( GmpvController *controller,
GDBusConnection *conn );
G_END_DECLS
diff --git a/src/mpris/gmpv_mpris_track_list.c b/src/mpris/gmpv_mpris_track_list.c
index 732f68b..1c4286d 100644
--- a/src/mpris/gmpv_mpris_track_list.c
+++ b/src/mpris/gmpv_mpris_track_list.c
@@ -27,14 +27,14 @@
enum
{
PROP_0,
- PROP_APP,
+ PROP_CONTROLLER,
N_PROPERTIES
};
struct _GmpvMprisTrackList
{
GmpvMprisModule parent;
- GmpvApplication *app;
+ GmpvController *controller;
guint reg_id;
};
@@ -80,6 +80,8 @@ static gboolean set_prop_handler( GDBusConnection *connection,
static void playlist_handler( GObject *object,
GParamSpec *pspec,
gpointer data );
+static void metadata_update_handler(GmpvModel *model, gint64 pos, gpointer data);
+static void update_playlist(GmpvMprisTrackList *track_list);
static gint64 track_id_to_index(const gchar *track_id);
static GVariant *playlist_entry_to_variant( GmpvPlaylistEntry *entry,
gint64 index );
@@ -93,7 +95,7 @@ G_DEFINE_TYPE(GmpvMprisTrackList, gmpv_mpris_track_list, GMPV_TYPE_MPRIS_MODULE)
static void register_interface(GmpvMprisModule *module)
{
GmpvMprisTrackList *track_list = GMPV_MPRIS_TRACK_LIST(module);
- GmpvModel *model = track_list->app->model;
+ GmpvModel *model = gmpv_controller_get_model(track_list->controller);
GDBusConnection *conn;
GDBusInterfaceInfo *iface;
GDBusInterfaceVTable vtable;
@@ -105,6 +107,11 @@ static void register_interface(GmpvMprisModule *module)
"notify::playlist",
G_CALLBACK(playlist_handler),
module );
+ gmpv_mpris_module_connect_signal( module,
+ model,
+ "metadata-update",
+ G_CALLBACK(metadata_update_handler),
+ module );
gmpv_mpris_module_set_properties
( module,
@@ -124,6 +131,8 @@ static void register_interface(GmpvMprisModule *module)
module,
NULL,
NULL );
+
+ update_playlist(GMPV_MPRIS_TRACK_LIST(module));
}
static void unregister_interface(GmpvMprisModule *module)
@@ -144,8 +153,8 @@ static void set_property( GObject *object,
switch(property_id)
{
- case PROP_APP:
- self->app = g_value_get_pointer(value);
+ case PROP_CONTROLLER:
+ self->controller = g_value_get_pointer(value);
break;
default:
@@ -163,8 +172,8 @@ static void get_property( GObject *object,
switch(property_id)
{
- case PROP_APP:
- g_value_set_pointer(value, self->app);
+ case PROP_CONTROLLER:
+ g_value_set_pointer(value, self->controller);
break;
default:
@@ -182,7 +191,8 @@ static void method_handler( GDBusConnection *connection,
GDBusMethodInvocation *invocation,
gpointer data )
{
- GmpvModel *model = GMPV_MPRIS_TRACK_LIST(data)->app->model;
+ GmpvMprisTrackList *track_list = data;
+ GmpvModel *model = gmpv_controller_get_model(track_list->controller);
GVariant *return_value = NULL;
if(g_strcmp0(method_name, "GetTracksMetadata") == 0)
@@ -290,6 +300,46 @@ static void playlist_handler( GObject *object,
GParamSpec *pspec,
gpointer data )
{
+ update_playlist(data);
+}
+
+static void metadata_update_handler(GmpvModel *model, gint64 pos, gpointer data)
+{
+ GDBusConnection *conn = NULL;
+ GDBusInterfaceInfo *iface = NULL;
+ gchar *track_id = NULL;
+ GVariant *signal_params = NULL;
+ GVariant *metadata = NULL;
+ GPtrArray *playlist = NULL;
+
+ g_object_get( G_OBJECT(data),
+ "conn", &conn,
+ "iface", &iface,
+ NULL );
+ g_object_get(model, "playlist", &playlist, NULL);
+
+ track_id = g_strdup_printf( MPRIS_TRACK_ID_PREFIX
+ "%" G_GINT64_FORMAT,
+ pos );
+ metadata = playlist_entry_to_variant( g_ptr_array_index(playlist, pos),
+ pos );
+ signal_params = g_variant_new("(o at a{sv})", track_id, metadata);
+
+ g_dbus_connection_emit_signal
+ ( conn,
+ NULL,
+ MPRIS_OBJ_ROOT_PATH,
+ iface->name,
+ "TrackMetadataChanged",
+ signal_params,
+ NULL );
+
+ g_free(track_id);
+}
+
+static void update_playlist(GmpvMprisTrackList *track_list)
+{
+ GmpvModel *model = gmpv_controller_get_model(track_list->controller);
gint64 playlist_pos = -1;
guint playlist_count = 0;
GPtrArray *playlist = NULL;
@@ -300,11 +350,11 @@ static void playlist_handler( GObject *object,
GVariant *signal_params = NULL;
GVariantBuilder builder;
- g_object_get( object,
+ g_object_get( G_OBJECT(model),
"playlist-pos", &playlist_pos,
"playlist", &playlist,
NULL );
- g_object_get( data,
+ g_object_get( G_OBJECT(track_list),
"conn", &conn,
"iface", &iface,
NULL );
@@ -320,10 +370,12 @@ static void playlist_handler( GObject *object,
current_track = g_strdup(MPRIS_TRACK_ID_NO_TRACK);
}
- for(gint64 i = 0; i < playlist_count; i++)
+ for( gint64 i = MAX(0, playlist_pos-MPRIS_TRACK_LIST_BEFORE);
+ i < MIN(playlist_count, playlist_pos+MPRIS_TRACK_LIST_AFTER);
+ i++ )
{
- gchar *path = g_strdup_printf( "%s%" G_GINT64_FORMAT,
- MPRIS_TRACK_ID_PREFIX,
+ gchar *path = g_strdup_printf( MPRIS_TRACK_ID_PREFIX
+ "%" G_GINT64_FORMAT,
i );
if(i == playlist_pos)
@@ -340,7 +392,7 @@ static void playlist_handler( GObject *object,
tracks = g_variant_new("ao", (playlist_count > 0)?&builder:NULL);
signal_params = g_variant_new("(@aoo)", tracks, current_track);
- gmpv_mpris_module_set_properties_full( GMPV_MPRIS_MODULE(data),
+ gmpv_mpris_module_set_properties_full( GMPV_MPRIS_MODULE(track_list),
FALSE,
"Tracks", tracks,
NULL );
@@ -472,20 +524,20 @@ static void gmpv_mpris_track_list_class_init(GmpvMprisTrackListClass *klass)
module_class->unregister_interface = unregister_interface;
pspec = g_param_spec_pointer
- ( "app",
- "Application",
- "The GmpvApplication to use",
+ ( "controller",
+ "Controller",
+ "The GmpvController to use",
G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE );
- g_object_class_install_property(object_class, PROP_APP, pspec);
+ g_object_class_install_property(object_class, PROP_CONTROLLER, pspec);
}
static void gmpv_mpris_track_list_init(GmpvMprisTrackList *track_list)
{
- track_list->app = NULL;
+ track_list->controller = NULL;
track_list->reg_id = 0;
}
-GmpvMprisTrackList *gmpv_mpris_track_list_new( GmpvApplication *app,
+GmpvMprisModule *gmpv_mpris_track_list_new( GmpvController *controller,
GDBusConnection *conn )
{
GDBusInterfaceInfo *iface;
@@ -493,11 +545,11 @@ GmpvMprisTrackList *gmpv_mpris_track_list_new( GmpvApplication *app,
iface = gmpv_mpris_org_mpris_media_player2_track_list_interface_info();
object = g_object_new( gmpv_mpris_track_list_get_type(),
- "app", app,
+ "controller", controller,
"conn", conn,
"iface", iface,
NULL );
- return GMPV_MPRIS_TRACK_LIST(object);
+ return GMPV_MPRIS_MODULE(object);
}
diff --git a/src/mpris/gmpv_mpris_track_list.h b/src/mpris/gmpv_mpris_track_list.h
index a35c71a..ed2d355 100644
--- a/src/mpris/gmpv_mpris_track_list.h
+++ b/src/mpris/gmpv_mpris_track_list.h
@@ -22,7 +22,7 @@
#define MPRIS_TRACK_LIST_H
#include "gmpv_mpris_module.h"
-#include "gmpv_application_private.h"
+#include "gmpv_controller.h"
#include <glib-object.h>
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
#define GMPV_TYPE_MPRIS_TRACK_LIST (gmpv_mpris_track_list_get_type())
G_DECLARE_FINAL_TYPE(GmpvMprisTrackList, gmpv_mpris_track_list, GMPV, MPRIS_TRACK_LIST, GmpvMprisModule)
-GmpvMprisTrackList *gmpv_mpris_track_list_new( GmpvApplication *app,
+GmpvMprisModule *gmpv_mpris_track_list_new( GmpvController *controller,
GDBusConnection *conn );
G_END_DECLS
diff --git a/zanata.xml b/zanata.xml
index fbd6457..cc4f00f 100644
--- a/zanata.xml
+++ b/zanata.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<config xmlns="http://zanata.org/namespace/config/">
- <url>https://translate.zanata.org/zanata/</url>
+ <url>https://translate.zanata.org/</url>
<project>gnome-mpv</project>
<project-version>master</project-version>
<project-type>gettext</project-type>
--
gnome-mpv packaging
More information about the pkg-multimedia-commits
mailing list