[Xfce4-commits] <xfce4-volumed:master> 0.1.7 release - better compatibility with xfce4-notifyd
Steve Dodier
noreply at xfce.org
Sat Oct 31 17:40:01 CET 2009
Updating branch refs/heads/master
to 457f29e3340ea20180c285de5b80f48d3ad10227 (commit)
from 4f6e8bb3216ef0a140d4b813a6e8527f96590e62 (commit)
commit 457f29e3340ea20180c285de5b80f48d3ad10227
Author: Steve Dodier <sidnioulz at gmail.com>
Date: Sat Oct 31 17:40:36 2009 +0100
0.1.7 release - better compatibility with xfce4-notifyd
ChangeLog | 10 ++++++++++
configure.ac | 2 +-
src/main.c | 2 +-
src/xvd_data_types.h | 2 +-
src/xvd_keys.c | 11 ++++++++++-
src/xvd_mixer.c | 2 +-
src/xvd_notify.c | 32 ++++++++++++++++----------------
7 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6a4f61a..4db7caf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-31 Steve Dodier <sidnioulz at gmail.com>
+
+ * Add debug messages when a key is pressed
+ * Turn icon names into XDG-compliant names
+ * Remove x-canonical-private-synchronous from needed caps for gauge-based notifications
+
+2009-10-28 Steve Dodier <sidnioulz at gmail.com>
+
+ * Fix a build error with --disable-libnotify, patch from á¹¢alÄḥ ad-DÄ«n YÅ«suf ibn AyyÅ«b
+
2009-10-27 Steve Dodier <sidnioulz at gmail.com>
* Support for asynchronous libnotify daemons
diff --git a/configure.ac b/configure.ac
index b9347a3..5cb6393 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([xfce4-volumed], [0.1.4], [http://bugs.launchpad.net/xfce4-volumed])
+AC_INIT([xfce4-volumed], [0.1.7], [http://bugs.launchpad.net/xfce4-volumed])
AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
AC_CONFIG_SRCDIR([src/main.c])
diff --git a/src/main.c b/src/main.c
index 0d7a0b5..b83fa85 100644
--- a/src/main.c
+++ b/src/main.c
@@ -112,7 +112,7 @@ xvd_instance_init(XvdInstance *i)
#endif
i->kss = NULL;
#ifdef HAVE_LIBNOTIFY
- i->sync_notifications = FALSE;
+ i->gauge_notifications = FALSE;
i->notification = NULL;
#endif
}
diff --git a/src/xvd_data_types.h b/src/xvd_data_types.h
index 45223b4..0cef4ed 100644
--- a/src/xvd_data_types.h
+++ b/src/xvd_data_types.h
@@ -86,7 +86,7 @@ typedef struct {
#ifdef HAVE_LIBNOTIFY
/* Libnotify vars */
- gboolean sync_notifications;
+ gboolean gauge_notifications;
NotifyNotification* notification;
#endif
diff --git a/src/xvd_keys.c b/src/xvd_keys.c
index 2a4275e..cd8b8af 100644
--- a/src/xvd_keys.c
+++ b/src/xvd_keys.c
@@ -69,6 +69,9 @@ _xvd_keys_handle_events(GIOChannel *source,
#else
if (kpe->detail == Inst->keyRaise) {
#endif
+ #ifndef NDEBUG
+ g_debug ("The RaiseVolume key was pressed.\n");
+ #endif
if (xvd_mixer_change_volume (Inst, Inst->vol_step)) {
#ifdef HAVE_LIBNOTIFY
/* if (!Inst->muted) {*/
@@ -86,6 +89,9 @@ _xvd_keys_handle_events(GIOChannel *source,
#else
else if (kpe->detail == Inst->keyLower) {
#endif
+ #ifndef NDEBUG
+ g_debug ("The LowerVolume key was pressed.\n");
+ #endif
if (xvd_mixer_change_volume (Inst, (Inst->vol_step * -1))) {
#ifdef HAVE_LIBNOTIFY
/* if (!Inst->muted) {*/
@@ -103,10 +109,13 @@ _xvd_keys_handle_events(GIOChannel *source,
#else
else if (kpe->detail == Inst->keyMute) {
#endif
+ #ifndef NDEBUG
+ g_debug ("The Mute key was pressed.\n");
+ #endif
if (xvd_mixer_toggle_mute (Inst)) {
#ifdef HAVE_LIBNOTIFY
if (Inst->muted)
- xvd_notify_notification (Inst, "notification-audio-volume-muted", 0);
+ xvd_notify_notification (Inst, "audio-volume-muted", 0);
else {
xvd_mixer_init_volume (Inst);
xvd_notify_volume_notification (Inst);
diff --git a/src/xvd_mixer.c b/src/xvd_mixer.c
index 8d23b8d..87f9c80 100644
--- a/src/xvd_mixer.c
+++ b/src/xvd_mixer.c
@@ -105,7 +105,7 @@ _xvd_mixer_bus_message (GstBus *bus, GstMessage *message,
return;
#ifdef HAVE_LIBNOTIFY
if (Inst->muted)
- xvd_notify_notification (Inst, "notification-audio-volume-muted", 0);
+ xvd_notify_notification (Inst, "audio-volume-muted", 0);
else {
xvd_mixer_init_volume (Inst);
xvd_notify_volume_notification (Inst);
diff --git a/src/xvd_notify.c b/src/xvd_notify.c
index 4d8f0b0..dc5bd29 100644
--- a/src/xvd_notify.c
+++ b/src/xvd_notify.c
@@ -31,8 +31,8 @@ xvd_notify_notification(XvdInstance *Inst,
{
gchar* title = NULL;
- if ((icon != NULL) && (g_strcmp0(icon, "notification-audio-volume-muted") == 0)) {
- // TRANSLATORS: this is the body of the ATK interface of the volume notifications. Just before this, there is the 'Volume' word (as a notification title). If it would look too weird in your locale, translate this string as 'The volume is muted' instead.
+ if ((icon != NULL) && (g_strcmp0(icon, "audio-volume-muted") == 0)) {
+ // TRANSLATORS: this is the body of the ATK interface of the volume notifications. This is the case when volume is muted
title = g_strdup ("Volume is muted");
}
else {
@@ -47,7 +47,7 @@ xvd_notify_notification(XvdInstance *Inst,
g_free (title);
- if (Inst->sync_notifications) {
+ if (Inst->gauge_notifications) {
notify_notification_set_hint_int32 (Inst->notification,
"value",
value);
@@ -68,36 +68,36 @@ void
xvd_notify_volume_notification(XvdInstance *Inst)
{
if (Inst->current_vol == 0)
- xvd_notify_notification (Inst, (Inst->muted) ? "notification-audio-volume-muted" : "notification-audio-volume-off", 0);
+ xvd_notify_notification (Inst, "audio-volume-muted", 0);
else if (Inst->current_vol < 34)
- xvd_notify_notification (Inst, (Inst->muted) ? "notification-audio-volume-muted" : "notification-audio-volume-low", Inst->current_vol);
+ xvd_notify_notification (Inst, (Inst->muted) ? "audio-volume-muted" : "audio-volume-low", Inst->current_vol);
else if (Inst->current_vol < 67)
- xvd_notify_notification (Inst, (Inst->muted) ? "notification-audio-volume-muted" : "notification-audio-volume-medium", Inst->current_vol);
+ xvd_notify_notification (Inst, (Inst->muted) ? "audio-volume-muted" : "audio-volume-medium", Inst->current_vol);
else
- xvd_notify_notification (Inst, (Inst->muted) ? "notification-audio-volume-muted" : "notification-audio-volume-high", Inst->current_vol);
+ xvd_notify_notification (Inst, (Inst->muted) ? "audio-volume-muted" : "audio-volume-high", Inst->current_vol);
}
void
xvd_notify_overshoot_notification(XvdInstance *Inst)
{
xvd_notify_notification (Inst,
- (Inst->muted) ? "notification-audio-volume-muted" : "notification-audio-volume-high",
- (Inst->sync_notifications) ? 101 : 100);
+ (Inst->muted) ? "audio-volume-muted" : "audio-volume-high",
+ (Inst->gauge_notifications) ? 101 : 100);
}
void
xvd_notify_undershoot_notification(XvdInstance *Inst)
{
xvd_notify_notification (Inst,
- (Inst->muted) ? "notification-audio-volume-muted" : "notification-audio-volume-off",
- (Inst->sync_notifications) ? -1 : 0);
+ "audio-volume-muted",
+ (Inst->gauge_notifications) ? -1 : 0);
}
void
xvd_notify_init(XvdInstance *Inst,
const gchar *appname)
{
- Inst->sync_notifications = TRUE;
+ Inst->gauge_notifications = TRUE;
notify_init (appname);
GList *caps_list = notify_get_server_caps ();
@@ -108,11 +108,11 @@ xvd_notify_init(XvdInstance *Inst,
node = g_list_find_custom (caps_list, LAYOUT_ICON_ONLY, (GCompareFunc) g_strcmp0);
if (!node)
- Inst->sync_notifications = FALSE;
+ Inst->gauge_notifications = FALSE;
- node = g_list_find_custom (caps_list, SYNCHRONOUS, (GCompareFunc) g_strcmp0);
- if (!node)
- Inst->sync_notifications = FALSE;
+/* node = g_list_find_custom (caps_list, SYNCHRONOUS, (GCompareFunc) g_strcmp0);*/
+/* if (!node)*/
+/* Inst->gauge_notifications = FALSE;*/
g_list_free (caps_list);
}
More information about the Xfce4-commits
mailing list