1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
From 25295d8445f9dfddd45c108545d8b6974e1785cb Mon Sep 17 00:00:00 2001
From: Luo Jinghua <sunmoon1997@gmail.com>
Date: Fri, 19 Nov 2010 10:46:36 +0800
Subject: [PATCH 5/5] Revert "build-sys: fix building against libnotify 0.7"
This reverts commit 5c273f855630bf54f6ebe95ea8b45c8abe2ffff6.
---
configure.ac | 4 ++--
src/gnome-ask-password-agent.vala | 9 +++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index d99f02b..45ab664 100644
--- a/configure.ac
+++ b/configure.ac
@@ -256,12 +256,12 @@ if test "$have_gtk" = "yes"; then
AC_SUBST(DBUSGLIB_CFLAGS)
AC_SUBST(DBUSGLIB_LIBS)
- PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify >= 0.7.0 ])
+ PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_SUBST(LIBNOTIFY_LIBS)
fi
-AM_PROG_VALAC([0.11])
+AM_PROG_VALAC([0.9])
AC_SUBST(VAPIDIR)
AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x)
diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala
index 6cab6f9..1523e2e 100644
--- a/src/gnome-ask-password-agent.vala
+++ b/src/gnome-ask-password-agent.vala
@@ -38,8 +38,8 @@ public class PasswordDialog : Dialog {
set_default_response(ResponseType.OK);
set_icon_name(icon);
- add_button(Stock.CANCEL, ResponseType.CANCEL);
- add_button(Stock.OK, ResponseType.OK);
+ add_button(STOCK_CANCEL, ResponseType.CANCEL);
+ add_button(STOCK_OK, ResponseType.OK);
Container content = (Container) get_content_area();
@@ -181,7 +181,8 @@ public class MyStatusIcon : StatusIcon {
set_visible(true);
- Notification n = new Notification(title, message, icon);
+ Notification n = new Notification(title, message, icon, null);
+ n.attach_to_status_icon(this);
n.set_timeout(5000);
n.show();
@@ -225,7 +226,7 @@ public class MyStatusIcon : StatusIcon {
OutputStream stream = new UnixOutputStream(to_process, true);
- stream.write(password.data, null);
+ stream.write(password, password.length, null);
}
}
--
1.7.3.2
|