[libnotifymm] Some fixes to make it more in sync with libnotify 0.7.5.



commit 33545e75c4494165a18a5398c53e8ab9722001b0
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Jan 13 18:35:28 2013 +0100

    Some fixes to make it more in sync with libnotify 0.7.5.
    
    * libnotify/libnotifymm.h: Remove libnotifymm_[major|minor|micro]_version,
    which are not defined anywhere.
    * libnotify/libnotifymm/notify.[cc|h]: Add set_app_name().
    * libnotify/src/libnotify_docs.xml: Update from libnotify.
    * libnotify/src/notification.[ccg|hg]: Deprecate methods that are deprecated
    in libnotify 0.7.5.
    Bug #691389.

 ChangeLog                        |   13 +
 libnotify/libnotifymm.h          |   10 -
 libnotify/libnotifymm/notify.cc  |    5 +
 libnotify/libnotifymm/notify.h   |   15 +-
 libnotify/src/libnotify_docs.xml |  518 ++++++++++++++++++++------------------
 libnotify/src/notification.ccg   |    7 +-
 libnotify/src/notification.hg    |   38 ++-
 7 files changed, 330 insertions(+), 276 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index aeca13f..eda8e2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,23 @@
 2013-01-13  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
+	Some fixes to make it more in sync with libnotify 0.7.5.
+
+	* libnotify/libnotifymm.h: Remove libnotifymm_[major|minor|micro]_version,
+	which are not defined anywhere.
+	* libnotify/libnotifymm/notify.[cc|h]: Add set_app_name().
+	* libnotify/src/libnotify_docs.xml: Update from libnotify.
+	* libnotify/src/notification.[ccg|hg]: Deprecate methods that are deprecated
+	in libnotify 0.7.5.
+	Bug #691389.
+
+2013-01-13  Kjell Ahlstedt  <kjell ahlstedt bredband net>
+
 	Use mm-common.
 
 	Many new and modified files have been copied from mm-common/skeletonmm.
 	The changes in C++ source code are necessary for building with
 	./configure --enable-warnings=fatal.
+	Bug #691389.
 
 	* autogen.sh:
 	* configure.ac: Modify.
diff --git a/libnotify/libnotifymm.h b/libnotify/libnotifymm.h
index 6e724b5..5878246 100644
--- a/libnotify/libnotifymm.h
+++ b/libnotify/libnotifymm.h
@@ -1,4 +1,3 @@
-/* $Id: libnotifymm.h 1042 2007-03-09 22:15:06Z arminb $ */
 /* libnotifymm - a C++ wrapper for libnotify
  *
  * Copyright 1999-2001 Free Software Foundation
@@ -21,15 +20,6 @@
 #ifndef LIBNOTIFYMM_H
 #define LIBNOTIFYMM_H
 
-//extern "C" {
-//#include <gtk/gtk.h>
-//}
-
-/* libnotifymm version.  */
-extern const int libnotifymm_major_version;
-extern const int libnotifymm_minor_version;
-extern const int libnotifymm_micro_version;
-
 #include <glibmm.h>
 
 #include <libnotifymm/init.h>
diff --git a/libnotify/libnotifymm/notify.cc b/libnotify/libnotifymm/notify.cc
index da349d8..905a00e 100644
--- a/libnotify/libnotifymm/notify.cc
+++ b/libnotify/libnotifymm/notify.cc
@@ -30,6 +30,11 @@ Glib::ustring get_app_name()
 {
   return notify_get_app_name();    
 }
+
+void set_app_name(const Glib::ustring& app_name)
+{
+  notify_set_app_name(app_name.c_str());
+}
   
 Glib::ListHandle<Glib::ustring> get_server_caps()
 {
diff --git a/libnotify/libnotifymm/notify.h b/libnotify/libnotifymm/notify.h
index 4d1424a..959d5fe 100644
--- a/libnotify/libnotifymm/notify.h
+++ b/libnotify/libnotifymm/notify.h
@@ -1,8 +1,4 @@
-// -*- c++ -*-
-/* $Id: init.cc 622 2004-03-29 17:59:17Z murrayc $ */
-
-/* init.cc
- *
+/*
  * Copyright 2001      Free Software Foundation
  *
  * This library is free software; you can redistribute it and/or
@@ -20,6 +16,9 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <glibmm/ustring.h>
+#include <glibmm/listhandle.h>
+
 namespace Notify
 {
 
@@ -35,6 +34,12 @@ namespace Notify
  */
 Glib::ustring get_app_name();
 
+/** Sets the application name.
+ * @ingroup InfoUtils
+ * @param app_name Application name
+ */
+void set_app_name(const Glib::ustring& app_name);
+
 /** Get a list of capability strings
  * @ingroup InfoUtils
  * @return a list of capabbility strings
diff --git a/libnotify/src/libnotify_docs.xml b/libnotify/src/libnotify_docs.xml
index 85271e1..3cd738e 100644
--- a/libnotify/src/libnotify_docs.xml
+++ b/libnotify/src/libnotify_docs.xml
@@ -1,101 +1,128 @@
 <root>
-<function name="notify_init">
+<signal name="NotifyNotification::closed">
 <description>
-Initialized libnotify. This must be called before any other functions.
+Emitted when the notification is closed.
 
+</description>
+<parameters>
+<parameter name="notification">
+<parameter_description> The object which received the signal.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</signal>
+
+<enum name="NotifyUrgency">
+<description>
+The urgency level of the notification.
 
 </description>
 <parameters>
-<parameter name="app_name">
-<parameter_description> The name of the application initializing libnotify.
+<parameter name="NOTIFY_URGENCY_LOW">
+<parameter_description> Low urgency. Used for unimportant notifications.
+</parameter_description>
+</parameter>
+<parameter name="NOTIFY_URGENCY_NORMAL">
+<parameter_description> Normal urgency. Used for most standard notifications.
+</parameter_description>
+</parameter>
+<parameter name="NOTIFY_URGENCY_CRITICAL">
+<parameter_description> Critical urgency. Used for very important notifications.
 </parameter_description>
 </parameter>
 </parameters>
-<return> %TRUE if successful, or %FALSE on error.
+</enum>
+
+<function name="notify_get_app_name">
+<description>
+Gets the application name registered.
+
+
+</description>
+<parameters>
+</parameters>
+<return> The registered application name, passed to notify_init().
 </return>
 </function>
 
 <function name="notify_get_server_caps">
 <description>
-Queries the server for its capabilities and returns them in a #GList.
+Synchronously queries the server for its capabilities and returns them in a #GList.
 
 
 </description>
 <parameters>
 </parameters>
-<return> A #GList of server capability strings.
+<return> a #GList of server capability strings. Free
+the list elements with g_free() and the list itself with g_list_free().
 </return>
 </function>
 
-<function name="notify_notification_set_hint_byte_array">
+<function name="notify_get_server_info">
 <description>
-Sets a hint with a byte array value. The length of @value must be passed
-as @len.
+Synchronously queries the server for its information, specifically, the name, vendor,
+server version, and the version of the notifications specification that it
+is compliant with.
+
 
 </description>
 <parameters>
-<parameter name="notification">
-<parameter_description> The notification.
+<parameter name="ret_name">
+<parameter_description> a location to store the server name, or %NULL
 </parameter_description>
 </parameter>
-<parameter name="key">
-<parameter_description> The hint.
+<parameter name="ret_vendor">
+<parameter_description> a location to store the server vendor, or %NULL
 </parameter_description>
 </parameter>
-<parameter name="value">
-<parameter_description> The hint&apos;s value.
+<parameter name="ret_version">
+<parameter_description> a location to store the server version, or %NULL
 </parameter_description>
 </parameter>
-<parameter name="len">
-<parameter_description> The length of the byte array.
+<parameter name="ret_spec_version">
+<parameter_description> a location to store the version the service is compliant with, or %NULL
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> %TRUE if successful, and the variables passed will be set, %FALSE
+on error. The returned strings must be freed with g_free
+</return>
 </function>
 
-<function name="notify_notification_set_hint_int32">
+<function name="notify_init">
 <description>
-Sets a hint with a 32-bit integer value.
+Initialized libnotify. This must be called before any other functions.
+
 
 </description>
 <parameters>
-<parameter name="notification">
-<parameter_description> The notification.
-</parameter_description>
-</parameter>
-<parameter name="key">
-<parameter_description> The hint.
-</parameter_description>
-</parameter>
-<parameter name="value">
-<parameter_description> The hint&apos;s value.
+<parameter name="app_name">
+<parameter_description> The name of the application initializing libnotify.
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> %TRUE if successful, or %FALSE on error.
+</return>
 </function>
 
-<function name="notify_notification_clear_hints">
+<function name="notify_is_initted">
 <description>
-Clears all hints from the notification.
+Gets whether or not libnotify is initialized.
+
 
 </description>
 <parameters>
-<parameter name="notification">
-<parameter_description> The notification.
-</parameter_description>
-</parameter>
 </parameters>
-<return></return>
+<return> %TRUE if libnotify is initialized, or %FALSE otherwise.
+</return>
 </function>
 
-<function name="notify_notification_set_icon_from_pixbuf">
+<function name="notify_notification_add_action">
 <description>
-Sets the icon in the notification from a #GdkPixbuf.
-
-This will only work when libnotify is compiled against D-BUS 0.60 or
-higher.
+Adds an action to a notification. When the action is invoked, the
+specified callback function will be called, along with the value passed
+to @user_data.
 
 </description>
 <parameters>
@@ -103,95 +130,62 @@ higher.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="icon">
-<parameter_description> The icon.
+<parameter name="action">
+<parameter_description> The action ID.
 </parameter_description>
 </parameter>
-</parameters>
-<return></return>
-</function>
-
-<function name="notify_notification_set_hint_string">
-<description>
-Sets a hint with a string value.
-
-</description>
-<parameters>
-<parameter name="notification">
-<parameter_description> The notification.
+<parameter name="label">
+<parameter_description> The human-readable action label.
 </parameter_description>
 </parameter>
-<parameter name="key">
-<parameter_description> The hint.
+<parameter name="callback">
+<parameter_description> The action's callback function.
 </parameter_description>
 </parameter>
-<parameter name="value">
-<parameter_description> The hint&apos;s value.
+<parameter name="user_data">
+<parameter_description> Optional custom data to pass to @callback.
+</parameter_description>
+</parameter>
+<parameter name="free_func">
+<parameter_description> An optional function to free @user_data when the notification
+is destroyed.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_get_app_name">
-<description>
-Gets the application name registered.
-
-
-</description>
-<parameters>
-</parameters>
-<return> The registered application name, passed to notify_init().
-</return>
-</function>
-
-<function name="notify_is_initted">
+<function name="notify_notification_clear_actions">
 <description>
-Gets whether or not libnotify is initialized.
-
+Clears all actions from the notification.
 
 </description>
 <parameters>
+<parameter name="notification">
+<parameter_description> The notification.
+</parameter_description>
+</parameter>
 </parameters>
-<return> %TRUE if libnotify is initialized, or %FALSE otherwise.
-</return>
+<return></return>
 </function>
 
-<function name="notify_get_server_info">
+<function name="notify_notification_clear_hints">
 <description>
-Queries the server for its information, specifically, the name, vendor,
-server version, and the version of the notifications specification that it
-is compliant with.
-
+Clears all hints from the notification.
 
 </description>
 <parameters>
-<parameter name="ret_name">
-<parameter_description> The resulting server name.
-</parameter_description>
-</parameter>
-<parameter name="ret_vendor">
-<parameter_description> The resulting server vendor.
-</parameter_description>
-</parameter>
-<parameter name="ret_version">
-<parameter_description> The resulting server version.
-</parameter_description>
-</parameter>
-<parameter name="ret_spec_version">
-<parameter_description> The resulting version of the specification the server is
-compliant with.
+<parameter name="notification">
+<parameter_description> The notification.
 </parameter_description>
 </parameter>
 </parameters>
-<return> %TRUE if successful, and the variables passed will be set. %FALSE
-on failure.
-</return>
+<return></return>
 </function>
 
 <function name="notify_notification_close">
 <description>
-Tells the notification server to hide the notification on the screen.
+Synchronously tells the notification server to hide the notification on the screen.
 
 
 </description>
@@ -205,14 +199,15 @@ Tells the notification server to hide the notification on the screen.
 </parameter_description>
 </parameter>
 </parameters>
-<return> %TRUE if successful. On error, this will return %FALSE and set
- error 
+<return> %TRUE on success, or %FALSE on error with @error filled in
 </return>
 </function>
 
-<function name="notify_notification_set_hint_double">
+<function name="notify_notification_get_closed_reason">
 <description>
-Sets a hint with a double value.
+Returns the closed reason code for the notification. This is valid only
+after the &quot;closed&quot; signal is emitted.
+
 
 </description>
 <parameters>
@@ -220,16 +215,9 @@ Sets a hint with a double value.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="key">
-<parameter_description> The hint.
-</parameter_description>
-</parameter>
-<parameter name="value">
-<parameter_description> The hint&apos;s value.
-</parameter_description>
-</parameter>
 </parameters>
-<return></return>
+<return> The closed reason code.
+</return>
 </function>
 
 <function name="notify_notification_new">
@@ -252,34 +240,38 @@ all other parameters are optional.
 <parameter_description> The optional icon theme icon name or filename.
 </parameter_description>
 </parameter>
-<parameter name="attach">
-<parameter_description> The optional widget to attach to.
-</parameter_description>
-</parameter>
 </parameters>
 <return> The new #NotifyNotification.
 </return>
 </function>
 
-<function name="notify_notification_clear_actions">
+<function name="notify_notification_set_app_name">
 <description>
-Clears all actions from the notification.
+Sets the application name for the notification. If this function is
+not called or if @app_name is %NULL, the application name will be
+set from the value used in notify_init() or overridden with
+notify_set_app_name().
+
+Since: 0.7.3
 
 </description>
 <parameters>
 <parameter name="notification">
-<parameter_description> The notification.
+<parameter_description> a #NotifyNotification
+</parameter_description>
+</parameter>
+<parameter name="app_name">
+<parameter_description> the localised application name
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_add_action">
+<function name="notify_notification_set_category">
 <description>
-Adds an action to a notification. When the action is invoked, the
-specified callback function will be called, along with the value passed
-to @user_data.
+Sets the category of this notification. This can be used by the
+notification server to filter or display the data in a certain way.
 
 </description>
 <parameters>
@@ -287,54 +279,46 @@ to @user_data.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="action">
-<parameter_description> The action ID.
-</parameter_description>
-</parameter>
-<parameter name="label">
-<parameter_description> The human-readable action label.
-</parameter_description>
-</parameter>
-<parameter name="callback">
-<parameter_description> The action&apos;s callback function.
-</parameter_description>
-</parameter>
-<parameter name="user_data">
-<parameter_description> Optional custom data to pass to @callback.
-</parameter_description>
-</parameter>
-<parameter name="free_func">
-<parameter_description> An optional function to free @user_data when the notification
-is destroyed.
+<parameter name="category">
+<parameter_description> The category.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="This">
+<function name="notify_notification_set_hint">
 <description>
-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
-Lesser General Public License for more details.
+Sets a hint for @key with value @value. If @value is %NULL,
+a previously set hint for @key is unset.
+
+If @value is floating, it is consumed.
 
-You should have received a copy of the GNU Lesser 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.
+Since: 0.6
 
 </description>
 <parameters>
+<parameter name="notification">
+<parameter_description> a #NotifyNotification
+</parameter_description>
+</parameter>
+<parameter name="key">
+<parameter_description> the hint key
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> the hint value, or %NULL to unset the hint
+</parameter_description>
+</parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_set_timeout">
+<function name="notify_notification_set_hint_byte">
 <description>
-Sets the timeout of the notification. To set the default time, pass
-%NOTIFY_EXPIRES_DEFAULT as @timeout. To set the notification to never
-expire, pass %NOTIFY_EXPIRES_NEVER.
+Sets a hint with a byte value.
+
+Deprecated: 0.6. Use notify_notification_set_hint() instead
 
 </description>
 <parameters>
@@ -342,81 +326,76 @@ expire, pass %NOTIFY_EXPIRES_NEVER.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="timeout">
-<parameter_description> The timeout in milliseconds.
+<parameter name="key">
+<parameter_description> The hint.
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> The hint's value.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_update">
+<function name="notify_notification_set_hint_byte_array">
 <description>
-Updates the notification text and icon. This won&apos;t send the update out
-and display it on the screen. For that, you will need to call
-notify_notification_show().
+Sets a hint with a byte array value. The length of @value must be passed
+as @len.
 
+Deprecated: 0.6. Use notify_notification_set_hint() instead
 
 </description>
 <parameters>
 <parameter name="notification">
-<parameter_description> The notification to update.
+<parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="summary">
-<parameter_description> The new required summary text.
+<parameter name="key">
+<parameter_description> The hint.
 </parameter_description>
 </parameter>
-<parameter name="body">
-<parameter_description> The optional body text.
+<parameter name="value">
+<parameter_description> The hint's value.
 </parameter_description>
 </parameter>
-<parameter name="icon">
-<parameter_description> The optional icon theme icon name or filename.
+<parameter name="len">
+<parameter_description> The length of the byte array.
 </parameter_description>
 </parameter>
 </parameters>
-<return> %TRUE, unless an invalid parameter was passed.
-</return>
+<return></return>
 </function>
 
-<function name="notify_notification_new_with_status_icon">
+<function name="notify_notification_set_hint_double">
 <description>
-Creates a new #NotifyNotification and attaches to a #GtkStatusIcon.
-The summary text and @status_icon is required, but all other parameters
-are optional.
+Sets a hint with a double value.
 
+Deprecated: 0.6. Use notify_notification_set_hint() instead
 
 </description>
 <parameters>
-<parameter name="summary">
-<parameter_description> The required summary text.
-</parameter_description>
-</parameter>
-<parameter name="body">
-<parameter_description> The optional body text.
+<parameter name="notification">
+<parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="icon">
-<parameter_description> The optional icon theme icon name or filename.
+<parameter name="key">
+<parameter_description> The hint.
 </parameter_description>
 </parameter>
-<parameter name="status_icon">
-<parameter_description> The required #GtkStatusIcon.
+<parameter name="value">
+<parameter_description> The hint's value.
 </parameter_description>
 </parameter>
 </parameters>
-<return> The new #NotifyNotification.
-
-Since: 0.4.1
-</return>
+<return></return>
 </function>
 
-<function name="notify_notification_set_urgency">
+<function name="notify_notification_set_hint_int32">
 <description>
-Sets the urgency level of this notification.
+Sets a hint with a 32-bit integer value.
 
-See: #NotifyUrgency
+Deprecated: 0.6. Use notify_notification_set_hint() instead
 
 </description>
 <parameters>
@@ -424,21 +403,23 @@ See: #NotifyUrgency
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="urgency">
-<parameter_description> The urgency level.
+<parameter name="key">
+<parameter_description> The hint.
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> The hint's value.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_set_geometry_hints">
+<function name="notify_notification_set_hint_string">
 <description>
-Sets the geometry hints on the notification. This sets the screen
-the notification should appear on and the X, Y coordinates it should
-point to, if the particular notification supports X, Y hints.
+Sets a hint with a string value.
 
-Since: 0.4.1
+Deprecated: 0.6. Use notify_notification_set_hint() instead
 
 </description>
 <parameters>
@@ -446,27 +427,23 @@ Since: 0.4.1
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="screen">
-<parameter_description> The #GdkScreen the notification should appear on.
-</parameter_description>
-</parameter>
-<parameter name="x">
-<parameter_description> The X coordinate to point to.
+<parameter name="key">
+<parameter_description> The hint.
 </parameter_description>
 </parameter>
-<parameter name="y">
-<parameter_description> The Y coordinate to point to.
+<parameter name="value">
+<parameter_description> The hint's value.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_attach_to_widget">
+<function name="notify_notification_set_hint_uint32">
 <description>
-Attaches the notification to a widget. This will set hints on the
-notification requesting that the notification point to the widget&apos;s
-location. If @attach is %NULL, the widget will be unset.
+Sets a hint with an unsigned 32-bit integer value.
+
+Deprecated: 0.6. Use notify_notification_set_hint() instead
 
 </description>
 <parameters>
@@ -474,32 +451,42 @@ location. If @attach is %NULL, the widget will be unset.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="attach">
-<parameter_description> The widget to attach to, or %NULL.
+<parameter name="key">
+<parameter_description> The hint.
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> The hint's value.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="NotifyNotification">
+<function name="notify_notification_set_icon_from_pixbuf">
 <description>
-Emitted when the notification is closed.
+Sets the icon in the notification from a #GdkPixbuf.
+Deprecated: use notify_notification_set_image_from_pixbuf() instead.
+
 
 </description>
 <parameters>
 <parameter name="notification">
-<parameter_description> The object which received the signal.
+<parameter_description> The notification.
+</parameter_description>
+</parameter>
+<parameter name="icon">
+<parameter_description> The icon.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_set_category">
+<function name="notify_notification_set_image_from_pixbuf">
 <description>
-Sets the category of this notification. This can be used by the
-notification server to filter or display the data in a certain way.
+Sets the image in the notification from a #GdkPixbuf.
+
 
 </description>
 <parameters>
@@ -507,30 +494,39 @@ notification server to filter or display the data in a certain way.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="category">
-<parameter_description> The category.
+<parameter name="pixbuf">
+<parameter_description> The image.
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_uninit">
+<function name="notify_notification_set_timeout">
 <description>
-Uninitialized libnotify.
-
-This should be called when the program no longer needs libnotify for
-the rest of its lifecycle, typically just before exitting.
+Sets the timeout of the notification. To set the default time, pass
+%NOTIFY_EXPIRES_DEFAULT as @timeout. To set the notification to never
+expire, pass %NOTIFY_EXPIRES_NEVER.
 
 </description>
 <parameters>
+<parameter name="notification">
+<parameter_description> The notification.
+</parameter_description>
+</parameter>
+<parameter name="timeout">
+<parameter_description> The timeout in milliseconds.
+</parameter_description>
+</parameter>
 </parameters>
 <return></return>
 </function>
 
-<function name="notify_notification_set_hint_byte">
+<function name="notify_notification_set_urgency">
 <description>
-Sets a hint with a byte value.
+Sets the urgency level of this notification.
+
+See: #NotifyUrgency
 
 </description>
 <parameters>
@@ -538,12 +534,8 @@ Sets a hint with a byte value.
 <parameter_description> The notification.
 </parameter_description>
 </parameter>
-<parameter name="key">
-<parameter_description> The hint.
-</parameter_description>
-</parameter>
-<parameter name="value">
-<parameter_description> The hint&apos;s value.
+<parameter name="urgency">
+<parameter_description> The urgency level.
 </parameter_description>
 </parameter>
 </parameters>
@@ -571,26 +563,62 @@ Tells the notification server to display the notification on the screen.
 </return>
 </function>
 
-<function name="notify_notification_attach_to_status_icon">
+<function name="notify_notification_update">
 <description>
-Attaches the notification to a #GtkStatusIcon. This will set hints on the
-notification requesting that the notification point to the status icon&apos;s
-location. If @status_icon is %NULL, the status icon will be unset.
+Updates the notification text and icon. This won't send the update out
+and display it on the screen. For that, you will need to call
+notify_notification_show().
 
-Since: 0.4.1
 
 </description>
 <parameters>
 <parameter name="notification">
-<parameter_description> The notification.
+<parameter_description> The notification to update.
+</parameter_description>
+</parameter>
+<parameter name="summary">
+<parameter_description> The new required summary text.
+</parameter_description>
+</parameter>
+<parameter name="body">
+<parameter_description> The optional body text.
+</parameter_description>
+</parameter>
+<parameter name="icon">
+<parameter_description> The optional icon theme icon name or filename.
 </parameter_description>
 </parameter>
-<parameter name="status_icon">
-<parameter_description> The #GtkStatusIcon to attach to, or %NULL.
+</parameters>
+<return> %TRUE, unless an invalid parameter was passed.
+</return>
+</function>
+
+<function name="notify_set_app_name">
+<description>
+Sets the application name.
+
+
+</description>
+<parameters>
+<parameter name="app_name">
+<parameter_description> The name of the application
 </parameter_description>
 </parameter>
 </parameters>
 <return></return>
 </function>
 
+<function name="notify_uninit">
+<description>
+Uninitialized libnotify.
+
+This should be called when the program no longer needs libnotify for
+the rest of its lifecycle, typically just before exitting.
+
+</description>
+<parameters>
+</parameters>
+<return></return>
+</function>
+
 </root>
diff --git a/libnotify/src/notification.ccg b/libnotify/src/notification.ccg
index b640859..047725a 100644
--- a/libnotify/src/notification.ccg
+++ b/libnotify/src/notification.ccg
@@ -17,6 +17,7 @@
 
 #include <libnotify/notification.h>
 #include <libnotify/notify-enum-types.h>
+#include <gdkmm/pixbuf.h>
 
 namespace
 {
@@ -28,18 +29,14 @@ static void SignalProxy_ActivateLink_gtk_callback(
   Notify::Notification::SlotInvokeAction*
     the_slot = static_cast<Notify::Notification::SlotInvokeAction*>(data);
 
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
-#endif
   {
     (*the_slot)(Glib::convert_const_gchar_ptr_to_ustring(action));
   }
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
   catch(...)
   {
     Glib::exception_handlers_invoke();
   }
-#endif
 }
 
 static void SignalProxy_ActivateLink_gtk_callback_destroy(void* data)
@@ -69,10 +66,12 @@ bool Notification::update(const Glib::ustring& summary, const Glib::ustring& bod
     body.empty() ? 0 : body.c_str(), icon.empty() ? 0 : icon.c_str());
 }
 
+#ifndef LIBNOTIFYMM_DISABLE_DEPRECATED
 void Notification::set_hint(const Glib::ustring& key, const Glib::ArrayHandle<guchar>& values)
 {
   notify_notification_set_hint_byte_array(gobj(), key.c_str(), values.data(), values.size());
 }
+#endif // LIBNOTIFYMM_DISABLE_DEPRECATED
 
 void Notification::add_action(const Glib::ustring& action, const Glib::ustring& label,
                               const SlotInvokeAction& slot)
diff --git a/libnotify/src/notification.hg b/libnotify/src/notification.hg
index 529c8d8..ec27414 100644
--- a/libnotify/src/notification.hg
+++ b/libnotify/src/notification.hg
@@ -23,7 +23,12 @@ _PINCLUDE(glibmm/private/object_p.h)
 #undef LIBNOTIFY_DISABLE_DEPRECATED
 #m4 _POP()
 
-#include <gtkmm/widget.h>
+#include <glibmm.h>
+
+namespace Gdk
+{
+class Pixbuf;
+}
 
 namespace Notify
 {
@@ -65,31 +70,40 @@ public:
 
   _WRAP_METHOD(void set_urgency(Urgency urgency), notify_notification_set_urgency)
 
-  _WRAP_METHOD(void set_icon_from_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& icon), notify_notification_set_icon_from_pixbuf)
-
   _WRAP_METHOD(void set_image_from_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), notify_notification_set_image_from_pixbuf)
 
-  _WRAP_METHOD(void set_hint(const Glib::ustring& key, const Glib::VariantBase& value), notify_notification_set_hint)
+  _WRAP_METHOD(void set_icon_from_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& icon), notify_notification_set_icon_from_pixbuf,
+               deprecated "Use set_image_from_pixbuf() instead.")
 
-  _WRAP_METHOD(void set_hint(const Glib::ustring& key, int value), notify_notification_set_hint_int32)
+  _WRAP_METHOD(void set_hint(const Glib::ustring& key, int value), notify_notification_set_hint_int32,
+               deprecated "Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.")
 
-  _WRAP_METHOD(void set_hint(const Glib::ustring& key, guint value), notify_notification_set_hint_uint32)
+  _WRAP_METHOD(void set_hint(const Glib::ustring& key, guint value), notify_notification_set_hint_uint32,
+               deprecated "Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.")
 
-  _WRAP_METHOD(void set_hint(const Glib::ustring& key, double value), notify_notification_set_hint_double)
+  _WRAP_METHOD(void set_hint(const Glib::ustring& key, double value), notify_notification_set_hint_double,
+               deprecated "Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.")
 
-  _WRAP_METHOD(void set_hint(const Glib::ustring& key, const Glib::ustring& value), notify_notification_set_hint_string)
+  _WRAP_METHOD(void set_hint(const Glib::ustring& key, const Glib::ustring& value), notify_notification_set_hint_string,
+               deprecated "Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.")
 
-  _WRAP_METHOD(void set_hint(const Glib::ustring& key, guchar value), notify_notification_set_hint_byte)
+  _WRAP_METHOD(void set_hint(const Glib::ustring& key, guchar value), notify_notification_set_hint_byte,
+               deprecated "Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.")
 
-  /** Set byte array hint
+#ifndef LIBNOTIFYMM_DISABLE_DEPRECATED
+  /** Set byte array hint.
+   * Sets a hint with a byte array value.
    *
    * @param key the hint
    * @param values the hint's value
    *
-   * Sets a hint with a byte array value
+   * @deprecated Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.
    */
   void set_hint(const Glib::ustring& key, const Glib::ArrayHandle<guchar>& values);
   _IGNORE(notify_notification_set_hint_byte_array)
+#endif // LIBNOTIFYMM_DISABLE_DEPRECATED
+
+  _WRAP_METHOD(void set_hint(const Glib::ustring& key, const Glib::VariantBase& value), notify_notification_set_hint)
 
   _WRAP_METHOD(void clear_hints(), notify_notification_clear_hints)
 
@@ -111,7 +125,7 @@ public:
 
   _WRAP_METHOD(bool close(), notify_notification_close, errthrow)
 
-  _WRAP_METHOD(int get_closed_reason(), notify_notification_get_closed_reason)
+  _WRAP_METHOD(int get_closed_reason() const, notify_notification_get_closed_reason)
 
   _WRAP_SIGNAL(void closed(), "closed")
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]