[Goodies-commits] r1982 - in notification-daemon-xfce/trunk: . po settings src themes/bubble themes/standard

Nick Schermer nick at xfce.org
Wed Sep 6 21:16:03 CEST 2006


Author: nick
Date: 2006-09-06 19:16:00 +0000 (Wed, 06 Sep 2006)
New Revision: 1982

Added:
   notification-daemon-xfce/trunk/po/notification-daemon-xfce.pot
   notification-daemon-xfce/trunk/settings/
   notification-daemon-xfce/trunk/settings/Makefile.am
   notification-daemon-xfce/trunk/settings/main.c
   notification-daemon-xfce/trunk/settings/mcs_plugin.c
   notification-daemon-xfce/trunk/settings/notification-settings.desktop.in
   notification-daemon-xfce/trunk/settings/notification-settings.png
   notification-daemon-xfce/trunk/src/stack.c
   notification-daemon-xfce/trunk/src/stack.h
Modified:
   notification-daemon-xfce/trunk/AUTHORS
   notification-daemon-xfce/trunk/ChangeLog
   notification-daemon-xfce/trunk/Makefile.am
   notification-daemon-xfce/trunk/NEWS
   notification-daemon-xfce/trunk/configure.in.in
   notification-daemon-xfce/trunk/org.freedesktop.Notifications.service.in
   notification-daemon-xfce/trunk/po/POTFILES.in
   notification-daemon-xfce/trunk/src/Makefile.am
   notification-daemon-xfce/trunk/src/daemon.c
   notification-daemon-xfce/trunk/src/daemon.h
   notification-daemon-xfce/trunk/src/engines.c
   notification-daemon-xfce/trunk/themes/bubble/Makefile.am
   notification-daemon-xfce/trunk/themes/standard/Makefile.am
   notification-daemon-xfce/trunk/themes/standard/theme.c
Log:
* Imported all changes from the trunk version of
  the origional daemon (0.3.6).
* Improved the XfceRc handling, the values are now
  written if they don't exist yet.
* Renamed the entire plugin to notification-daemon-xfce.
* notification-settings application. With this application
  you can control the screen position of the notification.
  In the feature this will also control the notification
  theme (when more themes are added).
* MCS wrapper for notification-settings.
* Added .pot file.
* Bumped version to 0.3.6.


Modified: notification-daemon-xfce/trunk/AUTHORS
===================================================================
--- notification-daemon-xfce/trunk/AUTHORS	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/AUTHORS	2006-09-06 19:16:00 UTC (rev 1982)
@@ -7,3 +7,5 @@
 
 Contributors:
 	Rodney Dawes <dobey at novell.com>
+ 	felix at hsgheli.de
+ 	Ed Catmur <ed at catmur.co.uk>

Modified: notification-daemon-xfce/trunk/ChangeLog
===================================================================
--- notification-daemon-xfce/trunk/ChangeLog	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/ChangeLog	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1,692 +1,19 @@
-==================== 0.3.5 ====================
+2006-09-06 18:10 nick
 
-Wed Apr 26 01:44:17 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
+	* Imported all changes from the trunk version of
+	  the origional daemon (0.3.6).
+	* Improved the XfceRc handling, the values are now
+	  written if they don't exist yet.
+	* Renamed the entire plugin to notification-daemon-xfce.
+	* notification-settings application. With this application
+	  you can control the screen position of the notification.
+	  In the feature this will also control the notification
+	  theme (when more themes are added).
+	* MCS wrapper for notification-settings.
+	* Added .pot file.
+	* Bumped version to 0.3.6.
 
-	* data/Makefile.am:
-	A data/org.freedesktop.Notifications.service.in:
-	D data/notification-daemon.service.in:
-	* configure.ac:
-	  - Rename notification-daemon.service to
-	    org.freedesktop.Notifications.service.
+2006-09-06 13:36 nick
 
-Wed Apr 26 01:32:17 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* NEWS:
-	* configure.ac:
-	  - Bump the version to 0.3.5.
-
-Sun Apr 23 16:30:28 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/engines.c:
-	* src/engines.h:
-	* themes/standard/theme.c:
-	* NEWS:
-	  - Fixed a bug where a notification would duplicate its actions when
-	    updated. This closes bug #30.
-
-Sun Apr 23 15:48:14 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Use cairo to render the countdown timer if using gtk 2.8.0+. This
-	    makes the countdown timer all antialiased and pretty.
-
-Fri Apr 21 17:17:40 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Fix the scaling of different icon sizes. I was using a MAX when
-	    I should have used a MIN. Now small icons display as small, and
-	    larger icons are scaled down to 48x48.
-
-Fri Apr 21 16:42:46 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Patch by M.S. to fix the problem where icons were being clipped in
-	    notifications if the text didn't wrap enough lines. This fixes
-	    bug #21.
-
-Fri Apr 21 16:33:56 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Fix notifications no longer expiring due to the fix for bug #22.
-	    The logic is now a bit smarter and more hacky. But it works. And
-	    really, if it didn't, would I be committing this? Yes, probably.
-
-Fri Apr 21 15:54:01 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* NEWS:
-	  - Fix notifications with a timeout >= 2147484ms expiring in less
-	    than a second. This fixes bug #22.
-
-Fri Apr 21 15:21:45 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/engines.c:
-	* themes/Makefile.am:
-	* themes/standard/theme.c:
-	* NEWS:
-	* configure.ac:
-	  - Add two new required theme functions, theme_check_init (which
-	    determines if the theme is compatible with the version of
-	    notification-daemon) and get_theme_info (which returns info on the
-	    theme).
-	  - Disabled the Bubble theme for this release. It's the source of too
-	    many bugs.
-
-Tue Apr 11 22:54:13 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/bubble/eggnotificationbubblewidget.c:
-	  - Patch by Rodney Dawes to fix closing of notifications using the
-	    bubble theme when clicked. This closes bug #39.
-
-Tue Apr 11 22:50:22 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Patch by Rodney Dawes to fix usage of GtkIconTheme. This closes
-	    bug #38.
-
-==================== 0.3.4 ====================
-
-Sat Feb 04 20:18:54 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* configure.ac:
-	* NEWS:
-	  - Add info to the NEWS.
-	  - Bump the version to 0.3.4.
-
-Sat Feb 04 20:01:09 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* configure.ac:
-	  - Fix make distcheck.
-
-Sat Feb 04 19:48:49 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	D themes/standard/bgbox.c:
-	D themes/standard/bgbox.h:
-	* themes/standard/Makefile.am:
-	* themes/standard/theme.c:
-	  - Get rid of bgbox.[ch]. We don't use it anymore.
-
-Sat Feb 04 16:39:00 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* themes/bubble/eggnotificationbubblewidget.c:
-	  - Attempt to fix button ordering in the Bubble widget. The structure
-	    of the widget is a bit jumbled, so there may be side-effects with
-	    the alignment.
-
-Sat Feb 04 16:23:30 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/bubble/theme.c:
-	  - Fixed a crash when clicking an action in the bubble theme.
-
-Sat Feb 04 15:56:28 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* themes/bubble/theme.c:
-	  - Ensure that the notification window is always realized before we
-	    start operating on its GdkWindow. This fixes bug #10.
-
-Sat Feb 04 13:15:29 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Ensure that the labels in the action buttons are aligned correctly.
-
-Sat Feb 04 13:11:25 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/engines.c:
-	* themes/standard/theme.c:
-	  - Make more theme functions optional. Fall back to defaults in cases
-	    like destroying, showing, or hiding notifications.
-
-Sat Feb 04 13:08:02 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/engines.c:
-	* src/engines.h:
-	* themes/standard/theme.c:
-	  - Make the timer ticks passed to the theme engine more precise.
-
-Sat Feb 04 12:44:32 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Change the stripe width to 30. Images align a lot nicer now.
-
-Sat Feb 04 12:38:22 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Use the theme colors to draw the low and normal urgency stripes.
-	    Low is the style's nomral BG state. Normal is the selected state.
-	    Critical is custom. We hard-code it red. Eventually, I'd like all
-	    this to change when the themeable gtk colors are supported.
-
-Sat Feb 04 12:28:24 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Improve the alignment and the color of the countdown.
-
-Sat Feb 04 12:24:32 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/engines.c:
-	* src/engines.h:
-	* themes/standard/theme.c:
-	  - Add a pie-based countdown timer to notifications containing actions,
-	    so that the user knows how long they have until the notification
-	    simply expires.
-
-Sat Feb 04 02:04:35 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Color the stripe based on the urgency level.
-
-Sat Feb 04 01:48:50 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Check notification expiration every 100ms instead of every 500ms.
-
-Sat Feb 04 01:26:41 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Use the action key to look up an icon theme stock icon. If one
-	    exists, display it next to the name.
-
-Sat Feb 04 01:07:02 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Change the actions to use right-aligned small text buttons. This
-	    makes it a bit more clear as to what these really are.
-
-Sat Feb 04 00:54:34 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Hide the content box containing the body, actions and icon when
-	    all of those are invisible (unset). This allows the whole
-	    notification to be very short when there's just a summary, instead
-	    of having useless, ugly extra vertical whitespace.
-
-Sat Feb 04 00:37:55 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/bgbox.c:
-	* themes/standard/bgbox.h:
-	* themes/standard/theme.c:
-	  - Make some changes to the Standard theme in order to bring it a
-	    bit closer to the style used in the December GNOME mockups. The
-	    mockups had some nice stylistic and usability ideas that were
-	    worth looking into.
-
-Wed Feb 01 19:17:09 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/bubble/Makefile.am:
-	* themes/standard/Makefile.am:
-	  - Patch by Rodney Dawes to install the theme engines as unversioned
-	    libraries instead of versioned libraries.
-
-Sun Jan 29 13:03:09 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/engines.c:
-	* themes/standard/theme.c:
-	  - Patch by Michael Vogt and modified a bit by me to add a close
-	    button to notifications. This is similar to the one used in Ubuntu
-	    Dapper, with a small placement change and functionality change: the
-	    notification no longer emits the ActionInvoked for the default action
-	    when closed. This closes ticket #8.
-	  - Moved data freeing for the standard theme and for theme engine
-	    unreffing out of the close functions and into a callback specified
-	    through g_object_set_data_full().
-	  - The daemon now listens for when notification windows are destroyed,
-	    and reacts appropriately, instead of crashing.
-
-Sun Jan 29 12:12:43 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* configure.ac:
-	  - Fix a couple missing commas in the list of package modules. Also
-	    take the time to clean this up a bit and put each module on its own
-	    line, and put the required versions into their own variables.
-	  - Bump the version to 0.3.3.90.
-
-==================== 0.3.3 ====================
-
-Wed Jan 25 00:29:59 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* ChangeLog:
-	* NEWS:
-	* configure.ac:
-	  - Bump the version to 0.3.3. Prepare for release.
-
-Wed Jan 25 00:21:49 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - When using icontheme icons, use the size closest to 48x48. However,
-	    if the closest image is smaller, use the small image instead of
-	    scaling up. If it's bigger, scale down to 48x48.
-
-Wed Jan 25 00:01:56 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* configure.ac:
-	  - Don't pop up a notification if a window is full screen or if the
-	    screensaver is active. This closes bug #4.
-
-Tue Jan 24 00:18:18 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/Makefile.am:
-	* themes/bubble/Makefile.am:
-	* themes/standard/Makefile.am:
-	* NEWS:
-	* configure.ac:
-	  - Install and check for engines in
-	    $(libdir)/notification-daemon-1.0/engines, as opposed to
-	    $(libdir)/notification-daemon/engines. This fixes bug #3.
-
-==================== 0.3.2 ====================
-
-Mon Jan 23 00:39:34 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - We support v0.9 of the Desktop Notifications spec. Make sure we
-	    return that in GetServerInformation.
-
-Mon Jan 23 00:38:18 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* configure.ac:
-	* NEWS:
-	  - Add release news and bump the version up to 0.3.2.
-
-Mon Jan 23 00:33:31 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/notificationdaemon.xml:
-	  - Get rid of the GetServerInfo function. I thought I added this for
-	    backward-compatibility, but I was wrong -- everyone was really using
-	    the correct function.
-
-Mon Jan 23 00:27:53 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* data/Makefile.am:
-	A po/ChangeLog:
-	* src/Makefile.am:
-	D src/notifydaemon-dbus-glue.h:
-	* Makefile.am:
-	* configure.ac:
-	  - make distcheck is now happy.
-
-Sun Jan 22 23:54:53 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Add back working support for default actions. These were being
-	    displayed as standard actions. Now they're once again emitted when
-	    the notification is clicked.
-
-Sun Jan 22 23:51:17 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* data/Makefile.am:
-	A data/notification-daemon.service.in:
-	D notification-daemon.service.in:
-	* INSTALL:
-	* Makefile.am:
-	* configure.ac:
-	  - Move notification-daemon.service.in to data/.
-
-Sun Jan 22 23:38:31 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Fix several bugs (placement and possible crashers) in notification
-	    replacement.
-
-Sun Jan 22 23:31:36 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Hook the actions back up again. Switching to the BgBox widget broke
-	    this.
-
-Sun Jan 22 23:02:37 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Remove now dead code.
-
-Sun Jan 22 22:28:39 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Draw the border of the notification window correctly under all tested
-	    cases.
-
-Sun Jan 22 20:02:58 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - The arrow will now point down if there's not enough room for it
-	    to point up (such as if an icon on the bottom panel is the source for
-	    the arrow).
-
-Sun Jan 22 18:59:57 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* themes/standard/theme.c:
-	  - Be super cool when it comes to arrow placement near the left and right
-	    of the screen. The next couple of changes will add to the super
-	    coolness of all of this.
-
-Sun Jan 22 15:13:08 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/Makefile.am:
-	A themes/standard/bgbox.c:
-	A themes/standard/bgbox.h:
-	* themes/standard/theme.c:
-	  - Added a BgBox widget to the standard theme. This is based off of
-	    libview's BaseBGBox widget. It's being used for the themeing of the
-	    standard theme, instead of hard-coding white.
-
-Sun Jan 22 13:27:29 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* themes/bubble/eggnotificationbubblewidget.c:
-	* themes/bubble/eggnotificationbubblewidget.h:
-	* themes/standard/theme.c:
-	* autogen.sh:
-	  - Patch by Rodney Dawes to fix a problem with keeping a pointer to
-	    the hints table in the themes. We no longer store the whole table,
-	    but rather only the parts of it we care about. This fixes a crash.
-	  - This patch also updates the required automake version to 1.9, to
-	    be compatible with the new intltool and to use a more recent
-	    gnome-common.
-
-Sun Jan 22 13:23:51 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/daemon.h:
-	* src/notificationdaemon.xml:
-	  - Rearrange some parameters to match the spec.
-
-Fri Jan 20 00:22:38 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Respect the user's work area (the area inside the panels and stuff)
-	    when displaying notifications.
-
-Fri Jan 20 00:15:04 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Small code cleanups.
-
-Fri Jan 20 00:09:12 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Add a little hack to prevent the notification from closing when a
-	    link is clicked.
-
-Fri Jan 20 00:01:04 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Remove the debug messages. We shouldn't need these anymore, as the
-	    base stuff is working.
-
-Thu Jan 19 23:59:42 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/engines.c:
-	* src/engines.h:
-	* themes/standard/theme.c:
-	  - Add proper support for actions.
-	  - Remove the action_invoked parameter to create_notification(), since
-	    we're already passing it to add_notification_action.
-
-Thu Jan 19 23:44:31 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/engines.c:
-	* src/engines.h:
-	* themes/standard/theme.c:
-	  - Pass a couple of callbacks to the theme engine's
-	    create_notification() function: action_invoked and url_clicked.
-	  - Move the URL clicking callback to daemon.c from the standard engine.
-	    The standard engine now calls the passed url_clicked function.
-
-Thu Jan 19 23:33:46 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Sexy new separator. Well, it's better than "|" anyway.
-
-Thu Jan 19 23:23:55 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* themes/standard/theme.c:
-	  - Add the beginnings of action support.
-
-Thu Jan 19 22:34:16 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* data/Makefile.am:
-	  - NO! Install the schema always!
-
-Thu Jan 19 10:18:09 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Simplify a small piece of logic.
-
-Thu Jan 19 02:37:31 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/daemon.h:
-	* src/engines.c:
-	  - Reorganize the code styles to match the style of the rest of Galago
-	    and of the previous libnotify.
-
-Thu Jan 19 01:36:16 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Add back support for hyperlinks in the standard engine.
-
-Sun Jan 15 17:51:27 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	* src/daemon.h:
-	* src/notificationdaemon.xml:
-	  - Add back GetCapabilities and GetServerInformation.
-
-Sun Jan 15 16:07:00 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	A data/Makefile.am:
-	A data/notification-daemon.schemas.in:
-	A po/POTFILES.in:
-	* src/daemon.c:
-	* src/daemon.h:
-	* src/engines.c:
-	* src/Makefile.am:
-	* Makefile.am:
-	* autogen.sh:
-	* configure.ac:
-	  - Added GConf support. The theme can now be set through gconf-editor.
-
-Sun Jan 15 14:49:49 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/engines.c:
-	* src/engines.h:
-	  - Save the engine used in the resulting notification window's
-	    object data. Use that engine for all future operations on that
-	    notification.
-	  - Handle ref counting on notification engines so that they'll be
-	    properly when the time comes. As of right now, this won't happen.
-
-Fri Jan 13 11:44:00 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/engines.c:
-	* src/engines.h:
-	* themes/bubble/eggnotificationbubblewidget.c:
-	* themes/bubble/eggnotificationbubblewidget.h:
-	* themes/bubble/theme.c:
-	* themes/standard/theme.c:
-	  - Patch by Rodney Dawes to add support for passing hints to the
-	    notification engines. This will allow engines to theme based on
-	    urgency levels and other such data.
-
-Thu Jan 12 11:06:27 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/daemon.c:
-	  - Listen to the button-release-event signal instead of "clicked" for
-	    notifications.
-
-	* themes/standard/theme.c:
-	  - Another shot at setting the window shape every time. I've read that
-	    there's some gtk 2.8 bug regarding this. Anyhow, in order to
-	    guarantee it, I'm always setting the shape in the expose handler.
-	    Even doing it only once or twice in the expose handler causes issues,
-	    but setting it every time works. We need a better way...
-
-Thu Jan 12 00:57:22 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* themes/standard/theme.c:
-	  - Make sure we shape the window correctly every time we generate the
-	    arrow so that we don't leave artifacts.
-
-Thu Jan 12 00:10:18 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/engines.c:
-	A themes/standard/Makefile.am:
-	A themes/standard/theme.c:
-	* themes/Makefile.am:
-	* configure.ac:
-	  - Add the beginnings of the "standard" theme. This is now the default.
-	    It's not complete. Many things are still missing. Theme selection
-	    will be added later.
-
-Wed Jan 11 01:51:12 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/Makefile.am:
-	* src/daemon.c:
-	D src/eggnotificationbubblewidget.c:
-	D src/eggnotificationbubblewidget.h:
-	A src/engines.c:
-	A src/engines.h:
-	A themes/bubble/Makefile.am:
-	A themes/bubble/eggnotificationbubblewidget.c:
-	A themes/bubble/eggnotificationbubblewidget.h:
-	A themes/bubble/theme.c:
-	A themes/Makefile.am:
-	* Makefile.am:
-	* configure.ac:
-	  - Big change. We're moving to a theme engine model for displaying
-	    notifications. This is something I've wanted for a long time. For now,
-	    the "bubble" theme, as I call it (which we can definitely change) is
-	    the default. We'll make modules configurable by the theme and/or by
-	    the user later. Make sure you do a make install in themes!
-
-Tue Jan 10 23:56:01 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/Makefile.am:
-	A src/daemon.c:
-	A src/daemon.h:
-	A src/notificationdaemon.xml:
-	D src/notifydaemon.c:
-	D src/notifydaemon.h:
-	D src/notifydaemon.xml:
-	* Makefile.am:
-	* autogen.sh:
-	* configure.ac:
-	A notification-daemon.service.in:
-	D notify-daemon.service.in:
-	  - Rename from notify-daemon to notification-daemon. I've received a
-	    number of questions and some complaints about the name change,
-	    some of which are packaging concerns, some upgrade concerns, and
-	    just general confusion and "Why?" As this is the "Desktop
-	    Notifications" project, and due to reasons expressed to me from
-	    others, I feel it's best to revert the name.
-
-Tue Jan 10 23:32:55 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/eggnotificationbubblewidget.c:
-	* src/notifydaemon.c:
-	* configure.ac:
-	  - Although it's a small hack, add support back for D-BUS 0.36+.
-
-Tue Jan 10 22:57:51 PST 2006  Christian Hammond <chipx86 at chipx86.com>
-
-	* src/eggnotificationbubblewidget.c:
-	  - Fix another case of C99 usage.
-
-2006-01-03  John (J5) Palmieri  <johnp at redhat.com>
-
-	* src/eggnotificationbubblewidget.h (struct _DrawingPipeline):
-	Added intermediate pipeline for graphics rendering
-
-	* src/eggnotificationbubblewidget.c 
-	(_stencil_bubble*): These methods now take care of prerendering
-	the graphics to the pipeline and calculating the x, y offset of
-	the arrow
-	(struct DrawingInstruction): intermediate drawing primitive
-	(_drawing_instruction_*): New internal methods for manipulating
-	drawing instructions
-	(_edge_line_to, _close_path): internal convinience methods for
-	drawing skewed lines attached by rounded corners (i.e. you can
-	draw a box and specify the radius of each corner)
-	(egg_notification_bubble_widget_set_pos): prerender the bubble here
-	to get arrow offsets
-	(draw_bubble_widget): Take out all calculations from this expose
-	handler and simply render the precalculated pipeline
-
-==================== 0.3.1 ====================
-
-2005-12-14  John (J5) Palmieri  <johnp at redhat.com>
-
-	* Release 0.3.1
-
-	* src/Makefile.am: fix for building in a seperate build directory
-
-	* configure.ac: Require D-Bus >= 0.60
-
-2005-12-12  John (J5) Palmieri  <johnp at redhat.com>
-
-	* src/eggnotificationbubblewidget.c (size_request_handler): removed
-	(egg_notification_bubble_widget_init): initialize draw_arrow to FALSE
-	(_populate_window): Move adding widgets to the table to the 
-	_layout_window method
-	(draw_bubble_widget): now can draw bubble without the arrow
-	(egg_notification_bubble_widget_set_draw_arrow): New method for setting
-	whether or not we should draw the arrow
-
-	* src/notifydaemon.c (_notify_daemon_add_bubble_to_poptart_stack): new
-	method which is used for adding bubbles without x, y coordinates to the
-	"poptart" stack
-	(_remove_bubble_from_poptart_stack): removes a bubble from the stack
-	and repositions the rest of the stack
-	(notify_daemon_notify_handler): add bubble to poptart stack if no
-	no x, y location given
-
-2005-12-09  John (J5) Palmieri  <johnp at redhat.com>
-
-	* src/eggnotificationbubblewidget.c (_layout_window): Add buttons for
-	actions
-	(draw_bubble_widget): close the cairo path so courner caps work
-	(egg_notification_bubble_widget_create_button): new method to create
-	a button and add it to the bubble
-	(egg_notification_bubble_widget_clear_buttons): new method for clearing
-	up all the buttons in the bubble
-	
-	* src/notifydaemon.xml: make the Notify method async so we can get the
-	sender
-
-	* src/notifydaemon.c (_emit_action_invoked_signal):  Emits the dbus 
-	signal when one of the action buttons is clicked
-	(_emit_closed_signal): emits a Closed signal over the bus when the
-	bubble is closed
-	(_close_notification): call _emit_closed_signal
-	(_notification_daemon_handle_bubble_widget_action): new method - iternal
-	callback we hook up to the buttons' "clicked" signal
-	(notify_daemon_notify_handler): change to an async method
-	store the unique name of the sender that called us
-	setup buttons if actions have been added 
-	
-2005-11-22  John (J5) Palmieri  <johnp at redhat.com>
-
-	* src/eggnotificationbubblewidget.c: Add a more stylized bubble
-	and render in both composite and shaped window mode
-
-2005-11-15  John (J5) Palmieri  <johnp at redhat.com>
-	
-	* Change refrences from notification to notify
-
-2005-11-10  John (J5) Palmieri  <johnp at redhat.com>
-
-	* Makefile.am: remove Doxyfile.in ref 
-
-2005-11-10  John (J5) Palmieri  <johnp at redhat.com>
-
-	* Initial checkin of the next generation notification daemon
+	* Initial import of notification-daemon-xfce. It's
+	  based on version 0.3.5 of the notification-daemon.

Modified: notification-daemon-xfce/trunk/Makefile.am
===================================================================
--- notification-daemon-xfce/trunk/Makefile.am	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/Makefile.am	2006-09-06 19:16:00 UTC (rev 1982)
@@ -3,7 +3,8 @@
 SUBDIRS = 								\
 	po								\
 	src								\
-	themes
+	themes								\
+	settings
 
 AUTOMAKE_OPTIONS =							\
 	1.8								\

Modified: notification-daemon-xfce/trunk/NEWS
===================================================================
--- notification-daemon-xfce/trunk/NEWS	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/NEWS	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1,3 +1,22 @@
+version 0.3.6:
+ 	* Added a GConf key to allow users to specify which corner of the screen
+ 	  notifications should appear in. Patch by M.S. (Ticket #57)
+ 	* Added a Dutch translation from Wouter Bolsterlee. (Bug #55)
+ 	* Fixed compatibility problems with D-BUS v0.61. (Bugs #67, #75)
+ 	* A notification's timeout will now pause while the mouse is hovering over
+ 	  the notification. This allows users to respond to notifications without
+ 	  it suddenly disappearing before the user clicks. (Ticket #73)
+ 	* Fixed a crash under some icon themes where the base size of an icon
+ 	  was being returned as 0. (Bug #61)
+ 	* Fixed an assertion failure under newer versions of GTK+ during a
+ 	  notification's destruction. Patch by Ed Catmur. (Bug #77)
+ 	* Fixed type validation for raw icon data. Patch by Ed Catmur.
+ 	  (Bugs #75, #67)
+ 	* Fixed a problem where a replaces_id that points to a non-existant
+ 	  notification would cause a broken notification where timeouts and
+ 	  action invoking fails. In this case, a new ID is generated. Patch by
+ 	  Ed Catmur. (Bug #76)
+
 version 0.3.5 (26-April-2006):
 	* Add three new required theme functions:
 	  - theme_check_init - determines if the theme is compatible with the

Modified: notification-daemon-xfce/trunk/configure.in.in
===================================================================
--- notification-daemon-xfce/trunk/configure.in.in	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/configure.in.in	2006-09-06 19:16:00 UTC (rev 1982)
@@ -7,7 +7,7 @@
 dnl version info
 m4_define([notification_daemon_major_version], [0])
 m4_define([notification_daemon_minor_version], [3])
-m4_define([notification_daemon_micro_version], [5])
+m4_define([notification_daemon_micro_version], [6])
 
 m4_define([notification_daemon_version], [notification_daemon_major_version().notification_daemon_minor_version().notification_daemon_micro_version()])
 
@@ -54,6 +54,10 @@
 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [0.36])
 XDT_CHECK_PACKAGE([LIBSEXY], [libsexy], [0.1.3])
 
+dnl optional
+XDT_CHECK_OPTIONAL_PACKAGE([XFCE_MCS_MANAGER], [xfce-mcs-manager], [4.2.2],
+                           [mcs-plugin], [xfce-mcs-manager], [yes])
+
 dnl check for debugging support
 XDT_FEATURE_DEBUG()
 
@@ -64,4 +68,5 @@
 themes/Makefile
 themes/bubble/Makefile
 themes/standard/Makefile
+settings/Makefile
 ])

Modified: notification-daemon-xfce/trunk/org.freedesktop.Notifications.service.in
===================================================================
--- notification-daemon-xfce/trunk/org.freedesktop.Notifications.service.in	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/org.freedesktop.Notifications.service.in	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1,3 +1,3 @@
 [D-BUS Service]
 Name=org.freedesktop.Notifications
-Exec=@libexecdir@/notification-daemon
+Exec=@libexecdir@/notification-daemon-xfce

Modified: notification-daemon-xfce/trunk/po/POTFILES.in
===================================================================
--- notification-daemon-xfce/trunk/po/POTFILES.in	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/po/POTFILES.in	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1 +1,3 @@
-
+settings/main.c
+settings/mcs_plugin.c
+settings/notification-settings.desktop.in

Added: notification-daemon-xfce/trunk/po/notification-daemon-xfce.pot
===================================================================
--- notification-daemon-xfce/trunk/po/notification-daemon-xfce.pot	                        (rev 0)
+++ notification-daemon-xfce/trunk/po/notification-daemon-xfce.pot	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,62 @@
+# 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.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-09-06 21:12+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../settings/main.c:57
+msgid "Top Left"
+msgstr ""
+
+#: ../settings/main.c:58
+msgid "Top Right"
+msgstr ""
+
+#: ../settings/main.c:59
+msgid "Bottom Left"
+msgstr ""
+
+#: ../settings/main.c:60
+msgid "Bottom Right"
+msgstr ""
+
+#: ../settings/main.c:155 ../settings/notification-settings.desktop.in.h:2
+msgid "Notification Settings"
+msgstr ""
+
+#: ../settings/main.c:162
+msgid "Configure the Xfce notification daemon"
+msgstr ""
+
+#: ../settings/main.c:177
+msgid ""
+"To change the notification daemon settings, you need to restart the daemon."
+msgstr ""
+
+#: ../settings/main.c:188
+msgid "Notification _position:"
+msgstr ""
+
+#: ../settings/mcs_plugin.c:41
+msgid "Failed to launch notification-settings"
+msgstr ""
+
+#: ../settings/mcs_plugin.c:61
+msgid "Button Label|Notification Settings"
+msgstr ""
+
+#: ../settings/notification-settings.desktop.in.h:1
+msgid "Customize the notification daemon settings"
+msgstr ""

Added: notification-daemon-xfce/trunk/settings/Makefile.am
===================================================================
--- notification-daemon-xfce/trunk/settings/Makefile.am	                        (rev 0)
+++ notification-daemon-xfce/trunk/settings/Makefile.am	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,82 @@
+# $Id$
+
+##
+## global includes
+##
+INCLUDES = 								\
+	-I$(top_srcdir)							\
+	-DBINDIR=\"$(bindir)\"						\
+	-DDATADIR=\"$(datadir)\"					\
+	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
+
+##
+## settings application
+##
+bin_PROGRAMS =								\
+	notification-settings
+
+notification_settings_SOURCES =						\
+	main.c
+
+notification_settings_CFLAGS =						\
+	$(GTK_CFLAGS)							\
+	$(LIBXFCE4UTIL_CFLAGS)						\
+	$(LIBXFCEGUI4_CFLAGS)
+
+notification_settings_LDFLAGS =						\
+	-no-undefined
+
+notification_settings_LDADD =						\
+	$(GTK_LIBS)							\
+	$(LIBXFCE4UTIL_LIBS)						\
+	$(LIBXFCEGUI4_LIBS)
+
+##
+## .desktop file
+##
+desktopdir = $(datadir)/applications
+desktop_in_files =							\
+	notification-settings.desktop.in
+desktop_DATA =								\
+	$(desktop_in_files:.desktop.in=.desktop)
+ at INTLTOOL_DESKTOP_RULE@
+
+##
+## build mcs wrapper plugin if xfce-mcs-manager is present.
+##
+if HAVE_XFCE_MCS_MANAGER
+plugindir = $(libdir)/xfce4/mcs-plugins
+plugin_LTLIBRARIES =							\
+	notification_settings.la
+
+notification_settings_la_SOURCES =					\
+	mcs_plugin.c
+
+notification_settings_la_CFLAGS =					\
+	$(XFCE_MCS_MANAGER_CFLAGS)
+
+notification_settings_la_LDFLAGS =					\
+	-avoid-version							\
+	-module
+
+notification_settings_la_LIBADD =					\
+	$(XFCE_MCS_MANAGER_LIBS)
+endif
+
+##
+## notification settings icon
+##
+iconsdir = $(datadir)/icons/hicolor/48x48/apps
+icons_DATA =								\
+	notification-settings.png
+
+
+##
+## automake stuff
+##
+CLEANFILES =								\
+	$(desktop_DATA)
+
+EXTRA_DIST =								\
+	$(desktop_in_files)						\
+	$(icons_DATA)


Property changes on: notification-daemon-xfce/trunk/settings/Makefile.am
___________________________________________________________________
Name: svn:keywords
   + Id

Added: notification-daemon-xfce/trunk/settings/main.c
===================================================================
--- notification-daemon-xfce/trunk/settings/main.c	                        (rev 0)
+++ notification-daemon-xfce/trunk/settings/main.c	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,240 @@
+/* $Id$
+ *
+ * Copyright (c) 2006 Nick Schermer <nick at xfce.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4util/libxfce4util.h>
+
+
+#define BORDER           6
+#define DEFAULT_POSITION "buttom_right"
+#define NOTIFY_RC_FILE   "xfce4/notify/notify.rc"
+
+
+
+typedef struct
+{
+  const gchar *name;
+  const gchar *identifier;
+}
+PopupLocation;
+
+
+
+static const PopupLocation popup_locations[] =
+{
+  { N_("Top Left"),     "top_left"     },
+  { N_("Top Right"),    "top_right"    },
+  { N_("Bottom Left"),  "bottom_left"  },
+  { N_("Bottom Right"), "bottom_right" },
+  {    NULL,            NULL           }
+};
+
+
+
+static void
+notification_settings_save_position (GtkComboBox *combobox)
+{
+  const PopupLocation *l;
+  gint                 i = 0, selected;
+  gchar               *identifier;
+  gchar               *file;
+  XfceRc              *rc;
+
+  /* get active selected item */
+  selected = gtk_combo_box_get_active (combobox);
+
+  /* lookup the identifier name */
+  for (l = popup_locations; l->name != NULL; l++)
+    {
+       if (i == selected)
+         {
+            identifier = g_strdup (l->identifier);
+            break;
+         }
+
+       i++;
+    }
+
+  /* security */
+  if (G_UNLIKELY (identifier == NULL))
+    identifier = g_strdup (DEFAULT_POSITION);
+
+  /* save identifier */
+  file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, NOTIFY_RC_FILE, TRUE);
+  if (G_LIKELY (file))
+    {
+       rc = xfce_rc_simple_open (file, FALSE);
+       g_free (file);
+
+       if (G_LIKELY (rc))
+         {
+            xfce_rc_write_entry (rc, "popup_location", identifier);
+
+            xfce_rc_close (rc);
+         }
+    }
+
+    /* cleanup */
+    g_free (identifier);
+}
+
+
+
+static gchar *
+notification_settings_get_position (void)
+{
+  gchar       *file;
+  XfceRc      *rc;
+  const gchar *value;
+  gchar       *position = NULL;
+
+  file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, NOTIFY_RC_FILE, TRUE);
+  if (G_LIKELY (file))
+    {
+       rc = xfce_rc_simple_open (file, TRUE);
+       g_free (file);
+
+       if (G_LIKELY (rc))
+         {
+            value = xfce_rc_read_entry (rc, "popup_location", NULL);
+
+            if (G_LIKELY (value))
+              position = g_strdup (value);
+
+            xfce_rc_close (rc);
+         }
+    }
+
+  if (G_UNLIKELY (position == NULL))
+    position = g_strdup (DEFAULT_POSITION);
+
+  return position;
+}
+
+
+static GtkWidget *
+notifications_settings_dialog_new (void)
+{
+  GtkWidget           *dialog, *dialog_vbox, *hbox, *image, *label, *combobox;
+  const PopupLocation *l;
+  gint                 i = 0;
+  gchar               *active;
+
+  dialog = xfce_titled_dialog_new_with_buttons (_("Notification Settings"),
+                                                NULL,
+                                                GTK_DIALOG_NO_SEPARATOR,
+                                                GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
+                                                NULL);
+  gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
+  xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog),
+    _("Configure the Xfce notification daemon"));
+  gtk_window_set_icon_name (GTK_WINDOW (dialog), "notification-settings");
+
+  dialog_vbox = GTK_DIALOG (dialog)->vbox;
+
+  hbox = gtk_hbox_new (FALSE, BORDER);
+  gtk_widget_show (hbox);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox), hbox, FALSE, FALSE, 0);;
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), BORDER);
+
+  image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_LARGE_TOOLBAR);
+  gtk_misc_set_alignment (GTK_MISC (image), 0, 0.5);
+  gtk_widget_show (image);
+  gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+
+  label = gtk_label_new (_("To change the notification daemon settings, "
+                           "you need to restart the daemon."));
+  gtk_widget_show (label);
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+
+  hbox = gtk_hbox_new (FALSE, BORDER);
+  gtk_widget_show (hbox);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox), hbox, FALSE, FALSE, 0);;
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), BORDER);
+
+  label = gtk_label_new_with_mnemonic (_("Notification _position:"));
+  gtk_widget_show (label);
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+  combobox = gtk_combo_box_new_text ();
+  gtk_widget_show (combobox);
+  gtk_box_pack_start (GTK_BOX (hbox), combobox, TRUE, TRUE, 0);
+
+  active = notification_settings_get_position ();
+
+  for (l = popup_locations; l->name != NULL; l++)
+    {
+       gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), l->name);
+
+       if (!strcmp(active, l->identifier))
+         gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), i);
+
+       i++;
+    }
+
+  g_signal_connect(G_OBJECT(combobox), "changed",
+    G_CALLBACK(notification_settings_save_position), NULL);
+
+  g_free (active);
+
+  gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox);
+
+  return dialog;
+}
+
+int
+main (int argc, char **argv)
+{
+  GtkWidget *dialog;
+
+#ifdef GETTEXT_PACKAGE
+  xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+#endif
+
+  gtk_init (&argc, &argv);
+
+  /* default icon name */
+  gtk_window_set_default_icon_name ("notification-settings");
+
+  /* show settings dialog */
+  dialog = notifications_settings_dialog_new ();
+  gtk_dialog_run (GTK_DIALOG (dialog));
+
+  /* close dialog */
+  gtk_widget_destroy (dialog);
+
+  return 0;
+}


Property changes on: notification-daemon-xfce/trunk/settings/main.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: notification-daemon-xfce/trunk/settings/mcs_plugin.c
===================================================================
--- notification-daemon-xfce/trunk/settings/mcs_plugin.c	                        (rev 0)
+++ notification-daemon-xfce/trunk/settings/mcs_plugin.c	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,81 @@
+/* $Id$
+ *
+ * Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>.
+ * Copyright (c) 2006 Nick Schermer <nick at xfce.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libxfcegui4/libxfcegui4.h>
+#include <xfce-mcs-manager/manager-plugin.h>
+
+
+
+static void
+run_dialog (McsPlugin *plugin)
+{
+  GtkWidget *message;
+  GError    *error = NULL;
+  gchar     *argv[] = { BINDIR G_DIR_SEPARATOR_S "notification-settings", NULL };
+
+  if (!g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, &error))
+    {
+      message = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+                                        "%s.", _("Failed to launch notification-settings"));
+      gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message), "%s.", error->message);
+      gtk_dialog_run (GTK_DIALOG (message));
+      gtk_widget_destroy (message);
+      g_error_free (error);
+    }
+}
+
+
+
+McsPluginInitResult
+mcs_plugin_init (McsPlugin *plugin)
+{
+  GtkIconTheme *icon_theme;
+
+  /* setup i18n support */
+  xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+
+  /* initialize plugin structure */
+  plugin->plugin_name = g_strdup ("notification-settings");
+  plugin->caption = g_strdup (Q_ ("Button Label|Notification Settings"));
+  plugin->run_dialog = run_dialog;
+
+  /* lookup the icon (on the default icon theme, *sigh*) */
+  icon_theme = gtk_icon_theme_get_default ();
+  plugin->icon = gtk_icon_theme_load_icon (icon_theme, "notification-settings", 48, 0, NULL);
+
+  /* if that didn't work, we know where we installed the icon, so load it directly */
+  if (G_UNLIKELY (plugin->icon == NULL))
+    plugin->icon = gdk_pixbuf_new_from_file (DATADIR "/icons/hicolor/48x48/notification-settings.png", NULL);
+
+  /* attach icon name to the plugin icon (if any) */
+  if (G_LIKELY (plugin->icon != NULL))
+    g_object_set_data_full (G_OBJECT (plugin->icon), "mcs-plugin-icon-name", g_strdup ("notification-settings"), g_free);
+
+  return MCS_PLUGIN_INIT_OK;
+}
+
+
+
+MCS_PLUGIN_CHECK_INIT;


Property changes on: notification-daemon-xfce/trunk/settings/mcs_plugin.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: notification-daemon-xfce/trunk/settings/notification-settings.desktop.in
===================================================================
--- notification-daemon-xfce/trunk/settings/notification-settings.desktop.in	                        (rev 0)
+++ notification-daemon-xfce/trunk/settings/notification-settings.desktop.in	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,15 @@
+
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Exec=notification-settings
+Icon=notification-settings
+Type=Application
+Terminal=false
+StartupNotify=true
+OnlyShowIn=XFCE;
+Categories=X-XFCE;Settings;DesktopSettings;
+_Name=Notification Settings
+_GenericName=Notification Settings
+_Comment=Customize the notification daemon settings
+Name=notification-settings.desktop.in

Added: notification-daemon-xfce/trunk/settings/notification-settings.png
===================================================================
(Binary files differ)


Property changes on: notification-daemon-xfce/trunk/settings/notification-settings.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: notification-daemon-xfce/trunk/src/Makefile.am
===================================================================
--- notification-daemon-xfce/trunk/src/Makefile.am	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/src/Makefile.am	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1,15 +1,17 @@
 # $Id$
 
 libexec_PROGRAMS =							\
-	notification-daemon
+	notification-daemon-xfce
 
-notification_daemon_SOURCES =						\
+notification_daemon_xfce_SOURCES =					\
+	daemon.c							\
+	daemon.h							\
 	engines.c							\
 	engines.h							\
-	daemon.c							\
-	daemon.h
+	stack.c								\
+	stack.h
 
-notification_daemon_LDADD =						\
+notification_daemon_xfce_LDADD =					\
 	$(GTK_LIBS)							\
 	$(LIBXFCEGUI4_LIBS)						\
 	$(LIBXFCE4UTIL_LIBS)						\
@@ -31,7 +33,7 @@
 	$(LIBXFCE$UTIL_CFLAGS)						\
 	$(DBUS_CFLAGS)							\
 	$(DBUS_GLIB_CFLAGS)						\
-	-DENGINES_DIR=\"$(libdir)/notification-daemon-1.0/engines\"
+	-DENGINES_DIR=\"$(libdir)/notification-daemon-xfce-1.0/engines\"
 
 EXTRA_DIST = 								\
 	notificationdaemon.xml

Modified: notification-daemon-xfce/trunk/src/daemon.c
===================================================================
--- notification-daemon-xfce/trunk/src/daemon.c	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/src/daemon.c	2006-09-06 19:16:00 UTC (rev 1982)
@@ -29,6 +29,7 @@
 
 #include <dbus/dbus.h>
 #include <dbus/dbus-glib.h>
+
 #include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
@@ -41,34 +42,62 @@
 #include <gdk/gdkx.h>
 
 #include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4util/libxfce4util.h>
 
 #include "daemon.h"
 #include "engines.h"
+#include "stack.h"
 #include "notificationdaemon-dbus-glue.h"
 
 #define IMAGE_SIZE 48
 
-struct _NotifyTimeout
+#define NW_GET_NOTIFY_ID(nw) \
+	(GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(nw), "_notify_id")))
+#define NW_GET_NOTIFY_SENDER(nw) \
+	(g_object_get_data(G_OBJECT(nw), "_notify_sender"))
+#define NW_GET_DAEMON(nw) \
+	(g_object_get_data(G_OBJECT(nw), "_notify_daemon"))
+
+typedef struct
 {
+	NotifyStackLocation type;
+	const gchar *identifier;
+
+} PopupNotifyStackLocation;
+
+const PopupNotifyStackLocation popup_stack_locations[] =
+{
+	{NOTIFY_STACK_LOCATION_TOP_LEFT,     "top_left"     },
+	{NOTIFY_STACK_LOCATION_TOP_RIGHT,    "top_right"    },
+	{NOTIFY_STACK_LOCATION_BOTTOM_LEFT,  "bottom_left"  },
+	{NOTIFY_STACK_LOCATION_BOTTOM_RIGHT, "bottom_right" },
+	{NOTIFY_STACK_LOCATION_UNKNOWN,      NULL }
+};
+
+#define POPUP_STACK_DEFAULT_INDEX 3 /* XXX Hack! */
+
+typedef struct
+{
 	GTimeVal expiration;
+	GTimeVal paused_diff;
 	gboolean has_timeout;
+	gboolean paused;
 	guint id;
-
 	GtkWindow *nw;
-};
 
-typedef struct _NotifyTimeout NotifyTimeout;
+} NotifyTimeout;
 
 struct _NotifyDaemonPrivate
 {
 	guint next_id;
 	guint timeout_source;
 	GHashTable *notification_hash;
-	GSList *poptart_stack;
 	gboolean url_clicked_lock;
+	NotifyStack **stacks;
+	gint stacks_size;
 };
 
-/* static GConfClient *gconf_client = NULL; */
+static DBusConnection *dbus_conn = NULL;
 
 #define CHECK_DBUS_VERSION(major, minor) \
 	(DBUS_MAJOR_VER > (major) || \
@@ -88,8 +117,9 @@
 static void notify_daemon_finalize(GObject *object);
 static void _close_notification(NotifyDaemon *daemon, guint id,
 								gboolean hide_notification);
-static void _emit_closed_signal(GObject *notify_widget);
+static void _emit_closed_signal(GtkWindow *nw);
 static void _action_invoked_cb(GtkWindow *nw, const char *key);
+static NotifyStackLocation get_stack_location_from_string(const char *slocation);
 
 G_DEFINE_TYPE(NotifyDaemon, notify_daemon, G_TYPE_OBJECT);
 
@@ -113,11 +143,55 @@
 static void
 notify_daemon_init(NotifyDaemon *daemon)
 {
+	NotifyStackLocation location;
+	GdkDisplay *display;
+	GdkScreen *screen;
+	gchar *slocation = NULL;
+	gchar *file;
+	XfceRc *rc;
+	const gchar *value;
+	gint i;
+
 	daemon->priv = G_TYPE_INSTANCE_GET_PRIVATE(daemon, NOTIFY_TYPE_DAEMON,
 											   NotifyDaemonPrivate);
 
 	daemon->priv->next_id = 1;
 	daemon->priv->timeout_source = 0;
+
+	/* load popup location from rc file */
+	file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, NOTIFY_RC_FILE, TRUE);
+	if (file)
+	{
+		rc = xfce_rc_simple_open (file, FALSE);
+		g_free (file);
+
+		if (rc)
+		{
+			value = xfce_rc_read_entry (rc, "popup_location", NULL);
+
+			if (value)
+				slocation = g_strdup (value);
+			else
+				xfce_rc_write_entry (rc, "popup_location", "bottom_right");
+
+			xfce_rc_close (rc);
+		}
+	}
+
+	location = get_stack_location_from_string(slocation);
+	g_free(slocation);
+
+	display = gdk_display_get_default();
+	screen = gdk_display_get_default_screen(display);
+	daemon->priv->stacks_size = gdk_screen_get_n_monitors(screen);
+	daemon->priv->stacks = g_new0(NotifyStack *, daemon->priv->stacks_size);
+
+	for (i = 0; i < daemon->priv->stacks_size; i++)
+	{
+		daemon->priv->stacks[i] = notify_stack_new(daemon, screen,
+												   i, location);
+	}
+
 	daemon->priv->notification_hash =
 		g_hash_table_new_full(g_int_hash, g_int_equal, g_free,
 							  (GDestroyNotify)_notify_timeout_destroy);
@@ -126,115 +200,84 @@
 static void
 notify_daemon_finalize(GObject *object)
 {
-	NotifyDaemon *daemon;
-	GObjectClass *parent_class;
+	NotifyDaemon *daemon       = NOTIFY_DAEMON(object);
+	GObjectClass *parent_class = G_OBJECT_CLASS(notify_daemon_parent_class);
 
-	daemon = NOTIFY_DAEMON(object);
-
 	g_hash_table_destroy(daemon->priv->notification_hash);
-	g_slist_free(daemon->priv->poptart_stack);
+	g_free(daemon->priv);
 
-	parent_class = G_OBJECT_CLASS(notify_daemon_parent_class);
-
 	if (parent_class->finalize != NULL)
 		parent_class->finalize(object);
 }
 
-NotifyDaemon *
-notify_daemon_new(void)
+static NotifyStackLocation
+get_stack_location_from_string(const char *slocation)
 {
-	return g_object_new(NOTIFY_TYPE_DAEMON, NULL);
-}
+	NotifyStackLocation stack_location = NOTIFY_STACK_LOCATION_DEFAULT;
 
-static void
-_action_invoked_cb(GtkWindow *nw, const char *key)
-{
-	NotifyDaemon *daemon = g_object_get_data(G_OBJECT(nw), "_notify_daemon");
-	DBusConnection *con;
-	DBusError error;
-
-	dbus_error_init(&error);
-
-	con = dbus_bus_get(DBUS_BUS_SESSION, &error);
-
-	if (con == NULL)
-	{
-		g_warning("Error sending ActionInvoked signal: %s", error.message);
-		dbus_error_free(&error);
-	}
+	if (slocation == NULL || *slocation == '\0')
+		return NOTIFY_STACK_LOCATION_DEFAULT;
 	else
 	{
-		DBusMessage *message;
-		gchar *dest;
-		guint id;
+		const PopupNotifyStackLocation *l;
 
-		message = dbus_message_new_signal("/org/freedesktop/Notifications",
-										  "org.freedesktop.Notifications",
-										  "ActionInvoked");
+		for (l = popup_stack_locations;
+			 l->type != NOTIFY_STACK_LOCATION_UNKNOWN;
+			 l++)
+		{
+			if (!strcmp(slocation, l->identifier))
+				stack_location = l->type;
+		}
+	}
 
-		dest = g_object_get_data(G_OBJECT(nw), "_notify_sender");
-		id = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(nw), "_notify_id"));
+	return stack_location;
+}
 
-		g_assert(dest != NULL);
+static DBusMessage *
+create_signal(GtkWindow *nw, const char *signal_name)
+{
+	guint id = NW_GET_NOTIFY_ID(nw);
+	gchar *dest = NW_GET_NOTIFY_SENDER(nw);
+	DBusMessage *message;
 
-		dbus_message_set_destination(message, dest);
-		dbus_message_append_args(message,
-								 DBUS_TYPE_UINT32, &id,
-								 DBUS_TYPE_STRING, &key,
-								 DBUS_TYPE_INVALID);
+	g_assert(dest != NULL);
 
-		dbus_connection_send(con, message, NULL);
+	message = dbus_message_new_signal("/org/freedesktop/Notifications",
+									  "org.freedesktop.Notifications",
+									  signal_name);
 
-		dbus_message_unref(message);
-		dbus_connection_unref(con);
-	}
+	dbus_message_set_destination(message, dest);
+	dbus_message_append_args(message,
+							 DBUS_TYPE_UINT32, &id,
+							 DBUS_TYPE_INVALID);
 
-	_close_notification(
-		daemon,
-		GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(nw), "_notify_id")),
-		TRUE);
+	return message;
 }
 
 static void
-_emit_closed_signal(GObject *notify_widget)
+_action_invoked_cb(GtkWindow *nw, const char *key)
 {
-	DBusConnection *con;
-	DBusError error;
+	NotifyDaemon *daemon = NW_GET_DAEMON(nw);
+	guint id = NW_GET_NOTIFY_ID(nw);
+	DBusMessage *message;
 
-	dbus_error_init(&error);
+	message = create_signal(nw, "ActionInvoked");
+	dbus_message_append_args(message,
+							 DBUS_TYPE_STRING, &key,
+							 DBUS_TYPE_INVALID);
 
-	con = dbus_bus_get(DBUS_BUS_SESSION, &error);
+	dbus_connection_send(dbus_conn, message, NULL);
+	dbus_message_unref(message);
 
-	if (con == NULL)
-	{
-		g_warning("Error sending Close signal: %s", error.message);
-		dbus_error_free(&error);
-	}
-	else
-	{
-		DBusMessage *message;
-		gchar *dest;
-		guint id;
+	_close_notification(daemon, id, TRUE);
+}
 
-		message = dbus_message_new_signal("/org/freedesktop/Notifications",
-										  "org.freedesktop.Notifications",
-										  "NotificationClosed");
-
-		dest = g_object_get_data(notify_widget, "_notify_sender");
-		id = GPOINTER_TO_UINT(g_object_get_data(notify_widget, "_notify_id"));
-
-		g_assert(dest != NULL);
-
-		dbus_message_set_destination(message, dest);
-		dbus_message_append_args(message,
-								 DBUS_TYPE_UINT32, &id,
-								 DBUS_TYPE_INVALID);
-
-		dbus_connection_send(con, message, NULL);
-
-		dbus_message_unref(message);
-		dbus_connection_unref(con);
-	}
+static void
+_emit_closed_signal(GtkWindow *nw)
+{
+	DBusMessage *message = create_signal(nw, "NotificationClosed");
+	dbus_connection_send(dbus_conn, message, NULL);
+	dbus_message_unref(message);
 }
 
 static void
@@ -247,7 +290,7 @@
 
 	if (nt != NULL)
 	{
-		_emit_closed_signal(G_OBJECT(nt->nw));
+		_emit_closed_signal(nt->nw);
 
 		if (hide_notification)
 			theme_hide_notification(nt->nw);
@@ -259,12 +302,53 @@
 static void
 _notification_destroyed_cb(GtkWindow *nw, NotifyDaemon *daemon)
 {
-	_close_notification(
-		daemon,
-		GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(nw), "_notify_id")),
-		FALSE);
+	_close_notification(daemon, NW_GET_NOTIFY_ID(nw), FALSE);
 }
 
+static void
+_mouse_entered_cb(GtkWindow *nw, GdkEventCrossing *event, NotifyDaemon *daemon)
+{
+	NotifyTimeout *nt;
+	guint id;
+	GTimeVal now;
+
+	if (event->detail == GDK_NOTIFY_INFERIOR)
+		return;
+
+	id = NW_GET_NOTIFY_ID(nw);
+	nt = (NotifyTimeout *)g_hash_table_lookup(daemon->priv->notification_hash,
+											  &id);
+
+	nt->paused = TRUE;
+	g_get_current_time(&now);
+
+	nt->paused_diff.tv_usec = nt->expiration.tv_usec - now.tv_usec;
+	nt->paused_diff.tv_sec  = nt->expiration.tv_sec  - now.tv_sec;
+
+	if (nt->paused_diff.tv_usec < 0)
+	{
+		nt->paused_diff.tv_usec += G_USEC_PER_SEC;
+		nt->paused_diff.tv_sec--;
+	}
+}
+
+static void
+_mouse_exitted_cb(GtkWindow *nw, GdkEventCrossing *event,
+				  NotifyDaemon *daemon)
+{
+	NotifyTimeout *nt;
+	guint id;
+
+	if (event->detail == GDK_NOTIFY_INFERIOR)
+		return;
+
+	id = NW_GET_NOTIFY_ID(nw);
+	nt = (NotifyTimeout *)g_hash_table_lookup(daemon->priv->notification_hash,
+											  &id);
+
+	nt->paused = FALSE;
+}
+
 static gboolean
 _is_expired(gpointer key, gpointer value, gpointer data)
 {
@@ -286,11 +370,24 @@
 	if (now_time > expiration_time)
 	{
 		theme_notification_tick(nt->nw, 0);
-		_emit_closed_signal(G_OBJECT(nt->nw));
+		_emit_closed_signal(nt->nw);
 		return TRUE;
 	}
+	else if (nt->paused)
+	{
+		nt->expiration.tv_usec = nt->paused_diff.tv_usec + now.tv_usec;
+		nt->expiration.tv_sec  = nt->paused_diff.tv_sec  + now.tv_sec;
+
+		if (nt->expiration.tv_usec >= G_USEC_PER_SEC)
+		{
+			nt->expiration.tv_usec -= G_USEC_PER_SEC;
+			nt->expiration.tv_sec++;
+		}
+	}
 	else
+	{
 		theme_notification_tick(nt->nw, expiration_time - now_time);
+	}
 
 	*phas_more_timeouts = TRUE;
 
@@ -343,9 +440,8 @@
 
 		if (daemon->priv->timeout_source == 0)
 		{
-			daemon->priv->timeout_source = g_timeout_add(100,
-														 _check_expiration,
-														 daemon);
+			daemon->priv->timeout_source =
+				g_timeout_add(100, _check_expiration, daemon);
 		}
 	}
 }
@@ -399,13 +495,27 @@
 	GValueArray *image_struct;
 	GValue *value;
 	GArray *tmp_array;
+#if CHECK_DBUS_VERSION(0, 61)
+	GType struct_type;
 
-	if (!G_VALUE_HOLDS(icon_data, G_TYPE_VALUE_ARRAY))
+	struct_type = dbus_g_type_get_struct(
+		"GValueArray",
+		G_TYPE_INT,
+		G_TYPE_INT,
+		G_TYPE_INT,
+		G_TYPE_BOOLEAN,
+		G_TYPE_INT,
+		G_TYPE_INT,
+		dbus_g_type_get_collection("GArray", G_TYPE_UCHAR),
+		G_TYPE_INVALID);
+
+	if (!G_VALUE_HOLDS(icon_data, struct_type))
 	{
 		g_warning("_notify_daemon_process_icon_data expected a "
 				  "GValue of type GValueArray");
 		return FALSE;
 	}
+#endif /* D-BUS >= 0.61 */
 
 	image_struct = (GValueArray *)g_value_get_boxed(icon_data);
 	value = g_value_array_get_nth(image_struct, 0);
@@ -561,151 +671,15 @@
 	}
 
 	_action_invoked_cb(nw, "default");
-
-	_close_notification(
-		daemon,
-		GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(nw), "_notify_id")),
-		TRUE);
+	_close_notification(daemon, NW_GET_NOTIFY_ID(nw), TRUE);
 }
 
-static gboolean
-get_work_area(GtkWidget *nw, GdkRectangle *rect)
-{
-	Atom workarea = XInternAtom(GDK_DISPLAY(), "_NET_WORKAREA", True);
-	Atom type;
-	Window win;
-	int format;
-	gulong num, leftovers;
-	gulong max_len = 4 * 32;
-	guchar *ret_workarea;
-	long *workareas;
-	int result;
-	GdkScreen *screen;
-	int disp_screen;
 
-	gtk_widget_realize(nw);
-	screen = gdk_drawable_get_screen(GDK_DRAWABLE(nw->window));
-	disp_screen = GDK_SCREEN_XNUMBER(screen);
 
-	/* Defaults in case of error */
-	rect->x = 0;
-	rect->y = 0;
-	rect->width = gdk_screen_get_width(screen);
-	rect->height = gdk_screen_get_height(screen);
-
-	if (workarea == None)
-		return FALSE;
-
-	win = XRootWindow(GDK_DISPLAY(), disp_screen);
-	result = XGetWindowProperty(GDK_DISPLAY(), win, workarea, 0,
-								max_len, False, AnyPropertyType,
-								&type, &format, &num, &leftovers,
-								&ret_workarea);
-
-	if (result != Success || type == None || format == 0 || leftovers ||
-		num % 4)
-	{
-		return FALSE;
-	}
-
-	workareas = (long *)ret_workarea;
-	rect->x      = workareas[disp_screen * 4];
-	rect->y      = workareas[disp_screen * 4 + 1];
-	rect->width  = workareas[disp_screen * 4 + 2];
-	rect->height = workareas[disp_screen * 4 + 3];
-
-	XFree(ret_workarea);
-
-	return TRUE;
-}
-
 static void
-_remove_bubble_from_poptart_stack(GtkWindow *nw, NotifyDaemon *daemon)
-{
-	NotifyDaemonPrivate *priv = daemon->priv;
-	GdkRectangle workarea;
-	GSList *remove_link = NULL;
-	GSList *link;
-	gint x, y;
-
-	get_work_area(GTK_WIDGET(nw), &workarea);
-
-	y = workarea.y + workarea.height;
-	x = 0;
-
-	for (link = priv->poptart_stack; link != NULL; link = link->next)
-	{
-		GtkWindow *nw2 = link->data;
-		GtkRequisition req;
-
-		if (nw2 != nw)
-		{
-			gtk_widget_size_request(GTK_WIDGET(nw2), &req);
-
-			x = workarea.x + workarea.width - req.width;
-			y = y - req.height;
-
-			theme_move_notification(nw2, x, y);
-		}
-		else
-		{
-			remove_link = link;
-		}
-	}
-
-	if (remove_link)
-	{
-		priv->poptart_stack = g_slist_remove_link(priv->poptart_stack,
-												  remove_link);
-	}
-}
-
-static void
-_notify_daemon_add_bubble_to_poptart_stack(NotifyDaemon *daemon,
-										   GtkWindow *nw,
-										   gboolean new_notification)
-{
-	NotifyDaemonPrivate *priv = daemon->priv;
-	GtkRequisition req;
-	GdkRectangle workarea;
-	GSList *link;
-	gint x, y;
-
-	gtk_widget_size_request(GTK_WIDGET(nw), &req);
-
-	get_work_area(GTK_WIDGET(nw), &workarea);
-
-	x = workarea.x + workarea.width - req.width;
-	y = workarea.y + workarea.height - req.height;
-
-	theme_move_notification(nw, x, y);
-
-	for (link = priv->poptart_stack; link != NULL; link = link->next)
-	{
-		GtkWindow *nw2 = GTK_WINDOW(link->data);
-
-		if (nw2 != nw)
-		{
-			gtk_widget_size_request(GTK_WIDGET(nw2), &req);
-			x = workarea.x + workarea.width - req.width;
-			y = y - req.height;
-			theme_move_notification(nw2, x, y);
-		}
-	}
-
-	if (new_notification)
-	{
-		g_signal_connect(G_OBJECT(nw), "destroy",
-						 G_CALLBACK(_remove_bubble_from_poptart_stack),
-						 daemon);
-		priv->poptart_stack = g_slist_prepend(priv->poptart_stack, nw);
-	}
-}
-
-static void
 url_clicked_cb(GtkWindow *nw, const char *url)
 {
-	NotifyDaemon *daemon = g_object_get_data(G_OBJECT(nw), "_notify_daemon");
+	NotifyDaemon *daemon = NW_GET_DAEMON(nw);
 	char *escaped_url;
 	char *cmd = NULL;
 
@@ -850,6 +824,8 @@
 
 		if (nt != NULL)
 			nw = nt->nw;
+		else
+			id = 0;
 	}
 
 	if (nw == NULL)
@@ -863,6 +839,10 @@
 						 G_CALLBACK(window_clicked_cb), daemon);
 		g_signal_connect(G_OBJECT(nw), "destroy",
 						 G_CALLBACK(_notification_destroyed_cb), daemon);
+		g_signal_connect(G_OBJECT(nw), "enter-notify-event",
+						 G_CALLBACK(_mouse_entered_cb), daemon);
+		g_signal_connect(G_OBJECT(nw), "leave-notify-event",
+						 G_CALLBACK(_mouse_exitted_cb), daemon);
 	}
 	else
 	{
@@ -939,11 +919,16 @@
 
 			if (icon_info != NULL)
 			{
-				pixbuf = gtk_icon_theme_load_icon(
-					theme, icon,
-					MIN(IMAGE_SIZE, gtk_icon_info_get_base_size(icon_info)),
-					GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+				gint icon_size = MIN(IMAGE_SIZE,
+									 gtk_icon_info_get_base_size(icon_info));
 
+				if (icon_size == 0)
+					icon_size = IMAGE_SIZE;
+
+				pixbuf = gtk_icon_theme_load_icon(theme, icon, icon_size,
+												  GTK_ICON_LOOKUP_USE_BUILTIN,
+												  NULL);
+
 				gtk_icon_info_free(icon_info);
 			}
 
@@ -973,9 +958,18 @@
 	}
 	else
 	{
+		gint monitor;
+		GdkScreen *screen;
+		gint x, y;
+
 		theme_set_notification_arrow(nw, FALSE, 0, 0);
-		_notify_daemon_add_bubble_to_poptart_stack(daemon, nw,
-												   new_notification);
+
+		gdk_display_get_pointer(gdk_display_get_default(),
+								&screen, &x, &y, NULL);
+		monitor = gdk_screen_get_monitor_at_point(screen, x, y);
+		g_assert(monitor >= 0 && monitor < priv->stacks_size);
+
+		notify_stack_add_window(priv->stacks[monitor], nw, new_notification);
 	}
 
 	if (!screensaver_active(GTK_WIDGET(nw)) &&
@@ -1008,7 +1002,7 @@
 
 gboolean
 notify_daemon_close_notification_handler(NotifyDaemon *daemon,
-										 guint id, GError ** error)
+										 guint id, GError **error)
 {
 	_close_notification(daemon, id, TRUE);
 
@@ -1059,6 +1053,7 @@
 	gtk_init(&argc, &argv);
 
 	error = NULL;
+
 	connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
 
 	if (connection == NULL)
@@ -1069,6 +1064,8 @@
 		exit(1);
 	}
 
+	dbus_conn = dbus_g_connection_get_connection(connection);
+
 	dbus_g_object_type_install_info(NOTIFY_TYPE_DAEMON,
 									&dbus_glib__object_info);
 
@@ -1087,7 +1084,7 @@
 		g_error("Could not aquire name: %s", error->message);
 	}
 
-	daemon = notify_daemon_new();
+	daemon = g_object_new(NOTIFY_TYPE_DAEMON, NULL);
 
 	dbus_g_connection_register_g_object(connection,
 										"/org/freedesktop/Notifications",

Modified: notification-daemon-xfce/trunk/src/daemon.h
===================================================================
--- notification-daemon-xfce/trunk/src/daemon.h	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/src/daemon.h	2006-09-06 19:16:00 UTC (rev 1982)
@@ -28,7 +28,7 @@
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-lowlevel.h>
 
-G_BEGIN_DECLS
+#define NOTIFY_RC_FILE "xfce4/notify/notify.rc"
 
 #define NOTIFY_TYPE_DAEMON (notify_daemon_get_type())
 #define NOTIFY_DAEMON(obj) \
@@ -66,6 +66,8 @@
 	NOTIFY_DAEMON_ERROR_GENERIC = 0,
 };
 
+G_BEGIN_DECLS
+
 GType notify_daemon_get_type(void);
 
 NotifyDaemon *notify_daemon_new(void)

Modified: notification-daemon-xfce/trunk/src/engines.c
===================================================================
--- notification-daemon-xfce/trunk/src/engines.c	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/src/engines.c	2006-09-06 19:16:00 UTC (rev 1982)
@@ -140,22 +140,29 @@
 {
 	if (active_engine == NULL)
 	{
-	        gchar *enginename;
+		gchar *enginename = NULL;
 		const gchar *value;
 		gchar *file;
-	        XfceRc *rc;
+		XfceRc *rc;
 
-	        file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, "xfce4/notify/notify.rc", TRUE);
-
+		/* load the theme from the rc file */
+		file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, NOTIFY_RC_FILE, TRUE);
 		if (file)
 		{
-		    rc = xfce_rc_simple_open (file, FALSE);
-		    g_free (file);
+			rc = xfce_rc_simple_open (file, FALSE);
+			g_free (file);
 
-		    value = xfce_rc_read_entry (rc, "engine_name", "standard");
-		    enginename = g_strdup (value);
+			if (rc)
+			{
+				value = xfce_rc_read_entry (rc, "engine_name", NULL);
 
-		    xfce_rc_close (rc);
+				if (value)
+					enginename = g_strdup (value);
+				else
+					xfce_rc_write_entry (rc, "engine_name", "standard");
+
+				xfce_rc_close (rc);
+			}
 		}
 
 		if (enginename == NULL)

Added: notification-daemon-xfce/trunk/src/stack.c
===================================================================
--- notification-daemon-xfce/trunk/src/stack.c	                        (rev 0)
+++ notification-daemon-xfce/trunk/src/stack.c	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,279 @@
+/* $Id$
+ *
+ * Copyright (C) 2006 Christian Hammond <chipx86 at chipx86.com>
+ *
+ * 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, 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 "config.h"
+#include "engines.h"
+#include "stack.h"
+
+#include <X11/Xproto.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#include <gdk/gdkx.h>
+
+struct _NotifyStack
+{
+	NotifyDaemon *daemon;
+	GdkScreen *screen;
+	guint monitor;
+	NotifyStackLocation location;
+	GSList *windows;
+};
+
+static gboolean
+get_work_area(GtkWidget *nw, GdkRectangle *rect)
+{
+	Atom workarea = XInternAtom(GDK_DISPLAY(), "_NET_WORKAREA", True);
+	Atom type;
+	Window win;
+	int format;
+	gulong num, leftovers;
+	gulong max_len = 4 * 32;
+	guchar *ret_workarea;
+	long *workareas;
+	int result;
+	GdkScreen *screen;
+	int disp_screen;
+
+	gtk_widget_realize(nw);
+	screen = gdk_drawable_get_screen(GDK_DRAWABLE(nw->window));
+	disp_screen = GDK_SCREEN_XNUMBER(screen);
+
+	/* Defaults in case of error */
+	rect->x = 0;
+	rect->y = 0;
+	rect->width = gdk_screen_get_width(screen);
+	rect->height = gdk_screen_get_height(screen);
+
+	if (workarea == None)
+		return FALSE;
+
+	win = XRootWindow(GDK_DISPLAY(), disp_screen);
+	result = XGetWindowProperty(GDK_DISPLAY(), win, workarea, 0,
+								max_len, False, AnyPropertyType,
+								&type, &format, &num, &leftovers,
+								&ret_workarea);
+
+	if (result != Success || type == None || format == 0 || leftovers ||
+		num % 4)
+	{
+		return FALSE;
+	}
+
+	workareas = (long *)ret_workarea;
+	rect->x      = workareas[disp_screen * 4];
+	rect->y      = workareas[disp_screen * 4 + 1];
+	rect->width  = workareas[disp_screen * 4 + 2];
+	rect->height = workareas[disp_screen * 4 + 3];
+
+	XFree(ret_workarea);
+
+	return TRUE;
+}
+
+static void
+get_origin_coordinates(NotifyStackLocation stack_location,
+					   GdkRectangle workarea,
+					   gint *x, gint *y, gint *shiftx, gint *shifty,
+					   gint width, gint height)
+{
+	switch (stack_location)
+	{
+		case NOTIFY_STACK_LOCATION_TOP_LEFT:
+			*x = workarea.x;
+			*y = workarea.y;
+			*shifty = height;
+			break;
+
+		case NOTIFY_STACK_LOCATION_TOP_RIGHT:
+			*x = workarea.x + workarea.width - width;
+			*y = workarea.y;
+			*shifty = height;
+			break;
+
+		case NOTIFY_STACK_LOCATION_BOTTOM_LEFT:
+			*x = workarea.x;
+			*y = workarea.y + workarea.height - height;
+			break;
+
+		case NOTIFY_STACK_LOCATION_BOTTOM_RIGHT:
+			*x = workarea.x + workarea.width - width;
+			*y = workarea.y + workarea.height - height;
+			break;
+
+		default:
+			g_assert_not_reached();
+	}
+}
+
+static void
+translate_coordinates(NotifyStackLocation stack_location,
+					  GdkRectangle workarea,
+					  gint *x, gint *y, gint *shiftx, gint *shifty,
+					  gint width, gint height, gint index)
+{
+	switch (stack_location)
+	{
+		case NOTIFY_STACK_LOCATION_TOP_LEFT:
+			*x = workarea.x;
+			*y += *shifty;
+			*shifty = height;
+			break;
+
+		case NOTIFY_STACK_LOCATION_TOP_RIGHT:
+			*x = workarea.x + workarea.width - width;
+			*y += *shifty;
+			*shifty = height;
+			break;
+
+		case NOTIFY_STACK_LOCATION_BOTTOM_LEFT:
+			*x = workarea.x;
+			*y -= height;
+			break;
+
+		case NOTIFY_STACK_LOCATION_BOTTOM_RIGHT:
+			*x = workarea.x + workarea.width - width;
+			*y -= height;
+			break;
+
+		default:
+			g_assert_not_reached();
+	}
+}
+
+NotifyStack *
+notify_stack_new(NotifyDaemon *daemon,
+				 GdkScreen *screen,
+				 guint monitor,
+				 NotifyStackLocation location)
+{
+	NotifyStack *stack;
+
+	g_assert(daemon != NULL);
+	g_assert(screen != NULL && GDK_IS_SCREEN(screen));
+	g_assert(monitor < gdk_screen_get_n_monitors(screen));
+	g_assert(location != NOTIFY_STACK_LOCATION_UNKNOWN);
+
+	stack = g_new0(NotifyStack, 1);
+	stack->daemon   = daemon;
+	stack->screen   = screen;
+	stack->monitor  = monitor;
+	stack->location = location;
+
+	return stack;
+}
+
+void
+notify_stack_destroy(NotifyStack *stack)
+{
+	g_assert(stack != NULL);
+
+	g_slist_free(stack->windows);
+	g_free(stack);
+}
+
+void
+notify_stack_set_location(NotifyStack *stack,
+						  NotifyStackLocation location)
+{
+	stack->location = location;
+}
+
+void
+notify_stack_add_window(NotifyStack *stack,
+						GtkWindow *nw,
+						gboolean new_notification)
+{
+	GtkRequisition req;
+	GdkRectangle workarea;
+	GSList *l;
+	gint x, y, shiftx = 0, shifty = 0, index = 1;
+
+	gtk_widget_size_request(GTK_WIDGET(nw), &req);
+
+	get_work_area(GTK_WIDGET(nw), &workarea);
+	get_origin_coordinates(stack->location, workarea, &x, &y,
+						   &shiftx, &shifty, req.width, req.height);
+
+	theme_move_notification(nw, x, y);
+
+	for (l = stack->windows; l != NULL; l = l->next)
+	{
+		GtkWindow *nw2 = GTK_WINDOW(l->data);
+
+		if (nw2 != nw)
+		{
+			gtk_widget_size_request(GTK_WIDGET(nw2), &req);
+
+			translate_coordinates(stack->location, workarea, &x, &y,
+								  &shiftx, &shifty, req.width, req.height,
+								  index++);
+			theme_move_notification(nw2, x, y);
+		}
+	}
+
+	if (new_notification)
+	{
+		g_signal_connect_swapped(G_OBJECT(nw), "destroy",
+								 G_CALLBACK(notify_stack_remove_window),
+								 stack);
+		stack->windows = g_slist_prepend(stack->windows, nw);
+	}
+}
+
+void
+notify_stack_remove_window(NotifyStack *stack,
+						   GtkWindow *nw)
+{
+	GdkRectangle workarea;
+	GSList *l, *remove_l = NULL;
+	gint x, y, shiftx = 0, shifty = 0, index = 0;
+
+	get_work_area(GTK_WIDGET(nw), &workarea);
+
+	get_origin_coordinates(stack->location, workarea, &x, &y,
+						   &shiftx, &shifty, 0, 0);
+
+	for (l = stack->windows; l != NULL; l = l->next)
+	{
+		GtkWindow *nw2 = GTK_WINDOW(l->data);
+		GtkRequisition req;
+
+		if (nw2 != nw)
+		{
+			gtk_widget_size_request(GTK_WIDGET(nw2), &req);
+
+			translate_coordinates(stack->location, workarea, &x, &y,
+								  &shiftx, &shifty, req.width, req.height,
+								  index++);
+			theme_move_notification(nw2, x, y);
+		}
+		else
+		{
+			remove_l = l;
+		}
+	}
+
+	if (remove_l != NULL)
+		stack->windows = g_slist_remove_link(stack->windows, remove_l);
+
+	if (GTK_WIDGET_REALIZED(GTK_WIDGET(nw)))
+		gtk_widget_unrealize(GTK_WIDGET(nw));
+}


Property changes on: notification-daemon-xfce/trunk/src/stack.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: notification-daemon-xfce/trunk/src/stack.h
===================================================================
--- notification-daemon-xfce/trunk/src/stack.h	                        (rev 0)
+++ notification-daemon-xfce/trunk/src/stack.h	2006-09-06 19:16:00 UTC (rev 1982)
@@ -0,0 +1,52 @@
+/* $Id$
+ *
+ * Copyright (C) 2006 Christian Hammond <chipx86 at chipx86.com>
+ *
+ * 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, 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.
+ */
+
+#ifndef _NOTIFY_STACK_H_
+#define _NOTIFY_STACK_H_
+
+#include <gtk/gtk.h>
+#include "daemon.h"
+
+typedef enum
+{
+	NOTIFY_STACK_LOCATION_UNKNOWN = -1,
+	NOTIFY_STACK_LOCATION_TOP_LEFT,
+	NOTIFY_STACK_LOCATION_TOP_RIGHT,
+	NOTIFY_STACK_LOCATION_BOTTOM_LEFT,
+	NOTIFY_STACK_LOCATION_BOTTOM_RIGHT,
+	NOTIFY_STACK_LOCATION_DEFAULT = NOTIFY_STACK_LOCATION_BOTTOM_RIGHT
+
+} NotifyStackLocation;
+
+typedef struct _NotifyStack NotifyStack;
+
+NotifyStack *notify_stack_new(NotifyDaemon *daemon,
+							  GdkScreen *screen,
+							  guint monitor,
+							  NotifyStackLocation stack_location);
+void notify_stack_destroy(NotifyStack *stack);
+
+void notify_stack_set_location(NotifyStack *stack,
+							   NotifyStackLocation location);
+void notify_stack_add_window(NotifyStack *stack, GtkWindow *nw,
+							 gboolean new_notification);
+void notify_stack_remove_window(NotifyStack *stack, GtkWindow *nw);
+
+#endif /* _NOTIFY_STACK_H_ */


Property changes on: notification-daemon-xfce/trunk/src/stack.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: notification-daemon-xfce/trunk/themes/bubble/Makefile.am
===================================================================
--- notification-daemon-xfce/trunk/themes/bubble/Makefile.am	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/themes/bubble/Makefile.am	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1,6 +1,6 @@
 # $Id$
 
-enginedir = $(libdir)/notification-daemon-1.0/engines
+enginedir = $(libdir)/notification-daemon-xfce-1.0/engines
 
 engine_LTLIBRARIES = 							\
 	libbubble.la

Modified: notification-daemon-xfce/trunk/themes/standard/Makefile.am
===================================================================
--- notification-daemon-xfce/trunk/themes/standard/Makefile.am	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/themes/standard/Makefile.am	2006-09-06 19:16:00 UTC (rev 1982)
@@ -1,6 +1,6 @@
 # $Id$
 
-enginedir = $(libdir)/notification-daemon-1.0/engines
+enginedir = $(libdir)/notification-daemon-xfce-1.0/engines
 
 engine_LTLIBRARIES =							\
 	libstandard.la

Modified: notification-daemon-xfce/trunk/themes/standard/theme.c
===================================================================
--- notification-daemon-xfce/trunk/themes/standard/theme.c	2006-09-06 13:28:26 UTC (rev 1981)
+++ notification-daemon-xfce/trunk/themes/standard/theme.c	2006-09-06 19:16:00 UTC (rev 1982)
@@ -760,6 +760,8 @@
 				arrow_offset = windata->point_y - arrow_side1_width;
 			}
 			break;
+		default:
+			break;
 	}
 
 	windata->window_region =




More information about the Goodies-commits mailing list