1
=== modified file 'configure.ac'
2
--- old/configure.ac 2011-02-24 17:06:45 +0000
3
+++ new/configure.ac 2011-02-24 17:09:26 +0000
5
GNOME_CONTROL_CENTER_GTK3_REQUIRED=2.31.4
6
INDICATE_REQUIRED=0.4.91
7
INDICATE_GTK_REQUIRED=0.4.91
11
prev_top_build_prefix=$ac_top_build_prefix
15
if test "x$enable_libindicate" = "xyes" -a "x$have_libindicate" != "xyes"; then
16
- AC_MSG_ERROR([Couldn't find libindicate.])
17
+ AC_MSG_ERROR([Could not find libindicate.])
20
AM_CONDITIONAL(HAVE_LIBINDICATE, test "x$have_libindicate" = "xyes")
22
# -----------------------------------------------------------
24
+# -----------------------------------------------------------
25
+AC_ARG_ENABLE(libunity,
26
+ AS_HELP_STRING([--enable-libunity=@<:@no/yes/auto@:>@],
27
+ [build libunity support]), ,
28
+ enable_libunity=auto)
30
+if test "x$enable_unity" != "xno"; then
31
+ PKG_CHECK_MODULES(UNITY,
33
+ unity >= $UNITY_REQUIRED
34
+ ], have_unity="yes", have_unity="no")
36
+ if test "x$have_unity" = "xyes"; then
37
+ AC_DEFINE(HAVE_UNITY, 1, [Define if you have unity])
43
+if test "x$enable_unity" = "xyes" -a "x$have_unity" != "xyes"; then
44
+ AC_MSG_ERROR([Could not find libunity.])
47
+AM_CONDITIONAL(HAVE_UNITY, test "x$have_unity" = "xyes")
48
+AC_SUBST([UNITY_CFLAGS])
49
+AC_SUBST([UNITY_LIBS])
51
+# -----------------------------------------------------------
53
# -----------------------------------------------------------
54
AC_ARG_ENABLE(nautilus-sendto,
58
Message indicator support (libindicate): ${have_libindicate}
59
+ Unity panel support (unity).: ${have_unity}
60
Spell checking (enchant)....: ${have_enchant}
61
Display maps (libchamplain).: ${have_libchamplain}
62
Location awareness (Geoclue): ${have_geoclue}
64
=== modified file 'src/Makefile.am'
65
--- old/src/Makefile.am 2011-02-24 17:04:31 +0000
66
+++ new/src/Makefile.am 2011-02-24 17:09:26 +0000
73
$(LIBCHAMPLAIN_CFLAGS) \
76
$(top_builddir)/extensions/libemp-extensions.la \
88
$(LIBCHAMPLAIN_LIBS) \
92
=== modified file 'src/empathy-chat-window.c'
93
--- old/src/empathy-chat-window.c 2011-02-24 17:04:31 +0000
94
+++ new/src/empathy-chat-window.c 2011-02-24 17:09:26 +0000
96
#define DEBUG_FLAG EMPATHY_DEBUG_CHAT
97
#include <libempathy/empathy-debug.h>
103
/* Macro to compare guint32 X timestamps, while accounting for wrapping around
105
#define X_EARLIER_OR_EQL(t1, t2) \
107
/* EmpathyChat -> EmpathyIndicator for that chat, if any */
108
GHashTable *indicators;
111
+ UnityLauncherEntry *launcher;
113
GtkTargetList *contact_targets;
114
GtkTargetList *file_targets;
116
@@ -1308,8 +1315,19 @@
118
g_signal_connect (indicator, "activate",
119
G_CALLBACK (chat_window_indicator_activate_cb), chat);
121
g_hash_table_insert (priv->indicators, chat, indicator);
123
+ if (priv->launcher != NULL)
125
+ gint count = g_hash_table_size (priv->indicators);
126
+ DEBUG ("unity launcher: count is now %d", count);
129
+ unity_launcher_entry_set_count (priv->launcher, count);
130
+ unity_launcher_entry_set_count_visible (priv->launcher, TRUE);
135
empathy_indicator_show (indicator);
137
@@ -1326,6 +1344,25 @@
138
DEBUG ("indicator is %p", indicator);
139
empathy_indicator_hide (indicator);
140
g_hash_table_remove (priv->indicators, chat);
142
+ if (priv->launcher != NULL)
144
+ gint count = g_hash_table_size (priv->indicators);
145
+ DEBUG ("unity launcher: count is %d", count);
148
+ DEBUG ("unity launcher: setting count to %d", count);
149
+ unity_launcher_entry_set_count (priv->launcher, count);
150
+ unity_launcher_entry_set_count_visible (priv->launcher, TRUE);
152
+ unity_launcher_entry_set_count (priv->launcher, count);
153
+ DEBUG ("unity launcher: hiding count");
154
+ unity_launcher_entry_set_count_visible (priv->launcher, FALSE);
161
DEBUG ("indicator is NULL, nothing to remove");
163
@@ -1959,6 +1996,11 @@
164
priv->chat_manager = NULL;
167
+ if (priv->launcher) {
168
+ g_object_unref (priv->launcher);
169
+ priv->launcher = NULL;
172
chat_windows = g_list_remove (chat_windows, window);
173
gtk_widget_destroy (priv->dialog);
175
@@ -2057,6 +2099,9 @@
176
priv->indicators = g_hash_table_new_full (g_direct_hash, g_direct_equal,
177
NULL, g_object_unref);
180
+ priv->launcher = unity_launcher_entry_get_for_desktop_id ("empathy.desktop");
183
priv->notebook = gtk_notebook_new ();
184
gtk_notebook_set_group (GTK_NOTEBOOK (priv->notebook), "EmpathyChatWindow");
186
=== modified file 'src/empathy-indicator-manager.c'
187
--- old/src/empathy-indicator-manager.c 2011-02-24 17:06:45 +0000
188
+++ new/src/empathy-indicator-manager.c 2011-02-24 17:09:26 +0000
190
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
191
#include <libempathy/empathy-debug.h>
197
#define INDICATOR_LOGIN_TIMEOUT 15
198
#define EMPATHY_DESKTOP_PATH DESKTOPDIR "/empathy.desktop"
201
IndicateServer *indicate_server;
202
GSList *indicator_events;
203
GHashTable *login_timeouts;
205
+ UnityLauncherEntry *launcher;
207
} EmpathyIndicatorManagerPriv;
211
g_object_unref (indicator);
212
priv->indicator_events = g_slist_prepend (priv->indicator_events,
215
+ if (priv->launcher == NULL)
219
+ gint count = g_slist_length (priv->indicator_events);
220
+ DEBUG ("unity launcher: count is %d", count);
223
+ unity_launcher_entry_set_count (priv->launcher, count);
224
+ unity_launcher_entry_set_count_visible (priv->launcher, TRUE);
232
priv->indicator_events = g_slist_remove (priv->indicator_events,
234
empathy_indicator_hide (indicator_event->indicator);
236
+ if (priv->launcher == NULL)
238
+ DEBUG ("unity launcher: launcher is NULL");
242
+ gint count = g_slist_length (priv->indicator_events);
243
+ DEBUG ("unity launcher: count is %d", count);
246
+ DEBUG ("unity launcher: setting count to %d", count);
247
+ unity_launcher_entry_set_count (priv->launcher, count);
248
+ unity_launcher_entry_set_count_visible (priv->launcher, TRUE);
250
+ unity_launcher_entry_set_count (priv->launcher, count);
251
+ DEBUG ("unity launcher: hiding count");
252
+ unity_launcher_entry_set_count_visible (priv->launcher, FALSE);
260
priv = GET_PRIV (manager);
262
+ DEBUG ("Event updated");
264
for (l = priv->indicator_events; l; l = l->next)
266
IndicatorEvent *indicator_event;
268
g_object_unref (priv->indicate_server);
269
priv->indicate_server = NULL;
271
+ if (priv->launcher) {
272
+ g_object_unref (priv->launcher);
273
+ priv->launcher = NULL;
275
if (priv->login_timeouts) {
276
g_hash_table_unref (priv->login_timeouts);
277
priv->login_timeouts = NULL;
279
G_CALLBACK (indicate_server_activate),
283
+ priv->launcher = unity_launcher_entry_get_for_desktop_id ("empathy.desktop");
286
g_signal_connect (priv->event_manager, "event-added",
287
G_CALLBACK (indicator_manager_event_added_cb),