Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • panel-plugins/xfce4-pulseaudio-plugin
  • bobby285271/xfce4-pulseaudio-plugin
  • sgn/xfce4-pulseaudio-plugin
  • bodqhrohro/xfce4-pulseaudio-plugin
  • correctmost/xfce4-pulseaudio-plugin
  • andrzejr/xfce4-pulseaudio-plugin
  • Zetta1_Reid0/xfce4-pulseaudio-plugin
7 results
Show changes
Commits on Source (800)
......@@ -12,18 +12,29 @@ autom4te.cache/
compile
config.*
configure
configure.ac
depcomp
install-sh
intltool*
libtool
ltmain.sh
m4/
missing
panel-plugin/pulseaudio.desktop
panel-plugin/pulseaudio.desktop.in
po/*.gmo
po/.intltool-merge-cache
po/Makefile.in.in
po/POTFILES
po/stamp-it
stamp-h1
ABOUT-NLS
po/Makevars.template
po/Rules-quot
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sed
po/remove-potcdate.sin
po/stamp-po
po/xfce4-pulseaudio-plugin.pot
xfce4-pulseaudio-plugin-*.tar.bz2
include:
- project: 'xfce/xfce4-dev-tools'
file: '/ci/build_project.yml'
Andrzej Radecki <ndrwrdck@gmail.com>
Andrzej Radecki <andrzejr@xfce.org>
Guido Berhoerster <guido+xfce@berhoerster.name>
Simon Steinbeiss <ochosi@xfce.org>
Steve Dodier-Lazaro <sidi@xfce.org>
Viktor Odintsev <zakhams@gmail.com>
Matthieu Mota <matthieumota@gmail.com>
Sean Davis <bluesabre@xfce.org>
# created with git log --pretty=format:"%ad %h %s %aN <%aE>" --no-merges --date=short
2019-08-11 4a0075b I18n: Update translation nb (100%). Kjell Cato Heskjestad <cato@heskjestad.xyz>
2019-08-03 9f30975 I18n: Update translation gl (100%). Daniel Muñiz Fontoira <dani@damufo.com>
2019-07-26 8623e3f I18n: Add new translation hy_AM (100%). Real School <translator_students@realschool.am>
2019-07-24 2c00f33 I18n: Update translation nb (100%). Kjell Cato Heskjestad <cato@heskjestad.xyz>
2019-07-17 54c04b2 I18n: Update translation fi (100%). Jiri Grönroos <jiri.gronroos@iki.fi>
2019-06-23 2ef8258 I18n: Update translation pt (100%). Hugo Carvalho <hugokarvalho@hotmail.com>
2019-06-18 6e1f5fb I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-06-05 9453d2c I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-05-22 ab29ab3 I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-05-17 97ef904 I18n: Add new translation ie (97%). Anonymous <noreply@xfce.org>
2019-05-17 05eae10 I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-05-16 47d53d4 I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-05-15 a79e535 I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-05-10 41f4285 I18n: Update translation is (100%). Sveinn í Felli <sv1@fellsnet.is>
2019-05-08 8a86047 I18n: Update translation zh_CN (100%). 玉堂白鹤 <yjwork@qq.com>
2019-05-08 538729f I18n: Update translation uk (100%). Yarema aka Knedlyk <yupadmin@gmail.com>
2019-05-08 7d1bd2c I18n: Update translation sl (68%). Xfce Bot <transifex@xfce.org>
2019-05-08 be81a1b I18n: Update translation pl (100%). Anonymous <noreply@xfce.org>
2019-05-08 58bf8f4 I18n: Update translation oc (60%). Xfce Bot <transifex@xfce.org>
2019-05-08 d36dccd I18n: Update translation lt (100%). Anonymous <noreply@xfce.org>
2019-05-08 6319adf I18n: Update translation kk (100%). Baurzhan Muftakhidinov <baurthefirst@gmail.com>
2019-05-08 6668f1d I18n: Update translation it (100%). Emanuele Petriglia <transifex@emanuelepetriglia.com>
2019-05-08 27a5baa I18n: Update translation id (74%). Xfce Bot <transifex@xfce.org>
2019-05-08 1e9a1a9 I18n: Update translation he (100%). Elishai Eliyahu <e1907@mm.st>
2019-05-08 e55d2ce I18n: Update translation ga (77%). Xfce Bot <transifex@xfce.org>
2019-05-08 9a9466a I18n: Update translation fr (100%). Charles Monzat <c.monzat@laposte.net>
2019-05-08 9775d99 I18n: Update translation eu (100%). Anonymous <noreply@xfce.org>
2019-05-08 246dde5 I18n: Update translation en_AU (100%). John Humphrys <john.humphrys@pm.me>
2019-05-08 08bc334 I18n: Update translation cs (100%). Michal Várady <miko.vaji@gmail.com>
2019-05-08 57a36d5 I18n: Update translation bg (100%). Kiril Kirilov <cybercop_montana@abv.bg>
2019-05-04 2934b7d I18n: Update translation da (100%). Anonymous <noreply@xfce.org>
2019-01-28 50f3f86 I18n: Add new translation eu (100%). beriain <beriain@bitmessage.ch>
2018-12-03 1be44c1 I18n: Update translation is (100%). Sveinn í Felli <sv1@fellsnet.is>
2018-12-03 41c9ba4 I18n: Update translation fi (100%). Anonymous <noreply@xfce.org>
2018-11-19 2e4bc8a I18n: Update translation sk (100%). Dušan Kazik <prescott66@gmail.com>
2018-11-06 97438d4 I18n: Update translation is (77%). Sveinn í Felli <sv1@fellsnet.is>
2018-10-21 83191de I18n: Update translation ca (100%). Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>
2018-09-04 2c2eb0c Preferences: Improve spacing Sean Davis <smd.seandavis@gmail.com>
2018-07-16 2e3abbf I18n: Update translation zh_TW (100%). Hsiu-Ming Chang <cges30901@gmail.com>
2018-07-16 1f67471 I18n: Update translation fi (97%). Anonymous <noreply@xfce.org>
2018-07-13 42e39c4 I18n: Update translation gl (100%). Anonymous <noreply@xfce.org>
2018-07-12 82a9065 I18n: Update translation it (100%). Emanuele Petriglia <inbox@emanuelepetriglia.me>
2018-07-11 c5c5140 I18n: Update translation it (100%). Emanuele Petriglia <inbox@emanuelepetriglia.me>
2018-06-30 5b33082 I18n: Update translation pt (100%). Alexandre Fidalgo <alexandremagnos15@gmail.com>
2018-06-29 dfa942a I18n: Update translation pt (100%). Alexandre Fidalgo <alexandremagnos15@gmail.com>
2018-06-24 b65310b I18n: Add new translation be (100%). Zmicer Turok <zmicerturok@gmail.com>
2018-06-16 3092872 I18n: Update translation th (100%). Theppitak Karoonboonyanan <theppitak@gmail.com>
2018-05-26 7c02cb2 I18n: Update translation ko (100%). Seong-ho Cho <darkcircle.0426@gmail.com>
2018-05-17 4e078d6 I18n: Update translation pt_BR (100%). Michael Martins <michaelfm21@gmail.com>
2018-05-16 60d4094 I18n: Add new translation fi (88%). Anonymous <noreply@xfce.org>
2018-05-01 41ebe11 I18n: Update translation de (100%). Vinzenz Vietzke <vinz@vinzv.de>
2018-04-29 64cf259 I18n: Update translation hu (100%). Balázs Meskó <meskobalazs@gmail.com>
2018-04-29 cf8b82e I18n: Update translation hu (74%). Balázs Meskó <meskobalazs@gmail.com>
2018-04-11 32dac4c Back to development Sean Davis <smd.seandavis@gmail.com>
2018-04-11 66231b3 Update for release Sean Davis <smd.seandavis@gmail.com>
2018-04-06 db2e9b5 I18n: Update translation en_AU (100%). John Humphrys <john.humphrys@protonmail.com>
2018-04-04 de965d8 I18n: Update translation ja (100%). Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-04-01 cd0f140 I18n: Update translation el (100%). Anonymous <noreply@xfce.org>
2018-03-31 8cb6817 I18n: Update translation it (100%). Emanuele Petriglia <inbox@emanuelepetriglia.me>
2018-03-23 295e3b1 I18n: Update translation uk (100%). Yarema aka Knedlyk <yupadmin@gmail.com>
2018-03-19 38295e1 Back to development Sean Davis <smd.seandavis@gmail.com>
2018-03-19 06b74ca Update for release Sean Davis <smd.seandavis@gmail.com>
2018-03-19 1e1166e Use correct player names and icons in the preferences dialog Sean Davis <smd.seandavis@gmail.com>
2018-03-19 266d1f4 I18n: Update translation pt (100%). José Vieira <jvieira33@sapo.pt>
2018-03-19 c08b3e0 I18n: Update translation pt (91%). José Vieira <jvieira33@sapo.pt>
......@@ -492,4 +554,4 @@
2014-04-30 ba7ea62 Use a common callback for volume and mute change notifications Andrzej <ndrwrdck@gmail.com>
2014-04-26 5a6bb47 Added support for muting output devices Andrzej <ndrwrdck@gmail.com>
2014-04-25 674ebf1 Use the same icon names and sizes as in xfce4-mixer Andrzej <ndrwrdck@gmail.com>
2014-04-24 6d5680f Initial version Andrzej <ndrwrdck@gmail.com>
2014-04-24 6d5680f Initial version Andrzej <ndrwrdck@gmail.com>
\ No newline at end of file
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = \
icons \
panel-plugin \
po
EXTRA_DIST = \
meson.build \
meson_options.txt \
po/meson.build \
xfce-revision.h.in \
$(NULL)
distclean-local:
rm -rf *.cache *~
distuninstallcheck_listfiles = \
find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache
rpm: dist
rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
@rm -f $(PACKAGE)-$(VERSION).tar.gz
EXTRA_DIST = \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
0.4.9 (2024-12-05)
=====
- I18n: Update po/LINGUAS list
- Fix numerous pa_operation leaks
- Fix leaks from the plug-in constructor
- Fix leaks in pulseaudio_volume_connect
- Fix leak with notify_get_server_caps
- build: Require libxfce4windowing 4.19.6
- Use new xfw_window_activate() signature in libwindowing 4.19.6
- build: Use XDT_VERSION_INIT and get rid of configure.ac.in
- I18n: Update po/LINGUAS list
- I18n: Update po/LINGUAS list
- build: Get rid of intltool
- desktop: Generate from desktop.in instead desktop.in.in
- Unconditionally require gio-2.0, gio-unix-2.0
- Properly guard X11 code paths and fix X11 requirements
- Translation Updates:
Albanian, Arabic, Armenian (Armenia), Basque, Belarusian, Bulgarian,
Catalan, Chinese (China), Chinese (Taiwan), Croatian, Czech, Danish,
Dutch, Eastern Armenian, English (Australia), English (Canada),
English (United Kingdom), Estonian, Finnish, French, Galician,
German, Greek, Hebrew, Hungarian, Icelandic, Indonesian, Interlingue,
Irish, Italian, Japanese, Kazakh, Korean, Lithuanian, Malay,
Norwegian Bokmål, Occitan (post 1500), Polish, Portuguese,
Portuguese (Brazil), Russian, Serbian, Slovak, Slovenian, Spanish,
Swedish, Thai, Ukrainian
0.4.8 (2023-10-01)
=====
- MPRIS: Use D-Bus name for identifying players
- Fix possible context menu crash with MPRIS playlist
- Add option to make mic icon persistent
- Check for mic widget visibility
- Preserve channel balance when changing sink/source volume
- MPRIS: Add option to send multimedia keys to all players
- MPRIS: Fix default controlled player by multimedia keys
- Remove dead code
- Translation Updates:
Albanian, Bulgarian, Catalan, Chinese (China), Chinese (Taiwan),
Danish, Dutch, English (United Kingdom), French, German, Greek,
Italian, Japanese, Korean, Lithuanian, Norwegian Bokmål, Polish,
Portuguese, Portuguese (Brazil), Russian, Serbian, Slovenian,
Swedish, Ukrainian
0.4.7 (2023-06-01)
=====
- Fix crash when D-Bus connection is lost before it's connected
- Fix copyright info
- MPRIS: Control recently open/used player using multimedia keys
- Deduplicate key binding code
- Bind all possible keys
- Update about authors
- MPRIS: Remove old settings when clearing known players
- MPRIS: Ignore multimedia keys for blacklisted players
- MPRIS: Add possibility to hide inactive players, improve config
storage
- MPRIS: Remove pulseaudio_mpris_player_can_launch function
- MPRIS: Fix memory leak in player finalize
- MPRIS: Remove unused pulseaudio_mpris_player_is_equal function
- MPRIS: Refactor player connection lost and finalize
- MPRIS: Deduplicate find_desktop_entry function
- MPRIS: Make pulseaudio_mpris_get_available_players static
- MPRIS: Check for filename before launching the player
- Improve connection/disconnection with server
- Menu: Don't clear structure, it's not needed
- MPRIS: Reduce player_is_usable timeout to 5 sec
- MPRIS: Memory management fixes
- MPRIS: Don't initialize struct members, GLib is doing it
- MPRIS: Micro-optimization
- MPRIS: Check for is_playing in set_can_play function
- Subscribe NameOwnerChanged to watch MPRIS changes instead of timer
- Fix removing blacklisted MPRIS players from config
- Improve run mixer button sensitivity
- Display default device name in tooltip
- Don't set has-tooltip property twice
- Don't show recording indicator for non-default monitors
- Make run mixer button sensitive for any path
- Show unplugged devices as insensitive
- Don't show rec icon if the source output doesn't belong to any client
- Don't show recording indicator when it's not connected to the source
- Fix mistake in comment
- Don't reset recording value in callback
- Allow maximum volume configuration in dialog
- Improve volume step size text
- Translation Updates:
Albanian, Arabic, Armenian (Armenia), Basque, Belarusian, Bulgarian,
Catalan, Chinese (China), Chinese (Taiwan), Croatian, Czech, Danish,
Dutch, Eastern Armenian, English (Australia), English (Canada),
English (United Kingdom), Finnish, French, Galician, German, Greek,
Hebrew, Hungarian, Icelandic, Indonesian, Interlingue, Irish,
Italian, Japanese, Kazakh, Korean, Lithuanian, Malay, Norwegian
Bokmål, Occitan (post 1500), Polish, Portuguese, Portuguese
(Brazil), Russian, Serbian, Slovak, Slovenian, Spanish, Swedish,
Thai, Ukrainian
0.4.6 (2023-03-28)
=====
- Update copyright year
- Fix changing default sink and source devices
- Fix flickering mic icon when recording application is connected
- Avoid critical from xfce4-notifyd if gauge_value > 100
- Display maximum volume of all channels instead of volume of left
channel
- Add recording base volume indicator
- Control mic volume/mute when mouse cursor is over the mic icon
- Lower warning level
- Improve volume notifications settings
- Show volume notifications from hotkeys according to comment
- Don't set negative volume from hotkeys
- Use correct variable for "volume-mic-changed" signal ID
- Don't force set the default device
- Set recording icon according to recording volume level
- Show source monitor if it is a default source
- Check for recording state on context ready
- Allow volume step configuration in dialog (Fixes #28)
- wnck: Add missing LIBS/CFLAGS in Makefile
- wnck: Use Libxfce4windowing when available
- wnck: Guard X11 code path to prevent crash on Wayland
- wnck: Improve RaiseWnck a bit
- Fix memory leak
- cleanup: Fix formatting
- Fix blurry media player icon from file when UI scale > 1
- Fix blurry icons in prefs dialog when UI scale factor > 1
- Use "logo-icon-name" instead of "logo" in about dialog
- Do not override fatal log level
- build: Bump GLib minimum required to 2.44
- Translation Updates:
Albanian, Arabic, Armenian (Armenia), Basque, Belarusian, Bulgarian,
Catalan, Chinese (China), Chinese (Taiwan), Croatian, Czech, Danish,
Dutch, Eastern Armenian, English (Australia), English (Canada),
Finnish, French, Galician, German, Greek, Hebrew, Hungarian,
Icelandic, Indonesian, Interlingue, Irish, Italian, Japanese, Kazakh,
Korean, Lithuanian, Malay, Norwegian Bokmål, Occitan (post 1500),
Polish, Portuguese, Portuguese (Brazil), Russian, Serbian, Slovak,
Slovenian, Spanish, Swedish, Thai, Ukrainian
0.4.5
======
- Use Source Output Info for recording indicator
to reduce flickering (#81) and
to hide it with pavucontrol (#80)
- Display notification on mic volume changes (Fixes #42)
- Fix accidental toggling of the mute switch (Fixes #64)
- Show notification even when volume is already at max/min (Fixes #52)
- Optionally play system sound on volume changes (Fixes #4)
(requires libcanberra)
- Fix menu position when panel autohide is enabled
(requires libxfce4panel >= 4.17.2)
- Fix compilation with gcc 10
- about: Bump copyright year
- Fix typos
- Translation Updates:
Albanian, Armenian (Armenia), Basque, Belarusian, Bulgarian, Catalan,
Chinese (China), Chinese (Taiwan), Croatian, Czech, Danish, Dutch,
Eastern Armenian, English (Canada), French, Galician, German, Greek,
Hebrew, Hungarian, Indonesian, Irish, Italian, Japanese, Kazakh,
Korean, Lithuanian, Malay, Norwegian Bokmål, Polish, Portuguese,
Portuguese (Brazil), Russian, Serbian, Slovak, Slovenian, Spanish,
Swedish, Thai, Ukrainian
0.4.4
======
- Add a recording indicator
- Filter out multiple button press events
- Bump urls
- Fix make distcheck
- autoconf: AC_OUTPUT -> AC_CONFIG_FILES + AC_OUTPUT
- Update `.gitignore`
- Create new README.md. Update configure.ac.in
- Add basic GitLab pipeline
- Translation Updates:
Albanian, Arabic, Armenian (Armenia), Basque, Belarusian, Bulgarian,
Catalan, Chinese (China), Chinese (Taiwan), Croatian, Czech, Danish,
Dutch, Eastern Armenian, English (Australia), English (Canada),
Finnish, French, Galician, German, Greek, Hebrew, Hungarian,
Icelandic, Indonesian, Interlingue, Irish, Italian, Japanese, Kazakh,
Korean, Lithuanian, Malay, Norwegian Bokmål, Occitan (post 1500),
Polish, Portuguese, Portuguese (Brazil), Russian, Serbian, Slovak,
Slovenian, Spanish, Swedish, Thai, Turkish, Ukrainian
0.4.3
=====
- Build now requires exo-2 0.11 or newer
- Fixed various memory leaks and warnings
- Removed unused dbus-glib include (Xfce #15343)
- Replaced g_type_class_add_private deprecations
- Updated copyright years
- Updated URLs from goodies.x.o to docs.x.o (Xfce #16173)
- MPRIS: Added support for filename icons (Xfce #14329)
- MPRIS: Added support for single-string variants on xesam:artist
- MPRIS: Added support for the DesktopEntry property (Xfce #14412)
- MPRIS: Added support for the plasma-browser-integration plugin (Xfce #15487)
- MPRIS: Added title/artist conditioning from the track title
- Preferences: Fixed icon rendering known players
- Translation Updates:
Albanian, Belarusian, Chinese (Taiwan), Galician, Interlingue, Slovenian
0.4.2
=====
- Preferences: Improve spacing
- Translation Updates:
Basque, Bulgarian, Catalan, Chinese (China), Chinese (Taiwan), Czech,
Danish, English (Australia), Finnish, French, Galician, German, Hebrew,
Hungarian, Icelandic, Indonesian, Irish, Italian, Kazakh, Korean,
Lithuanian, Norwegian Bokmål, Occitan (post 1500), Polish, Portuguese,
Portuguese (Brazil), Slovak, Slovenian, Thai, Ukrainian
0.4.1
=====
Stable Translations Release.
- Translation Updates: English (Australia), Greek, Italian, Japanese,
Ukrainian
0.4.0
=====
......
Xfce PulseAudio Panel Plugin
============================
The Xfce PulseAudio Plugin is a plugin for the Xfce panel which provides a
convenient way to adjust the audio volume of the [PulseAudio sound system][1]
and to an auto mixer tool like pavucontrol. It can optionally handle
multimedia keys for controlling the audio volume.
See the file INSTALL for detailed instructions on how to build and install
Xfce PulseAudio Plugin.
[1]: http://www.freedesktop.org/wiki/Software/PulseAudio/ "PulseAudio Website"
[![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/blob/master/COPYING)
# xfce4-pulseaudio-plugin
The Xfce PulseAudio Plugin is a plugin for the Xfce panel which provides a
convenient way to adjust the audio volume of the [PulseAudio sound system](http://www.freedesktop.org/wiki/Software/PulseAudio/) and to an auto mixer tool like pavucontrol.
It can optionally handle multimedia keys for controlling the audio volume.
----
### Homepage
[Xfce4-pulseaudio-plugin documentation](https://docs.xfce.org/panel-plugins/xfce4-pulseaudio-plugin)
### Changelog
See [NEWS](https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/blob/master/NEWS) for details on changes and fixes made in the current release.
### Source Code Repository
[Xfce4-pulseaudio-plugin source code](https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin)
### Download a Release Tarball
[Xfce4-pulseaudio-plugin archive](https://archive.xfce.org/src/panel-plugins/xfce4-pulseaudio-plugin)
or
[Xfce4-pulseaudio-plugin tags](https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/tags)
### Installation
From source code repository:
% cd xfce4-pulseaudio-plugin
% ./autogen.sh
% make
% make install
From release tarball:
% tar xf xfce4-pulseaudio-plugin-<version>.tar.bz2
% cd xfce4-pulseaudio-plugin-<version>
% ./configure
% make
% make install
See the file [INSTALL](https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/blob/master/INSTALL) for detailed instructions on how to build and install Xfce PulseAudio Plugin.
### Reporting Bugs
Visit the [reporting bugs](https://docs.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/bugs) page to view currently open bug reports and instructions on reporting new bugs or submitting bugfixes.
......@@ -2,7 +2,7 @@
#
# $Id: autogen.sh 2398 2007-01-17 17:47:38Z nick $
#
# Copyright (c) 2002-2007
# Copyright (c) 2002-2020
# The Xfce development team. All rights reserved.
#
......@@ -16,4 +16,4 @@ EOF
exit 1
}
XDT_AUTOGEN_REQUIRED_VERSION="4.7.3" exec xdt-autogen $@
XDT_AUTOGEN_REQUIRED_VERSION="4.19.0" exec xdt-autogen $@
......@@ -6,29 +6,29 @@ dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([pulseaudio_version_major], [0])
m4_define([pulseaudio_version_minor], [4])
m4_define([pulseaudio_version_micro], [0])
m4_define([pulseaudio_version_nano], []) dnl leave this empty to have no nano version
m4_define([pulseaudio_version_build], [@REVISION@])
m4_define([pulseaudio_version_tag], [git])
m4_define([pulseaudio_version], [pulseaudio_version_major().pulseaudio_version_minor().pulseaudio_version_micro()ifelse(pulseaudio_version_nano(), [], [], [.pulseaudio_version_nano()])ifelse(pulseaudio_version_tag(), [git], [pulseaudio_version_tag()-pulseaudio_version_build()], [pulseaudio_version_tag()])])
m4_define([copyright_year], [2025])
XDT_VERSION_INIT([0.4.9], [git])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2014
AC_COPYRIGHT([Copyright (c) 2014-copyright_year()
The Xfce development team. All rights reserved.])
AC_INIT([xfce4-pulseaudio-plugin], [pulseaudio_version], [http://bugzilla.xfce.org/], [xfce4-pulseaudio-plugin])
AC_PREREQ([2.50])
AC_INIT([xfce4-pulseaudio-plugin], [xdt_version], [https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin], [xfce4-pulseaudio-plugin])
AC_PREREQ([2.69])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_TARGET()
AC_REVISION([@REVISION@])
AC_REVISION([xdt_version_build])
AC_CONFIG_MACRO_DIRS([m4])
AC_DEFINE([VERSION_FULL], [PACKAGE_VERSION], [Alias for VERSION and PACKAGE_VERSION for meson compatibility])
COPYRIGHT_YEAR=copyright_year()
AC_DEFINE_UNQUOTED([COPYRIGHT_YEAR], ["$COPYRIGHT_YEAR"], [Copyright year])
AC_SUBST([COPYRIGHT_YEAR])
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar foreign])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
......@@ -36,9 +36,8 @@ dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_LD()
LT_PATH_LD([])
AC_PROG_INSTALL()
IT_PROG_INTLTOOL([0.35.0])
dnl **************************
dnl *** Initialize libtool ***
......@@ -60,12 +59,11 @@ AC_CHECK_FUNCS([])
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
dnl *******************************
dnl *** Check for X11 installed ***
dnl *******************************
XDT_CHECK_LIBX11_REQUIRE()
GETTEXT_PACKAGE="$PACKAGE"
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
AC_SUBST([GETTEXT_PACKAGE])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
dnl ***********************************
dnl *** Check for required packages ***
......@@ -76,13 +74,16 @@ AC_DEFINE([LIBXFCE4PANEL_VERSION_API], "libxfce4panel_version_api()", [libxfce4p
AC_SUBST([LIBXFCE4PANEL_VERSION_API])
XDT_CHECK_PACKAGE([PULSEAUDIO], [libpulse-mainloop-glib], [0.9.19])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.42.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.20.0])
dnl XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.11.0])
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-${LIBXFCE4PANEL_VERSION_API}], [4.11.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.50.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.50.0])
XDT_CHECK_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.50.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0])
XDT_CHECK_PACKAGE([EXO], [exo-2], [4.16.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.16.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.16.0])
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-${LIBXFCE4PANEL_VERSION_API}], [4.16.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.16.0])
XDT_CHECK_PACKAGE_BINARY([GLIB_COMPILE_RESOURCES], [gio-2.0], [glib_compile_resources], [glib-compile-resources])
dnl **********************************
dnl *** Optional keybinder Support ***
......@@ -96,25 +97,36 @@ dnl **********************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.7.0], [libnotify],
[libnotify library])
AC_CHECK_LIBM
dnl ************************************
dnl *** Optional libcanberra Support ***
dnl ************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBCANBERRA], [libcanberra], [0.30], [libcanberra],
[libcanberra library])
LT_LIB_M
AC_SUBST(LIBM)
dnl *******************************
dnl *** Optional MPRIS2 Support ***
dnl *******************************
XDT_CHECK_OPTIONAL_PACKAGE([MPRIS2], [gio-2.0], [2.42], [mpris2],
[mpris2 support])
dnl ********************************************
dnl *** Optional (experimental) WNCK Support ***
dnl ********************************************
XDT_CHECK_OPTIONAL_PACKAGE([WNCK], [libwnck-3.0], [3.20], [wnck],
[wnck support])
AC_ARG_ENABLE([mpris2],
[AS_HELP_STRING([--disable-mpris2],
[Do not build MPRIS2 support])],
[enable_mpris2=$enableval], [enable_mpris2=yes])
if test x"$enable_mpris2" != x"no"; then
AC_DEFINE([HAVE_MPRIS2], [1], [Define to enable MPRIS2 support])
fi
dnl *********************************************************
dnl *** Optional (experimental) Libxfce4windowing Support ***
dnl *********************************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4WINDOWING], [libxfce4windowing-0], [4.19.6], [libxfce4windowing],
[Libxfce4windowing support])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG()
XDT_FEATURE_DEBUG([xdt_debug_default])
dnl *****************************
dnl *** Default mixer command ***
......@@ -138,9 +150,10 @@ AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])
AC_OUTPUT([
AC_CONFIG_FILES([
Makefile
icons/Makefile
icons/32x32/Makefile
icons/48x48/Makefile
icons/scalable/Makefile
icons/scalable/apps/Makefile
......@@ -149,6 +162,7 @@ panel-plugin/Makefile
panel-plugin/pulseaudio.desktop.in
po/Makefile.in
])
AC_OUTPUT
dnl ***************************
dnl *** Print configuration ***
......@@ -159,7 +173,8 @@ echo
echo "* Debug Support: $enable_debug"
echo "* Use keybinder: ${KEYBINDER_FOUND:-no}"
echo "* Use libnotify: ${LIBNOTIFY_FOUND:-no}"
echo "* Use MPRIS2: ${MPRIS2_FOUND:-no}"
echo "* Experimenal libwnck support: ${WNCK_FOUND:-no}"
echo "* Use libcanberra: ${LIBCANBERRA_FOUND:-no}"
echo "* Use MPRIS2: $enable_mpris2"
echo "* Libxfce4windowing support: ${LIBXFCE4WINDOWING_FOUND:-no}"
echo "* Default Mixer command: $DEFAULT_MIXER_COMMAND"
echo
# $Id: Makefile.am 2257 2006-12-19 19:49:00Z nick $
SUBDIRS = \
32x32 \
48x48 \
scalable
EXTRA_DIST = \
meson.build \
$(NULL)
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
install-data-hook:
......
sizes = [32, 48]
foreach size : sizes
install_data(
'@0@x@0@'.format(size) / 'xfce4-pulseaudio-plugin.png',
install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / '@0@x@0@'.format(size) / 'apps',
)
endforeach
install_data(
'scalable' / 'apps' / 'xfce4-pulseaudio-plugin.svg',
install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps',
)
scalable_status_names = [
'audio-volume-high-symbolic',
'audio-volume-low-symbolic',
'audio-volume-medium-symbolic',
'audio-volume-muted-symbolic',
'microphone-sensitivity-high-symbolic',
'microphone-sensitivity-low-symbolic',
'microphone-sensitivity-medium-symbolic',
'microphone-sensitivity-muted-symbolic',
]
foreach name : scalable_status_names
install_data(
'scalable' / 'status' / '@0@.svg'.format(name),
install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'status',
)
endforeach
project(
'xfce4-pulseaudio-plugin',
'c',
version: '0.4.9-dev',
license: 'GPL-2.0-or-later',
meson_version: '>= 0.54.0',
default_options: [
'c_std=gnu11',
'buildtype=debugoptimized',
'warning_level=2',
]
)
project_namespace = 'panel-plugins'
pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
copyright_year = '2025'
cc = meson.get_compiler('c')
pkgconfig = import('pkgconfig')
gnome = import('gnome')
i18n = import('i18n')
dependency_versions = {
'glib': '>= 2.50.0',
'gtk': '>= 3.22.0',
'xfce4': '>= 4.16.0',
'pulseaudio': '>= 0.9.19',
'keybinder': '>= 0.2.2',
'libnotify': '>= 0.7.0',
'libcanberra': '>= 0.30',
'libxfce4windowing': '>= 4.19.6',
}
glib = dependency('glib-2.0', version: dependency_versions['glib'])
gio = dependency('gio-2.0', version: dependency_versions['glib'])
gio_unix = dependency('gio-unix-2.0', version: dependency_versions['glib'])
gtk = dependency('gtk+-3.0', version: dependency_versions['gtk'])
libxfce4ui = dependency('libxfce4ui-2', version: dependency_versions['xfce4'])
if libxfce4ui.version().version_compare('< 4.21.0')
exo = dependency('exo-2', version: dependency_versions['xfce4'])
else
exo = dependency('', required: false)
endif
libxfce4util = dependency('libxfce4util-1.0', version: dependency_versions['xfce4'])
libxfce4panel = dependency('libxfce4panel-2.0', version: dependency_versions['xfce4'])
xfconf = dependency('libxfconf-0', version: dependency_versions['xfce4'])
pulseaudio = dependency('libpulse-mainloop-glib', version: dependency_versions['pulseaudio'])
keybinder = dependency('keybinder-3.0', version: dependency_versions['keybinder'], required: get_option('keybinder'))
libnotify = dependency('libnotify', version: dependency_versions['libnotify'], required: get_option('libnotify'))
libcanberra = dependency('libcanberra', version: dependency_versions['libcanberra'], required: get_option('libcanberra'))
libxfce4windowing = dependency('libxfce4windowing-0', version: dependency_versions['libxfce4windowing'], required: get_option('libxfce4windowing'))
libm = cc.find_library('m')
feature_cflags = []
if keybinder.found()
feature_cflags += '-DHAVE_KEYBINDER=1'
endif
if libnotify.found()
feature_cflags += '-DHAVE_LIBNOTIFY=1'
endif
if libcanberra.found()
feature_cflags += '-DHAVE_LIBCANBERRA=1'
endif
if libxfce4windowing.found()
feature_cflags += '-DHAVE_LIBXFCE4WINDOWING=1'
endif
if not get_option('mpris2').disabled()
feature_cflags += '-DHAVE_MPRIS2=1'
endif
headers = [
'math.h',
'strings.h',
]
foreach header : headers
if cc.check_header(header)
feature_cflags += '-DHAVE_@0@=1'.format(header.underscorify().to_upper())
endif
endforeach
extra_cflags = []
extra_cflags_check = [
'-Wmissing-declarations',
'-Wmissing-noreturn',
'-Wold-style-definition',
'-Wredundant-decls',
'-Wpointer-arith',
'-Wcast-align',
'-Winit-self',
'-Wshadow',
'-Wmissing-include-dirs',
'-Wundef',
'-Wformat',
'-Wformat-security',
'-Wformat-y2k',
'-Wnested-externs',
'-Wno-unused-parameter',
'-Wno-declaration-after-statement',
'-Wno-missing-field-initializers',
'-Werror=implicit-function-declaration',
'-Wno-error=deprecated-declarations',
]
optimization = get_option('optimization')
if get_option('debug') and optimization in ['0', 'g']
extra_cflags_check += '-fstack-protector-strong'
extra_cflags += [
'-DDEBUG=1',
'-DDEBUG_TRACE=1',
'-DG_ENABLE_DEBUG',
]
elif optimization in ['3', 'minsize']
extra_cflags += [
'-DNDEBUG',
'-DG_DISABLE_CAST_CHECKS',
'-DG_DISABLE_ASSERT',
]
endif
if dependency_versions.has_key('glib')
glib_version_parts = dependency_versions['glib'].split(' ')
glib_min_version_parts = glib_version_parts[1].split('.')
glib_min_version_define = 'GLIB_VERSION_@0@_@1@'.format(glib_min_version_parts[0], glib_min_version_parts[1])
extra_cflags += [
'-DGLIB_VERSION_MIN_REQUIRED=@0@'.format(glib_min_version_define),
'-DGLIB_VERSION_MAX_ALLOWED=@0@'.format(glib_min_version_define),
'-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
'-DG_LOG_USE_STRUCTURED=1',
]
endif
version_parts = meson.project_version().split('-dev')[0].split('.')
version_short = '@0@.@1@'.format(version_parts[0], version_parts[1])
extra_cflags += [
'-DPACKAGE="@0@"'.format(meson.project_name()),
'-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
'-DVERSION="@0@"'.format(meson.project_version()),
'-DVERSION_SHORT="@0@"'.format(version_short),
'-DPACKAGE_STRING="@0@ @1@"'.format(meson.project_name(), meson.project_version()),
'-DPACKAGE_DATADIR="@0@"'.format(pkgdatadir),
'-DCOPYRIGHT_YEAR="@0@"'.format(copyright_year),
'-DPACKAGE_LOCALE_DIR="@0@"'.format(get_option('prefix') / get_option('localedir')),
'-DPACKAGE_URL="https://docs.xfce.org/@0@/@1@/start"'.format(project_namespace, meson.project_name()),
'-DPACKAGE_BUGREPORT="https://gitlab.xfce.org/@0@/@1@/-/issues"'.format(project_namespace, meson.project_name()),
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
'-DPREFIX="@0@"'.format(get_option('prefix')),
'-DBINDIR="@0@"'.format(get_option('prefix') / get_option('bindir')),
'-DDATADIR="@0@"'.format(get_option('prefix') / get_option('datadir')),
'-DDOCDIR="@0@"'.format(get_option('prefix') / 'doc' / meson.project_name()),
'-DINCLUDEDIR="@0@"'.format(get_option('prefix') / get_option('includedir')),
'-DLIBDIR="@0@"'.format(get_option('prefix') / get_option('libdir')),
'-DLIBEXECDIR="@0@"'.format(get_option('prefix') / get_option('libexecdir')),
'-DLOCALEDIR="@0@"'.format(get_option('prefix') / get_option('localedir')),
'-DLOCALSTATEDIR="@0@"'.format(get_option('prefix') / get_option('localstatedir')),
'-DSBINDIR="@0@"'.format(get_option('prefix') / get_option('sbindir')),
'-DSYSCONFDIR="@0@"'.format(get_option('prefix') / get_option('sysconfdir')),
'-DHAVE_XFCE_REVISION_H=1',
]
add_project_arguments(cc.get_supported_arguments(extra_cflags_check), language: 'c')
add_project_arguments(feature_cflags, language: 'c')
add_project_arguments(extra_cflags, language: 'c')
xfce_revision_h = vcs_tag(
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: 'UNKNOWN',
input: 'xfce-revision.h.in',
output: 'xfce-revision.h',
replace_string: '@REVISION@',
)
subdir('panel-plugin')
subdir('icons')
subdir('po')
option(
'keybinder',
type: 'feature',
value: 'auto',
description: 'keybinder support',
)
option(
'libnotify',
type: 'feature',
value: 'auto',
description: 'libnotify support',
)
option(
'libcanberra',
type: 'feature',
value: 'auto',
description: 'libcanberra support',
)
option(
'libxfce4windowing',
type: 'feature',
value: 'auto',
description: 'libxfce4windowing support',
)
option(
'mpris2',
type: 'feature',
value: 'auto',
description: 'mpris2 support',
)
option(
'mixer-command',
type: 'string',
value: 'pavucontrol',
description: 'Default mixer command',
)
......@@ -17,7 +17,8 @@ plugin_LTLIBRARIES = \
libpulseaudio-plugin.la
libpulseaudio_built_sources = \
pulseaudio-dialog_ui.h
pulseaudio-dialog-resources.c \
pulseaudio-dialog-resources.h
libpulseaudio_plugin_la_SOURCES = \
$(libpulseaudio_built_sources) \
......@@ -52,6 +53,8 @@ libpulseaudio_plugin_la_SOURCES = \
libpulseaudio_plugin_la_CFLAGS = \
$(PULSEAUDIO_CFLAGS) \
$(GLIB_CFLAGS) \
$(GIO_CFLAGS) \
$(GIO_UNIX_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
$(LIBXFCE4UI_CFLAGS) \
......@@ -59,8 +62,9 @@ libpulseaudio_plugin_la_CFLAGS = \
$(XFCONF_CFLAGS) \
$(KEYBINDER_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
$(MPRIS2_CFLAGS) \
$(WNCK_CFLAGS) \
$(LIBCANBERRA_CFLAGS) \
$(EXO_CFLAGS) \
$(LIBXFCE4WINDOWING_CFLAGS) \
$(PLATFORM_CFLAGS)
libpulseaudio_plugin_la_LDFLAGS = \
......@@ -73,6 +77,8 @@ libpulseaudio_plugin_la_LDFLAGS = \
libpulseaudio_plugin_la_LIBADD = \
$(PULSEAUDIO_LIBS) \
$(GLIB_LIBS) \
$(GIO_LIBS) \
$(GIO_UNIX_LIBS) \
$(GTK_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
$(LIBXFCE4UI_LIBS) \
......@@ -80,8 +86,9 @@ libpulseaudio_plugin_la_LIBADD = \
$(XFCONF_LIBS) \
$(KEYBINDER_LIBS) \
$(LIBNOTIFY_LIBS) \
$(MPRIS2_LIBS) \
$(WNCK_LIBS) \
$(LIBCANBERRA_LIBS) \
$(EXO_LIBS) \
$(LIBXFCE4WINDOWING_LIBS) \
$(LIBM)
#
......@@ -91,28 +98,31 @@ desktopdir = \
$(datadir)/xfce4/panel/plugins
desktop_in_files = \
pulseaudio.desktop.in.in
pulseaudio.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
desktop_in_in_files = $(desktop_in_files:.desktop.in=.desktop.in.in)
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
$(desktop_DATA): $(desktop_in_files) Makefile
$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
pulseaudio_dialog_glade_files = $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/pulseaudio-dialog.gresource.xml)
pulseaudio-dialog-resources.h: $(srcdir)/pulseaudio-dialog.gresource.xml $(pulseaudio_dialog_glade_files) Makefile
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --manual-register $<
pulseaudio-dialog-resources.c: $(srcdir)/pulseaudio-dialog.gresource.xml $(pulseaudio_dialog_glade_files) Makefile pulseaudio-dialog-resources.h
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --manual-register $<
EXTRA_DIST = \
meson.build \
pulseaudio-dialog.glade \
$(desktop_in_files)
pulseaudio-dialog.gresource.xml \
$(desktop_in_in_files)
DISTCLEANFILES = \
$(desktop_DATA)
if MAINTAINER_MODE
BUILT_SOURCES = \
$(desktop_in_files) \
$(desktop_DATA) \
$(libpulseaudio_built_sources)
DISTCLEANFILES += \
$(libpulseaudio_built_sources)
pulseaudio-dialog_ui.h: pulseaudio-dialog.glade
$(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=pulseaudio_dialog_ui $< >$@
endif
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
/* -*- c-basic-offset: 2 -*- vi:set ts=2 sts=2 sw=2:
* * Copyright (C) 2017 Sean Davis <bluesabre@xfce.org>
* * Copyright (C) 2017-2020 Sean Davis <bluesabre@xfce.org>
*
* Licensed under the GNU General Public License Version 2
*
......@@ -48,11 +48,9 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_DEFINE_TYPE (DeviceMenuItem, device_menu_item, GTK_TYPE_MENU_ITEM)
G_DEFINE_TYPE_WITH_PRIVATE (DeviceMenuItem, device_menu_item, GTK_TYPE_MENU_ITEM)
G_GNUC_END_IGNORE_DEPRECATIONS
#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DEVICE_MENU_ITEM, DeviceMenuItemPrivate))
/* Static Declarations */
......@@ -73,7 +71,7 @@ device_menu_item_new_with_label (const gchar *label)
device_item = DEVICE_MENU_ITEM (g_object_new (TYPE_DEVICE_MENU_ITEM, NULL));
priv = GET_PRIVATE (device_item);
priv = device_menu_item_get_instance_private (device_item);
priv->submenu = gtk_menu_new ();
priv->title = g_strdup (label);
......@@ -101,18 +99,20 @@ device_menu_item_new_with_label (const gchar *label)
void
device_menu_item_add_device (DeviceMenuItem *item,
const gchar *name,
const gchar *description)
const gchar *description,
gboolean sensitive)
{
DeviceMenuItemPrivate *priv;
GtkWidget *mi;
priv = GET_PRIVATE (item);
priv = device_menu_item_get_instance_private (item);
mi = gtk_radio_menu_item_new_with_label (priv->group, description);
g_object_set_data_full (G_OBJECT (mi), "name", g_strdup (name), (GDestroyNotify) g_free);
priv->group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (mi));
gtk_widget_set_sensitive (mi, sensitive);
gtk_widget_show (mi);
gtk_menu_shell_append (GTK_MENU_SHELL (priv->submenu), mi);
......@@ -132,7 +132,7 @@ device_menu_item_set_device_by_name (DeviceMenuItem *item,
g_return_if_fail (IS_DEVICE_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = device_menu_item_get_instance_private (item);
children = gtk_container_get_children (GTK_CONTAINER (priv->submenu));
......@@ -179,8 +179,6 @@ device_menu_item_class_init (DeviceMenuItemClass *item_class)
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
g_type_class_add_private (item_class, sizeof (DeviceMenuItemPrivate));
}
......@@ -190,7 +188,7 @@ device_menu_item_init (DeviceMenuItem *item)
{
DeviceMenuItemPrivate *priv;
priv = GET_PRIVATE (item);
priv = device_menu_item_get_instance_private (item);
priv->submenu = NULL;
priv->label = NULL;
......@@ -207,7 +205,7 @@ device_menu_item_finalize (GObject *object)
DeviceMenuItemPrivate *priv;
item = DEVICE_MENU_ITEM (object);
priv = GET_PRIVATE (item);
priv = device_menu_item_get_instance_private (item);
if (priv->title)
g_free (priv->title);
......
/* -*- c-basic-offset: 2 -*- vi:set ts=2 sts=2 sw=2:
* * Copyright (C) 2017 Sean Davis <bluesabre@xfce.org>
* * Copyright (C) 2017-2020 Sean Davis <bluesabre@xfce.org>
*
* Licensed under the GNU General Public License Version 2
*
......@@ -57,7 +57,8 @@ GtkWidget *device_menu_item_new_with_label (const gchar *label);
void device_menu_item_add_device (DeviceMenuItem *item,
const gchar *name,
const gchar *description);
const gchar *description,
gboolean sensitive);
void device_menu_item_set_device_by_name (DeviceMenuItem *item,
const gchar *name);
......
plugin_sources = [
'devicemenuitem.c',
'devicemenuitem.h',
'mprismenuitem.c',
'mprismenuitem.h',
'pulseaudio-button.c',
'pulseaudio-button.h',
'pulseaudio-config.c',
'pulseaudio-config.h',
'pulseaudio-debug.c',
'pulseaudio-debug.h',
'pulseaudio-dialog.c',
'pulseaudio-dialog.h',
'pulseaudio-menu.c',
'pulseaudio-menu.h',
'pulseaudio-mpris.c',
'pulseaudio-mpris.h',
'pulseaudio-mpris-player.c',
'pulseaudio-mpris-player.h',
'pulseaudio-notify.c',
'pulseaudio-notify.h',
'pulseaudio-plugin.c',
'pulseaudio-plugin.h',
'pulseaudio-volume.c',
'pulseaudio-volume.h',
'scalemenuitem.c',
'scalemenuitem.h',
xfce_revision_h,
]
plugin_sources += gnome.compile_resources(
'pulseaudio-dialog-resources',
'pulseaudio-dialog.gresource.xml',
export: false,
extra_args: [
'--manual-register',
],
)
plugin_install_subdir = 'xfce4' / 'panel' / 'plugins'
plugin_lib = shared_module(
'pulseaudio-plugin',
plugin_sources,
gnu_symbol_visibility: 'hidden',
c_args: [
'-DG_LOG_DOMAIN="@0@"'.format('xfce4-pulseaudio-plugin'),
'-DDEFAULT_MIXER_COMMAND="@0@"'.format(get_option('mixer-command')),
],
include_directories: [
include_directories('..'),
],
dependencies: [
exo,
gio,
gio_unix,
glib,
gtk,
keybinder,
libcanberra,
libm,
libnotify,
libxfce4panel,
libxfce4ui,
libxfce4util,
libxfce4windowing,
pulseaudio,
xfconf,
],
install: true,
install_dir: get_option('prefix') / get_option('libdir') / plugin_install_subdir,
)
i18n.merge_file(
input: configure_file(
input: 'pulseaudio.desktop.in.in',
output: 'pulseaudio.desktop.in',
configuration: {
'LIBXFCE4PANEL_VERSION_API': libxfce4panel.get_variable(pkgconfig: 'api'),
},
install: false,
),
output: 'pulseaudio.desktop',
po_dir: '..' / 'po',
type: 'desktop',
install: true,
install_dir: get_option('prefix') / get_option('datadir') / plugin_install_subdir,
)
/* -*- c-basic-offset: 2 -*- vi:set ts=2 sts=2 sw=2:
* Copyright (c) 2017 Sean Davis <bluesabre@xfce.org>
* Copyright (c) 2017-2020 Sean Davis <bluesabre@xfce.org>
*
* Licensed under the GNU General Public License Version 2
*
......@@ -34,7 +34,11 @@
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gio/gdesktopappinfo.h>
#include <libxfce4ui/libxfce4ui.h>
#if !LIBXFCE4UI_CHECK_VERSION(4, 21, 0)
#include <exo/exo.h>
#endif
/* for DBG/TRACE */
......@@ -81,11 +85,9 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_DEFINE_TYPE (MprisMenuItem, mpris_menu_item, GTK_TYPE_IMAGE_MENU_ITEM)
G_DEFINE_TYPE_WITH_PRIVATE (MprisMenuItem, mpris_menu_item, GTK_TYPE_IMAGE_MENU_ITEM)
G_GNUC_END_IGNORE_DEPRECATIONS
#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MPRIS_MENU_ITEM, MprisMenuItemPrivate))
/* Static Declarations */
......@@ -118,12 +120,11 @@ static void update_packing (MprisMenuItem *ite
/* Public API */
GtkWidget*
static GtkWidget*
mpris_menu_item_new_with_player (const gchar *player,
const gchar *title,
const gchar *icon_name,
const gchar *filename)
gchar *player_label,
gchar *icon_name,
gchar *filename)
{
MprisMenuItem *menu_item;
MprisMenuItemPrivate *priv;
......@@ -132,40 +133,61 @@ mpris_menu_item_new_with_player (const gchar *player,
menu_item = MPRIS_MENU_ITEM (g_object_new (TYPE_MPRIS_MENU_ITEM, NULL));
priv = GET_PRIVATE (menu_item);
priv = mpris_menu_item_get_instance_private (menu_item);
priv->player = g_strdup(player);
if (title != NULL)
priv->title = g_strdup(title);
else
priv->title = g_strdup(player);
priv->filename = g_strdup(filename);
priv->player = g_strdup (player);
priv->title = player_label;
priv->filename = filename;
update_packing (menu_item);
gtk_widget_add_events (GTK_WIDGET(menu_item), GDK_SCROLL_MASK|GDK_POINTER_MOTION_MASK|GDK_BUTTON_MOTION_MASK);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
if (g_file_test (icon_name, G_FILE_TEST_EXISTS) && !g_file_test (icon_name, G_FILE_TEST_IS_DIR)) {
GdkPixbuf *buf;
gint scale_factor = gtk_widget_get_scale_factor (GTK_WIDGET (menu_item));
gint size;
if (! gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &size, NULL))
size = 24;
size *= scale_factor;
#if LIBXFCE4UI_CHECK_VERSION(4, 21, 0)
buf = xfce_gdk_pixbuf_new_from_file_at_max_size (icon_name, size, size, TRUE, NULL);
#else
buf = exo_gdk_pixbuf_new_from_file_at_max_size (icon_name, size, size, TRUE, NULL);
#endif
if (buf != NULL) {
cairo_surface_t *surface = gdk_cairo_surface_create_from_pixbuf (buf, scale_factor, NULL);
gtk_image_set_from_surface (GTK_IMAGE (priv->image), surface);
cairo_surface_destroy(surface);
g_object_unref (buf);
} else {
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), "audio-player", GTK_ICON_SIZE_LARGE_TOOLBAR);
}
} else {
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
}
return GTK_WIDGET(menu_item);
}
/* Public API */
GtkWidget*
mpris_menu_item_new_from_player_name (const gchar *player)
{
GtkWidget *widget = NULL;
gchar *name;
gchar *player_label;
gchar *icon_name;
gchar *full_path;
if (pulseaudio_mpris_get_player_summary (player, &name, &icon_name, &full_path)) {
widget = mpris_menu_item_new_with_player (player, name, icon_name, full_path);
g_free (name);
g_free (icon_name);
g_free (full_path);
}
if (pulseaudio_mpris_get_player_summary (player, &player_label, &icon_name, &full_path))
{
widget = mpris_menu_item_new_with_player (player, player_label, icon_name, full_path);
g_free (icon_name);
}
return widget;
}
......@@ -179,7 +201,7 @@ mpris_menu_item_get_player (MprisMenuItem *item)
g_return_val_if_fail (IS_MPRIS_MENU_ITEM (item), NULL);
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
return priv->player;
}
......@@ -194,7 +216,7 @@ mpris_menu_item_set_title (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
if (title == NULL || *title == '\0')
gtk_label_set_markup_printf_escaped (GTK_LABEL (priv->title_label), "<b>%s</b>", priv->title);
......@@ -212,7 +234,7 @@ mpris_menu_item_set_artist (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
if (artist == NULL || *artist == '\0')
gtk_label_set_label (GTK_LABEL (priv->artist_label), NULL);
......@@ -230,7 +252,7 @@ mpris_menu_item_set_can_go_previous (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->can_go_previous = enabled;
......@@ -250,12 +272,17 @@ mpris_menu_item_set_can_play (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->can_play = enabled;
if (priv->is_running)
gtk_widget_set_sensitive (priv->play_pause, priv->can_play);
{
if (!priv->is_playing)
{
gtk_widget_set_sensitive (priv->play_pause, priv->can_play);
}
}
else
gtk_widget_set_sensitive (priv->play_pause, FALSE);
}
......@@ -270,7 +297,7 @@ mpris_menu_item_set_can_pause (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->can_pause = enabled;
......@@ -295,7 +322,7 @@ mpris_menu_item_set_can_go_next (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->can_go_next = enabled;
......@@ -315,7 +342,7 @@ mpris_menu_item_set_can_raise (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->can_raise = can_raise;
}
......@@ -330,7 +357,7 @@ mpris_menu_item_set_can_raise_wnck (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->can_raise_wnck = can_raise;
}
......@@ -345,7 +372,7 @@ mpris_menu_item_set_is_running (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->is_running = running;
......@@ -381,7 +408,7 @@ mpris_menu_item_set_is_playing (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->is_playing = playing;
......@@ -413,7 +440,7 @@ mpris_menu_item_set_is_stopped (MprisMenuItem *item,
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
priv->is_stopped = stopped;
......@@ -456,8 +483,6 @@ mpris_menu_item_class_init (MprisMenuItemClass *item_class)
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
g_type_class_add_private (item_class, sizeof (MprisMenuItemPrivate));
}
......@@ -465,22 +490,6 @@ mpris_menu_item_class_init (MprisMenuItemClass *item_class)
static void
mpris_menu_item_init (MprisMenuItem *item)
{
MprisMenuItemPrivate *priv;
priv = GET_PRIVATE (item);
priv->title_label = NULL;
priv->artist_label = NULL;
priv->button_box = NULL;
priv->vbox = NULL;
priv->hbox = NULL;
priv->go_previous = NULL;
priv->play_pause = NULL;
priv->go_next = NULL;
priv->player = NULL;
priv->title = NULL;
priv->filename = NULL;
}
......@@ -492,14 +501,11 @@ mpris_menu_item_finalize (GObject *object)
MprisMenuItemPrivate *priv;
item = MPRIS_MENU_ITEM (object);
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
if (priv->player)
g_free (priv->player);
if (priv->title)
g_free (priv->title);
if (priv->filename)
g_free (priv->filename);
g_free (priv->player);
g_free (priv->title);
g_free (priv->filename);
g_object_unref (priv->title_label);
g_object_unref (priv->artist_label);
......@@ -523,7 +529,7 @@ mpris_menu_item_raise (MprisMenuItem *item)
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
if (priv->is_running)
{
......@@ -531,7 +537,7 @@ mpris_menu_item_raise (MprisMenuItem *item)
{
media_notify (item, "Raise");
}
#ifdef HAVE_WNCK
#ifdef HAVE_LIBXFCE4WINDOWING
else if (priv->can_raise_wnck)
{
media_notify (item, "RaiseWnck");
......@@ -550,9 +556,9 @@ mpris_menu_item_launch (MprisMenuItem *item)
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
if (priv->is_running)
if (priv->is_running || !priv->filename)
return;
app_info = (GAppInfo*)g_desktop_app_info_new_from_filename (priv->filename);
......@@ -572,7 +578,7 @@ mpris_menu_item_raise_or_launch (MprisMenuItem *item)
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
if (priv->is_running)
mpris_menu_item_raise (item);
......@@ -592,7 +598,7 @@ mpris_menu_item_get_widget_at_event (MprisMenuItem *item,
g_return_val_if_fail (IS_MPRIS_MENU_ITEM (item), NULL);
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
gtk_widget_get_allocation (priv->button_box, &alloc);
gtk_widget_translate_coordinates (GTK_WIDGET (item), priv->button_box, event->x, event->y, &x, &y);
......@@ -758,7 +764,7 @@ update_packing (MprisMenuItem *item)
g_return_if_fail (IS_MPRIS_MENU_ITEM (item));
priv = GET_PRIVATE (item);
priv = mpris_menu_item_get_instance_private (item);
TRACE("entering");
......
/* -*- c-basic-offset: 2 -*- vi:set ts=2 sts=2 sw=2:
* * Copyright (C) 2017 Sean Davis <bluesabre@xfce.org>
* * Copyright (C) 2017-2020 Sean Davis <bluesabre@xfce.org>
*
* Licensed under the GNU General Public License Version 2
*
......@@ -59,11 +59,6 @@ struct _MprisMenuItemClass
GType mpris_menu_item_get_type (void) G_GNUC_CONST;
GtkWidget *mpris_menu_item_new_with_player (const gchar *player,
const gchar *title,
const gchar *icon_name,
const gchar *filename);
GtkWidget *mpris_menu_item_new_from_player_name (const gchar *player);
const gchar *mpris_menu_item_get_player (MprisMenuItem *item);
......