On Thu Apr 14 17:01:00 2011, michael.kogan@gmx.net wrote:
Show quoted text> I'm the reporter of bug 67297
> (
https://rt.cpan.org/Public/Bug/Display.html?id=67297) and as I've
> found out now the problem comes from an update of libnotify, so 67297
> can be closed. I've created a little patch (my first patch =)) which
> solved the problem for me, see attachement.
>
> Thanks,
> Michael
Congratulations to your first patch!
However there were some other changes in the libnotify api in 0.7.
Following functions are missing:
notify_notification_new_with_status_icon
notify_notification_attach_to_widget
notify_notification_attach_to_status_icon
notify_notification_set_geometry_hints
New function:
notify_notification_set_image_from_pixbuf
I fixed these and the the tests too.
Index: xs/Notify.xs
===================================================================
--- xs/Notify.xs.orig 2007-10-04 14:11:13.000000000 +0200
+++ xs/Notify.xs 2011-10-25 11:49:22.078896599 +0200
@@ -22,7 +22,6 @@
$summary,
$message,
$icon,
- $attach_widget
);
$notification->show;
@@ -86,26 +85,12 @@
MODULE = Gtk2::Notify PACKAGE = Gtk2::Notify PREFIX = notify_notification_
NotifyNotification *
-notify_notification_new (class, summary, body=NULL, icon=NULL, attach=NULL)
+notify_notification_new (class, summary, body=NULL, icon=NULL)
const gchar *summary
const gchar *body
const gchar *icon
- GtkWidget_ornull *attach
C_ARGS:
- summary, body, icon, attach
-
-#if GTK_CHECK_VERSION (2, 9, 2)
-
-NotifyNotification *
-notify_notification_new_with_status_icon (class, summary, body=NULL, icon=NULL, status_icon=NULL)
- const gchar *summary
- const gchar *body
- const gchar *icon
- GtkStatusIcon *status_icon
- C_ARGS:
- summary, body, icon, status_icon
-
-#endif
+ summary, body, icon
gboolean
notify_notification_update (notification, summary, message=NULL, icon=NULL)
@@ -114,27 +99,6 @@
const gchar *message
const gchar *icon
-void
-notify_notification_attach_to_widget (notification, attach)
- NotifyNotification *notification
- GtkWidget *attach
-
-#if GTK_CHECK_VERSION (2, 9, 2)
-
-void
-notify_notification_attach_to_status_icon (notification, status_icon)
- NotifyNotification *notification
- GtkStatusIcon *status_icon
-
-#endif
-
-void
-notify_notification_set_geometry_hints (notification, screen, x, y)
- NotifyNotification *notification
- GdkScreen *screen
- gint x
- gint y
-
NO_OUTPUT gboolean
notify_notification_show (notification)
NotifyNotification *notification
@@ -168,6 +132,11 @@
GdkPixbuf *icon
void
+notify_notification_set_image_from_pixbuf (notification, image)
+ NotifyNotification *notification
+ GdkPixbuf *image
+
+void
set_hint (notification, key, value)
NotifyNotification *notification
const gchar *key
Index: t/notification.t
===================================================================
--- t/notification.t.orig 2006-08-27 21:11:57.000000000 +0200
+++ t/notification.t 2011-10-25 11:45:21.000000000 +0200
@@ -2,20 +2,18 @@
use strict;
use warnings;
-use Gtk2::TestHelper tests => 35;
+use Gtk2::TestHelper tests => 32;
use Test::Exception;
use Gtk2::Notify -init, $0;
ginterfaces_ok('Gtk2::Notify');
-my $w = Gtk2::Window->new;
-my $n = Gtk2::Notify->new('foo', 'bar', '', $w);
+my $n = Gtk2::Notify->new('foo', 'bar', '');
isa_ok($n, 'Gtk2::Notify');
my @methods = qw(
add_action
- attach_to_widget
clear_actions
clear_hints
close
@@ -46,16 +44,6 @@
}, 42);
}, 'add_action');
-{
- my $nw = Gtk2::Window->new;
- lives_ok(sub {
- $n->attach_to_widget($nw);
- }, 'attach_to_widget');
- lives_ok(sub {
- $n->attach_to_widget($w);
- }, 'attach_to_widget');
-}
-
lives_ok(sub {
$n->clear_actions;
}, 'clear_actions with existing actions');
@@ -99,8 +87,6 @@
$n->close;
}, 'close before show');
-$w->show_all;
-
lives_ok(sub {
$n->show;
}, 'show');