Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 232203 Details for
Bug 320697
[ebuild] x11-misc/notify-osd-0.9.29 && relative patched x11-libs/libnotify-0.4.5 gnome-base/gnome-settings-daemon-2.28.2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for gnome-settings daemon to put into files dir
16_use_synchronous_notifications.patch (text/plain), 7.38 KB, created by
Pasquale Boemio
on 2010-05-20 08:00:09 UTC
(
hide
)
Description:
patch for gnome-settings daemon to put into files dir
Filename:
MIME Type:
Creator:
Pasquale Boemio
Created:
2010-05-20 08:00:09 UTC
Size:
7.38 KB
patch
obsolete
>=== modified file 'configure.ac' >diff -Nur -x '*.orig' -x '*~' notifications/configure.ac notifications.new/configure.ac >--- notifications/configure.ac 2009-03-05 16:20:54.000000000 +0200 >+++ notifications.new/configure.ac 2009-03-05 16:20:55.000000000 +0200 >@@ -69,6 +69,7 @@ > gio-2.0 >= $GIO_REQUIRED_VERSION > libglade-2.0 >= 2.0.0 > dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION >+ libnotify >= $LIBNOTIFY_REQUIRED_VERSION > ) > > GSD_PLUGIN_LDFLAGS="-export_dynamic -module -avoid-version -no-undefined" >diff -Nur -x '*.orig' -x '*~' notifications/plugins/media-keys/gsd-media-keys-manager.c notifications.new/plugins/media-keys/gsd-media-keys-manager.c >--- notifications/plugins/media-keys/gsd-media-keys-manager.c 2009-03-05 16:20:54.000000000 +0200 >+++ notifications.new/plugins/media-keys/gsd-media-keys-manager.c 2009-03-05 16:20:55.000000000 +0200 >@@ -51,6 +51,14 @@ > #include "actions/acme-volume.h" > #include "gsd-media-keys-window.h" > >+/* HACK: fwd declaration */ >+gboolean >+gsd_media_keys_notification_volume (int value, gboolean muted); >+ >+gboolean >+gsd_media_keys_notification_eject (void); >+ >+ > #define GSD_DBUS_PATH "/org/gnome/SettingsDaemon" > #define GSD_DBUS_NAME "org.gnome.SettingsDaemon" > #define GSD_MEDIA_KEYS_DBUS_PATH GSD_DBUS_PATH "/MediaKeys" >@@ -586,10 +594,13 @@ > { > char *command; > >+ if (! gsd_media_keys_notification_eject ()) >+ { > dialog_init (manager); > gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), > GSD_MEDIA_KEYS_WINDOW_ACTION_EJECT); > dialog_show (manager); >+ } > > command = gconf_client_get_string (manager->priv->conf_client, > GCONF_MISC_DIR "/eject_command", >@@ -661,6 +672,10 @@ > muted = acme_volume_get_mute (manager->priv->volume); > vol = acme_volume_get_volume (manager->priv->volume); > >+ /* try to use the new notification service, if available */ >+ if (gsd_media_keys_notification_volume (vol, muted)) >+ return; >+ > /* FIXME: AcmeVolume should probably emit signals > instead of doing it like this */ > dialog_init (manager); >diff -Nur -x '*.orig' -x '*~' notifications/plugins/media-keys/gsd-media-keys-notification.c notifications.new/plugins/media-keys/gsd-media-keys-notification.c >--- notifications/plugins/media-keys/gsd-media-keys-notification.c 1970-01-01 02:00:00.000000000 +0200 >+++ notifications.new/plugins/media-keys/gsd-media-keys-notification.c 2009-03-05 16:21:39.000000000 +0200 >@@ -0,0 +1,132 @@ >+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- >+ * >+ * Copyright (C) 2009 Canonical Ltd >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+ * the Free Software Foundation; either version 2 of the License, or >+ * (at your option) any later version. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ * GNU General Public License for more details. >+ * >+ * You should have received a copy of the GNU General Public License >+ * along with this program; if not, write to the Free Software >+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. >+ * >+ */ >+ >+#include <libnotify/notify.h> >+#include <glib/gi18n.h> >+ >+gboolean >+gsd_media_keys_notification_check_service (void) >+{ >+ GList * caps = NULL; >+ gchar *name = NULL, *vendor = NULL, *version = NULL, *specver = NULL; >+ gboolean compat = FALSE; >+ >+ if (! notify_is_initted()) >+ notify_init ("gnome-settings-daemon"); >+ >+ if (! notify_get_server_info (&name, &vendor, &version, &specver)) >+ { >+ g_debug ("unable to reach notification service"); >+ return FALSE; >+ } >+ >+ caps = notify_get_server_caps(); >+ if (g_list_find_custom (caps, >+ "private-synchronous", >+ (GCompareFunc) g_strcmp0) != NULL) >+ compat = TRUE; >+ >+ g_list_foreach(caps, (GFunc)g_free, NULL); >+ g_list_free(caps); >+ >+ if (! compat) >+ g_debug ("the service does not support the 'synchronous' capability"); >+ >+ g_free (name); g_free (vendor); g_free (version); g_free (specver); >+ >+ return compat; >+} >+ >+static const char *icon_name[] = { >+ "notification-audio-volume-muted", >+ /* "notification-audio-volume-off", */ >+ "notification-audio-volume-low", >+ "notification-audio-volume-medium", >+ "notification-audio-volume-high", >+ NULL >+}; >+ >+ >+gboolean >+gsd_media_keys_notification_volume (int value, gboolean muted) >+{ >+ static NotifyNotification *n = NULL; >+ int s; >+ >+ if (! gsd_media_keys_notification_check_service ()) >+ return FALSE; >+ >+ if (n == NULL) >+ n = notify_notification_new (_("Volume"), >+ "", >+ NULL, >+ NULL); >+ if (value < 0) >+ { >+ value = 0; /* notify-osd doesn't like -1 */ >+ s = 0; /* off, ie with the undershoot effect */ >+ } else { >+ s = 3 * value / 100 + 1; >+ if (s < 1) >+ s = 1; >+ if (s > 3) >+ s = 3; >+ } >+ >+ if (muted) >+ s = 0; >+ >+ notify_notification_update (n, >+ _("Volume"), >+ "", >+ icon_name[s]); >+ >+ notify_notification_set_hint_int32(n, "value", value); >+ notify_notification_set_hint_string(n, "synchronous", "volume"); >+ >+ notify_notification_show (n, NULL); >+ >+ return TRUE; >+} >+ >+gboolean >+gsd_media_keys_notification_eject (void) >+{ >+ static NotifyNotification *n = NULL; >+ >+ if (! gsd_media_keys_notification_check_service ()) >+ return FALSE; >+ >+ if (n == NULL) >+ { >+ n = notify_notification_new ("Eject", >+ "", >+ "notification-device-eject", >+ NULL); >+ notify_notification_set_hint_string(n, "synchronous", "eject"); >+ notify_notification_set_hint_string (n, >+ "icon-only", >+ "allowed"); >+ } >+ >+ notify_notification_show (n, NULL); >+ >+ return TRUE; >+} >diff -Nur -x '*.orig' -x '*~' notifications/plugins/media-keys/Makefile.am notifications.new/plugins/media-keys/Makefile.am >--- notifications/plugins/media-keys/Makefile.am 2009-03-05 16:20:54.000000000 +0200 >+++ notifications.new/plugins/media-keys/Makefile.am 2009-03-05 16:20:55.000000000 +0200 >@@ -29,6 +29,7 @@ > gsd-media-keys-window.h \ > gsd-media-keys-window.c \ > acme.h \ >+ gsd-media-keys-notification.c \ > $(BUILT_SOURCES) \ > $(NULL) > >@@ -42,10 +43,12 @@ > $(AM_CPPFLAGS) > > libmedia_keys_la_CFLAGS = \ >+ $(LIBNOTIFY_CFLAGS) \ > $(SETTINGS_PLUGIN_CFLAGS) \ > $(AM_CFLAGS) > > libmedia_keys_la_LDFLAGS = \ >+ $(LIBNOTIFY_LDFLAGS) \ > $(GSD_PLUGIN_LDFLAGS) > > libmedia_keys_la_LIBADD = \ >@@ -92,6 +95,7 @@ > test_media_keys_SOURCES = \ > gsd-media-keys-manager.c \ > gsd-media-keys-manager.h \ >+ gsd-media-keys-notification.c \ > gsd-media-keys-window.h \ > gsd-media-keys-window.c \ > test-media-keys.c \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 320697
:
232197
|
232199
|
232201
| 232203 |
232205