[Muine] Notification message support
- From: Lee Willis <lee leewillis co uk>
- To: muine-list gnome org
- Subject: [Muine] Notification message support
- Date: Wed, 04 Feb 2004 15:12:38 +0000
Attached patch should send notification area messages on song changes.
Doesn't do much right now (Are tooltip popup messages not supported by
the panel notification area?)
If anyone can make this work then feel free - I don't have time right
now to dig any further ...
Thanks
Lee
--
Lee Willis lee leewillis co uk
? messages.patch
Index: src/NotificationAreaIcon.cs
===================================================================
RCS file: /cvs/gnome/muine/src/NotificationAreaIcon.cs,v
retrieving revision 1.4
diff -u -r1.4 NotificationAreaIcon.cs
--- src/NotificationAreaIcon.cs 2 Feb 2004 20:59:35 -0000 1.4
+++ src/NotificationAreaIcon.cs 4 Feb 2004 15:12:34 -0000
@@ -28,6 +28,8 @@
{
[DllImport ("libmuine")]
private static extern IntPtr egg_tray_icon_new (string name);
+ [DllImport ("libmuine")]
+ private static extern int egg_tray_icon_send_message (IntPtr icon, int timeout, string message, int len);
private Gtk.Image image;
private Tooltips tooltips;
@@ -135,4 +137,10 @@
{
Init ();
}
+
+ public void SendMessage ()
+ {
+ egg_tray_icon_send_message (Raw, 100000, this.tooltip, this.tooltip.Length);
+ }
+
}
Index: src/PlaylistWindow.cs
===================================================================
RCS file: /cvs/gnome/muine/src/PlaylistWindow.cs,v
retrieving revision 1.55
diff -u -r1.55 PlaylistWindow.cs
--- src/PlaylistWindow.cs 3 Feb 2004 16:24:33 -0000 1.55
+++ src/PlaylistWindow.cs 4 Feb 2004 15:12:34 -0000
@@ -548,9 +548,10 @@
Title = song.Title + " - Muine Music Player";
icon.Tooltip = artist_label.Text + " - " + song.Title;
-
- if (restart)
+ if (restart) {
+ icon.SendMessage ();
DashboardFrontend.SendClue (song.Artists, song.Album, song.Title, HasToplevelFocus);
+ }
} else {
cover_image.SetFromStock ("muine-default-cover",
StockIcons.AlbumCoverSize);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]