~ubuntu-branches/ubuntu/raring/pidgin-libnotify/raring-proposed

« back to all changes in this revision

Viewing changes to debian/patches/pidgin.diff

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-05-20 13:26:57 UTC
  • Revision ID: james.westby@ubuntu.com-20070520132657-k5ocq3nlbbx116wg
Tags: 0.12-2
* Switch to pidgin. (Closes: #424685)
* Rename the package to pidgin-libnotify and add a dummy package to ease
  upgrades.
* Add NEWS.Debian to explain the transition.
* Implement get-orig-source as suggested by the Debian policy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- configure.ac        2006-10-22 14:48:29.000000000 +0100
 
2
+++ configure.ac        2007-05-03 11:34:33.000000000 +0100
 
3
@@ -3,7 +3,7 @@
 
4
 # gaim-encryption configure script, thanks guys ;)
 
5
 #
 
6
 
 
7
-AC_INIT([gaim-libnotify], [0.12], [nothing])
 
8
+AC_INIT([pidgin-libnotify], [0.13], [nothing])
 
9
 AC_CANONICAL_SYSTEM
 
10
 AM_CONFIG_HEADER(config.h)
 
11
 
 
12
@@ -33,9 +33,11 @@
 
13
 #
 
14
 # Setup gettext
 
15
 #
 
16
-ALL_LINGUAS="es fr it nl pl pt pt_BR"
 
17
-AM_GNU_GETTEXT_VERSION(0.10.40)
 
18
-AM_GNU_GETTEXT
 
19
+AC_PROG_INTLTOOL
 
20
+GETTEXT_PACKAGE=pidgin-libnotify
 
21
+AC_SUBST(GETTEXT_PACKAGE)
 
22
+ALL_LINGUAS="es fr it nl pl pt pt_BR sl"
 
23
+AM_GLIB_GNU_GETTEXT
 
24
 
 
25
 #
 
26
 # Look for the C compiler
 
27
@@ -80,19 +82,34 @@
 
28
 AC_SUBST(GTK_LIBS)
 
29
 
 
30
 #
 
31
-# Check for gaim
 
32
+# Check for libpurple
 
33
 #
 
34
 
 
35
-PKG_CHECK_MODULES(GAIM, gaim >= 2.0.0,
 
36
+PKG_CHECK_MODULES(LIBPURPLE, purple >= 2.0.0,
 
37
 [
 
38
-       AC_DEFINE(HAVE_GAIM, 1, [Define if we've found gaim.])
 
39
+       AC_DEFINE(HAVE_LIBPURPLE, 1, [Define if we've found libpurple.])
 
40
 ])
 
41
 
 
42
-AC_SUBST(GAIM_CFLAGS)
 
43
-GAIM_LIBDIR=`pkg-config --variable=libdir gaim`
 
44
-GAIM_DATADIR=`pkg-config --variable=datadir gaim`
 
45
-AC_SUBST(GAIM_LIBDIR)
 
46
-AC_SUBST(GAIM_DATADIR)
 
47
+AC_SUBST(LIBPURPLE_CFLAGS)
 
48
+LIBPURPLE_LIBDIR=`pkg-config --variable=libdir purple`
 
49
+LIBPURPLE_DATADIR=`pkg-config --variable=datadir purple`
 
50
+AC_SUBST(LIBPURPLE_LIBDIR)
 
51
+AC_SUBST(LIBPURPLE_DATADIR)
 
52
+
 
53
+#
 
54
+# Check for pidgin
 
55
+#
 
56
+
 
57
+PKG_CHECK_MODULES(PIDGIN, pidgin >= 2.0.0,
 
58
+[
 
59
+  AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
 
60
+])
 
61
+
 
62
+AC_SUBST(PIDGIN_CFLAGS)
 
63
+PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
 
64
+PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
 
65
+AC_SUBST(PIDGIN_LIBDIR)
 
66
+AC_SUBST(PIDGIN_DATADIR)
 
67
 
 
68
 #
 
69
 # Check if plugins are enabled
 
70
@@ -119,7 +136,6 @@
 
71
 #
 
72
 AC_OUTPUT([Makefile
 
73
                   VERSION
 
74
-                  intl/Makefile
 
75
                   po/Makefile.in
 
76
                   src/Makefile
 
77
                  ])
 
78
@@ -129,8 +145,9 @@
 
79
 echo;
 
80
 echo Debugging enabled..............: $enable_debug
 
81
 echo Deprecated API enabled.........: $enable_deprecated
 
82
-#echo Gaim API.......................: $GAIM_CFLAGS
 
83
+#echo libpurple API..................: $LIBPURPLE_CFLAGS
 
84
+#echo pidgin API.....................: $PIDGIN_CFLAGS
 
85
 echo;
 
86
 echo Type make to compile
 
87
-echo Thank you for using gaim-libnotify
 
88
+echo Thank you for using pidgin-libnotify
 
89
 echo;
 
90
--- src/gaim-libnotify.c        2006-10-22 14:46:44.000000000 +0100
 
91
+++ src/gaim-libnotify.c        2007-05-03 22:54:18.000000000 +0100
 
92
@@ -1,5 +1,5 @@
 
93
 /*
 
94
- * Gaim-libnotify - Provides a libnotify interface for Gaim
 
95
+ * Pidgin-libnotify - Provides a libnotify interface for Pidgin
 
96
  * Copyright (C) 2005 Duarte Henriques
 
97
  *
 
98
  * This program is free software; you can redistribute it and/or
 
99
@@ -23,59 +23,59 @@
 
100
 
 
101
 #include "gln_intl.h"
 
102
 
 
103
-#ifndef GAIM_PLUGINS
 
104
-#define GAIM_PLUGINS
 
105
+#ifndef PURPLE_PLUGINS
 
106
+#define PURPLE_PLUGINS
 
107
 #endif
 
108
 
 
109
-#include <gaim.h>
 
110
+#include <pidgin.h>
 
111
 #include <version.h>
 
112
 #include <debug.h>
 
113
 #include <util.h>
 
114
 #include <privacy.h>
 
115
 
 
116
-/* for gaim_gtk_create_prpl_icon */
 
117
-#include <gaim/gtkutils.h>
 
118
+/* for pidgin_create_prpl_icon */
 
119
+#include <gtkutils.h>
 
120
 
 
121
 #include <libnotify/notify.h>
 
122
 
 
123
 #include <string.h>
 
124
 
 
125
-#define PLUGIN_ID "gaim-libnotify"
 
126
+#define PLUGIN_ID "pidgin-libnotify"
 
127
 
 
128
 static GHashTable *buddy_hash;
 
129
 
 
130
-static GaimPluginPrefFrame *
 
131
-get_plugin_pref_frame (GaimPlugin *plugin)
 
132
+static PurplePluginPrefFrame *
 
133
+get_plugin_pref_frame (PurplePlugin *plugin)
 
134
 {
 
135
-       GaimPluginPrefFrame *frame;
 
136
-       GaimPluginPref *ppref;
 
137
+       PurplePluginPrefFrame *frame;
 
138
+       PurplePluginPref *ppref;
 
139
 
 
140
-       frame = gaim_plugin_pref_frame_new ();
 
141
+       frame = purple_plugin_pref_frame_new ();
 
142
 
 
143
-       ppref = gaim_plugin_pref_new_with_name_and_label (
 
144
+       ppref = purple_plugin_pref_new_with_name_and_label (
 
145
                             "/plugins/gtk/libnotify/newmsg",
 
146
                             _("New messages"));
 
147
-       gaim_plugin_pref_frame_add (frame, ppref);
 
148
+       purple_plugin_pref_frame_add (frame, ppref);
 
149
 
 
150
-       ppref = gaim_plugin_pref_new_with_name_and_label (
 
151
+       ppref = purple_plugin_pref_new_with_name_and_label (
 
152
                             "/plugins/gtk/libnotify/newconvonly",
 
153
                             _("Only new conversations"));
 
154
-       gaim_plugin_pref_frame_add (frame, ppref);
 
155
+       purple_plugin_pref_frame_add (frame, ppref);
 
156
 
 
157
-       ppref = gaim_plugin_pref_new_with_name_and_label (
 
158
+       ppref = purple_plugin_pref_new_with_name_and_label (
 
159
                             "/plugins/gtk/libnotify/blocked",
 
160
                             _("Ignore events from blocked users"));
 
161
-       gaim_plugin_pref_frame_add (frame, ppref);
 
162
+       purple_plugin_pref_frame_add (frame, ppref);
 
163
 
 
164
-       ppref = gaim_plugin_pref_new_with_name_and_label (
 
165
+       ppref = purple_plugin_pref_new_with_name_and_label (
 
166
                             "/plugins/gtk/libnotify/signon",
 
167
                             _("Buddy signs on"));
 
168
-       gaim_plugin_pref_frame_add (frame, ppref);
 
169
+       purple_plugin_pref_frame_add (frame, ppref);
 
170
 
 
171
-       ppref = gaim_plugin_pref_new_with_name_and_label (
 
172
+       ppref = purple_plugin_pref_new_with_name_and_label (
 
173
                             "/plugins/gtk/libnotify/signoff",
 
174
                             _("Buddy signs off"));
 
175
-       gaim_plugin_pref_frame_add (frame, ppref);
 
176
+       purple_plugin_pref_frame_add (frame, ppref);
 
177
 
 
178
        return frame;
 
179
 }
 
180
@@ -86,19 +86,19 @@
 
181
 static gboolean
 
182
 event_connection_throttle_cb (gpointer data)
 
183
 {
 
184
-       GaimAccount *account;
 
185
+       PurpleAccount *account;
 
186
 
 
187
-       account = (GaimAccount *)data;
 
188
+       account = (PurpleAccount *)data;
 
189
 
 
190
        if (!account)
 
191
                return FALSE;
 
192
 
 
193
-       if (!gaim_account_get_connection (account)) {
 
194
+       if (!purple_account_get_connection (account)) {
 
195
                just_signed_on_accounts = g_list_remove (just_signed_on_accounts, account);
 
196
                return FALSE;
 
197
        }
 
198
 
 
199
-       if (!gaim_account_is_connected (account))
 
200
+       if (!purple_account_is_connected (account))
 
201
                return TRUE;
 
202
 
 
203
        just_signed_on_accounts = g_list_remove (just_signed_on_accounts, account);
 
204
@@ -106,14 +106,18 @@
 
205
 }
 
206
 
 
207
 static void
 
208
-event_connection_throttle (GaimConnection *gc, gpointer data)
 
209
+event_connection_throttle (PurpleConnection *gc, gpointer data)
 
210
 {
 
211
-       GaimAccount *account;
 
212
+       PurpleAccount *account;
 
213
+
 
214
+       /* TODO: this function gets called after buddy signs on for GTalk
 
215
+          users who have themselves as a buddy */
 
216
+       purple_debug_info (PLUGIN_ID, "event_connection_throttle() called\n");
 
217
 
 
218
        if (!gc)
 
219
                return;
 
220
 
 
221
-       account = gaim_connection_get_account(gc);
 
222
+       account = purple_connection_get_account(gc);
 
223
        if (!account)
 
224
                return;
 
225
 
 
226
@@ -123,7 +127,7 @@
 
227
 
 
228
 /* do NOT g_free() the string returned by this function */
 
229
 static gchar *
 
230
-best_name (GaimBuddy *buddy)
 
231
+best_name (PurpleBuddy *buddy)
 
232
 {
 
233
        if (buddy->alias) {
 
234
                return buddy->alias;
 
235
@@ -135,14 +139,14 @@
 
236
 }
 
237
 
 
238
 static GdkPixbuf *
 
239
-pixbuf_from_buddy_icon (GaimBuddyIcon *buddy_icon)
 
240
+pixbuf_from_buddy_icon (PurpleBuddyIcon *buddy_icon)
 
241
 {
 
242
        GdkPixbuf *icon;
 
243
        const guchar *data;
 
244
        size_t len;
 
245
        GdkPixbufLoader *loader;
 
246
 
 
247
-       data = gaim_buddy_icon_get_data (buddy_icon, &len);
 
248
+       data = purple_buddy_icon_get_data (buddy_icon, &len);
 
249
 
 
250
        loader = gdk_pixbuf_loader_new ();
 
251
        gdk_pixbuf_loader_set_size (loader, 48, 48);
 
252
@@ -164,23 +168,23 @@
 
253
 action_cb (NotifyNotification *notification,
 
254
                   gchar *action, gpointer user_data)
 
255
 {
 
256
-       GaimBuddy *buddy = NULL;
 
257
-       GaimConversation *conv = NULL;
 
258
+       PurpleBuddy *buddy = NULL;
 
259
+       PurpleConversation *conv = NULL;
 
260
 
 
261
-       gaim_debug_info (PLUGIN_ID, "action_cb(), "
 
262
+       purple_debug_info (PLUGIN_ID, "action_cb(), "
 
263
                                        "notification: 0x%x, action: '%s'", notification, action);
 
264
 
 
265
-       buddy = (GaimBuddy *)g_object_get_data (G_OBJECT(notification), "buddy");
 
266
+       buddy = (PurpleBuddy *)g_object_get_data (G_OBJECT(notification), "buddy");
 
267
 
 
268
        if (!buddy) {
 
269
-               gaim_debug_warning (PLUGIN_ID, "Got no buddy!");
 
270
+               purple_debug_warning (PLUGIN_ID, "Got no buddy!");
 
271
                return;
 
272
        }
 
273
 
 
274
-       conv = gaim_find_conversation_with_account (GAIM_CONV_TYPE_ANY, buddy->name, buddy->account);
 
275
+       conv = purple_find_conversation_with_account (PURPLE_CONV_TYPE_ANY, buddy->name, buddy->account);
 
276
 
 
277
        if (!conv) {
 
278
-               conv = gaim_conversation_new (GAIM_CONV_TYPE_IM,
 
279
+               conv = purple_conversation_new (PURPLE_CONV_TYPE_IM,
 
280
                                                                          buddy->account,
 
281
                                                                          buddy->name);
 
282
        }
 
283
@@ -192,11 +196,11 @@
 
284
 static gboolean
 
285
 closed_cb (NotifyNotification *notification)
 
286
 {
 
287
-       GaimBuddy *buddy;
 
288
+       PurpleBuddy *buddy;
 
289
 
 
290
-       gaim_debug_info (PLUGIN_ID, "closed_cb(), notification: 0x%x\n", notification);
 
291
+       purple_debug_info (PLUGIN_ID, "closed_cb(), notification: 0x%x\n", notification);
 
292
 
 
293
-       buddy = (GaimBuddy *)g_object_get_data (G_OBJECT(notification), "buddy");
 
294
+       buddy = (PurpleBuddy *)g_object_get_data (G_OBJECT(notification), "buddy");
 
295
        if (buddy)
 
296
                g_hash_table_remove (buddy_hash, buddy);
 
297
 
 
298
@@ -235,11 +239,11 @@
 
299
 static void
 
300
 notify (const gchar *title,
 
301
                const gchar *body,
 
302
-               GaimBuddy *buddy)
 
303
+               PurpleBuddy *buddy)
 
304
 {
 
305
        NotifyNotification *notification = NULL;
 
306
        GdkPixbuf *icon;
 
307
-       GaimBuddyIcon *buddy_icon;
 
308
+       PurpleBuddyIcon *buddy_icon;
 
309
        gchar *tr_body;
 
310
 
 
311
        if (body)
 
312
@@ -254,7 +258,7 @@
 
313
                /* this shouldn't be necessary, file a bug */
 
314
                notify_notification_show (notification, NULL);
 
315
 
 
316
-               gaim_debug_info (PLUGIN_ID, "notify(), update: "
 
317
+               purple_debug_info (PLUGIN_ID, "notify(), update: "
 
318
                                                 "title: '%s', body: '%s', buddy: '%s'\n",
 
319
                                                 title, tr_body, best_name (buddy));
 
320
 
 
321
@@ -262,26 +266,26 @@
 
322
                return;
 
323
        }
 
324
        notification = notify_notification_new (title, tr_body, NULL, NULL);
 
325
-       gaim_debug_info (PLUGIN_ID, "notify(), new: "
 
326
+       purple_debug_info (PLUGIN_ID, "notify(), new: "
 
327
                                         "title: '%s', body: '%s', buddy: '%s'\n",
 
328
                                         title, tr_body, best_name (buddy));
 
329
 
 
330
        g_free (tr_body);
 
331
 
 
332
-       buddy_icon = gaim_buddy_get_icon (buddy);
 
333
+       buddy_icon = purple_buddy_get_icon (buddy);
 
334
        if (buddy_icon) {
 
335
                icon = pixbuf_from_buddy_icon (buddy_icon);
 
336
-               gaim_debug_info (PLUGIN_ID, "notify(), has a buddy icon.\n");
 
337
+               purple_debug_info (PLUGIN_ID, "notify(), has a buddy icon.\n");
 
338
        } else {
 
339
-               icon = gaim_gtk_create_prpl_icon (buddy->account, 1);
 
340
-               gaim_debug_info (PLUGIN_ID, "notify(), has a prpl icon.\n");
 
341
+               icon = pidgin_create_prpl_icon (buddy->account, 1);
 
342
+               purple_debug_info (PLUGIN_ID, "notify(), has a prpl icon.\n");
 
343
        }
 
344
 
 
345
        if (icon) {
 
346
                notify_notification_set_icon_from_pixbuf (notification, icon);
 
347
                g_object_unref (icon);
 
348
        } else {
 
349
-               gaim_debug_warning (PLUGIN_ID, "notify(), couldn't find any icon!\n");
 
350
+               purple_debug_warning (PLUGIN_ID, "notify(), couldn't find any icon!\n");
 
351
        }
 
352
 
 
353
        g_hash_table_insert (buddy_hash, buddy, notification);
 
354
@@ -295,13 +299,13 @@
 
355
        notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);
 
356
 
 
357
        if (!notify_notification_show (notification, NULL)) {
 
358
-               gaim_debug_error (PLUGIN_ID, "notify(), failed to send notification\n");
 
359
+               purple_debug_error (PLUGIN_ID, "notify(), failed to send notification\n");
 
360
        }
 
361
 
 
362
 }
 
363
 
 
364
 static void
 
365
-notify_buddy_signon_cb (GaimBuddy *buddy,
 
366
+notify_buddy_signon_cb (PurpleBuddy *buddy,
 
367
                                                gpointer data)
 
368
 {
 
369
        gchar *tr_name, *title;
 
370
@@ -309,14 +313,14 @@
 
371
 
 
372
        g_return_if_fail (buddy);
 
373
 
 
374
-       if (!gaim_prefs_get_bool ("/plugins/gtk/libnotify/signon"))
 
375
+       if (!purple_prefs_get_bool ("/plugins/gtk/libnotify/signon"))
 
376
                return;
 
377
 
 
378
        if (g_list_find (just_signed_on_accounts, buddy->account))
 
379
                return;
 
380
 
 
381
-       blocked = gaim_prefs_get_bool ("/plugins/gtk/libnotify/blocked");
 
382
-       if (!gaim_privacy_check (buddy->account, buddy->name) && blocked)
 
383
+       blocked = purple_prefs_get_bool ("/plugins/gtk/libnotify/blocked");
 
384
+       if (!purple_privacy_check (buddy->account, buddy->name) && blocked)
 
385
                return;
 
386
 
 
387
        tr_name = truncate_escape_string (best_name (buddy), 25);
 
388
@@ -330,7 +334,7 @@
 
389
 }
 
390
 
 
391
 static void
 
392
-notify_buddy_signoff_cb (GaimBuddy *buddy,
 
393
+notify_buddy_signoff_cb (PurpleBuddy *buddy,
 
394
                                                 gpointer data)
 
395
 {
 
396
        gchar *tr_name, *title;
 
397
@@ -338,14 +342,14 @@
 
398
 
 
399
        g_return_if_fail (buddy);
 
400
 
 
401
-       if (!gaim_prefs_get_bool ("/plugins/gtk/libnotify/signoff"))
 
402
+       if (!purple_prefs_get_bool ("/plugins/gtk/libnotify/signoff"))
 
403
                return;
 
404
 
 
405
        if (g_list_find (just_signed_on_accounts, buddy->account))
 
406
                return;
 
407
 
 
408
-       blocked = gaim_prefs_get_bool ("/plugins/gtk/libnotify/blocked");
 
409
-       if (!gaim_privacy_check (buddy->account, buddy->name) && blocked)
 
410
+       blocked = purple_prefs_get_bool ("/plugins/gtk/libnotify/blocked");
 
411
+       if (!purple_privacy_check (buddy->account, buddy->name) && blocked)
 
412
                return;
 
413
 
 
414
        tr_name = truncate_escape_string (best_name (buddy), 25);
 
415
@@ -359,26 +363,26 @@
 
416
 }
 
417
 
 
418
 static void
 
419
-notify_msg_sent (GaimAccount *account,
 
420
+notify_msg_sent (PurpleAccount *account,
 
421
                                 const gchar *sender,
 
422
                                 const gchar *message)
 
423
 {
 
424
-       GaimBuddy *buddy;
 
425
+       PurpleBuddy *buddy;
 
426
        gchar *title, *body, *tr_name;
 
427
        gboolean blocked;
 
428
 
 
429
-       buddy = gaim_find_buddy (account, sender);
 
430
+       buddy = purple_find_buddy (account, sender);
 
431
        if (!buddy)
 
432
                return;
 
433
 
 
434
-       blocked = gaim_prefs_get_bool ("/plugins/gtk/libnotify/blocked");
 
435
-       if (!gaim_privacy_check(account, sender) && blocked)
 
436
+       blocked = purple_prefs_get_bool ("/plugins/gtk/libnotify/blocked");
 
437
+       if (!purple_privacy_check(account, sender) && blocked)
 
438
                return;
 
439
 
 
440
        tr_name = truncate_escape_string (best_name (buddy), 25);
 
441
 
 
442
        title = g_strdup_printf (_("%s says:"), tr_name);
 
443
-       body = gaim_markup_strip_html (message);
 
444
+       body = purple_markup_strip_html (message);
 
445
 
 
446
        notify (title, body, buddy);
 
447
 
 
448
@@ -388,28 +392,28 @@
 
449
 }
 
450
 
 
451
 static void
 
452
-notify_new_message_cb (GaimAccount *account,
 
453
+notify_new_message_cb (PurpleAccount *account,
 
454
                                           const gchar *sender,
 
455
                                           const gchar *message,
 
456
                                           int flags,
 
457
                                           gpointer data)
 
458
 {
 
459
-       GaimConversation *conv;
 
460
+       PurpleConversation *conv;
 
461
 
 
462
-       if (!gaim_prefs_get_bool ("/plugins/gtk/libnotify/newmsg"))
 
463
+       if (!purple_prefs_get_bool ("/plugins/gtk/libnotify/newmsg"))
 
464
                return;
 
465
 
 
466
-       conv = gaim_find_conversation_with_account (GAIM_CONV_TYPE_IM, sender, account);
 
467
+       conv = purple_find_conversation_with_account (PURPLE_CONV_TYPE_IM, sender, account);
 
468
 
 
469
 #ifndef DEBUG /* in debug mode, always show notifications */
 
470
-       if (conv && gaim_conversation_has_focus (conv)) {
 
471
-               gaim_debug_info (PLUGIN_ID, "Conversation has focus 0x%x\n", conv);
 
472
+       if (conv && purple_conversation_has_focus (conv)) {
 
473
+               purple_debug_info (PLUGIN_ID, "Conversation has focus 0x%x\n", conv);
 
474
                return;
 
475
        }
 
476
 #endif
 
477
 
 
478
-       if (conv && gaim_prefs_get_bool ("/plugins/gtk/libnotify/newconvonly")) {
 
479
-               gaim_debug_info (PLUGIN_ID, "Conversation is not new 0x%x\n", conv);
 
480
+       if (conv && purple_prefs_get_bool ("/plugins/gtk/libnotify/newconvonly")) {
 
481
+               purple_debug_info (PLUGIN_ID, "Conversation is not new 0x%x\n", conv);
 
482
                return;
 
483
        }
 
484
 
 
485
@@ -417,15 +421,15 @@
 
486
 }
 
487
 
 
488
 static void
 
489
-notify_chat_nick (GaimAccount *account,
 
490
+notify_chat_nick (PurpleAccount *account,
 
491
                                  const gchar *sender,
 
492
                                  const gchar *message,
 
493
-                                 GaimConversation *conv,
 
494
+                                 PurpleConversation *conv,
 
495
                                  gpointer data)
 
496
 {
 
497
        gchar *nick;
 
498
 
 
499
-       nick = (gchar *)gaim_conv_chat_get_nick (GAIM_CONV_CHAT(conv));
 
500
+       nick = (gchar *)purple_conv_chat_get_nick (PURPLE_CONV_CHAT(conv));
 
501
        if (nick && !strcmp (sender, nick))
 
502
                return;
 
503
 
 
504
@@ -436,63 +440,63 @@
 
505
 }
 
506
 
 
507
 static gboolean
 
508
-plugin_load (GaimPlugin *plugin)
 
509
+plugin_load (PurplePlugin *plugin)
 
510
 {
 
511
        void *conv_handle, *blist_handle, *conn_handle;
 
512
 
 
513
-       if (!notify_is_initted () && !notify_init ("Gaim")) {
 
514
-               gaim_debug_error (PLUGIN_ID, "libnotify not running!\n");
 
515
+       if (!notify_is_initted () && !notify_init ("Pidgin")) {
 
516
+               purple_debug_error (PLUGIN_ID, "libnotify not running!\n");
 
517
                return FALSE;
 
518
        }
 
519
 
 
520
-       conv_handle = gaim_conversations_get_handle ();
 
521
-       blist_handle = gaim_blist_get_handle ();
 
522
-       conn_handle = gaim_connections_get_handle();
 
523
+       conv_handle = purple_conversations_get_handle ();
 
524
+       blist_handle = purple_blist_get_handle ();
 
525
+       conn_handle = purple_connections_get_handle();
 
526
 
 
527
        buddy_hash = g_hash_table_new (NULL, NULL);
 
528
 
 
529
-       gaim_signal_connect (blist_handle, "buddy-signed-on", plugin,
 
530
-                                               GAIM_CALLBACK(notify_buddy_signon_cb), NULL);
 
531
+       purple_signal_connect (blist_handle, "buddy-signed-on", plugin,
 
532
+                                               PURPLE_CALLBACK(notify_buddy_signon_cb), NULL);
 
533
 
 
534
-       gaim_signal_connect (blist_handle, "buddy-signed-off", plugin,
 
535
-                                               GAIM_CALLBACK(notify_buddy_signoff_cb), NULL);
 
536
+       purple_signal_connect (blist_handle, "buddy-signed-off", plugin,
 
537
+                                               PURPLE_CALLBACK(notify_buddy_signoff_cb), NULL);
 
538
 
 
539
-       gaim_signal_connect (conv_handle, "received-im-msg", plugin,
 
540
-                                               GAIM_CALLBACK(notify_new_message_cb), NULL);
 
541
+       purple_signal_connect (conv_handle, "received-im-msg", plugin,
 
542
+                                               PURPLE_CALLBACK(notify_new_message_cb), NULL);
 
543
 
 
544
-       gaim_signal_connect (conv_handle, "received-chat-msg", plugin,
 
545
-                                               GAIM_CALLBACK(notify_chat_nick), NULL);
 
546
+       purple_signal_connect (conv_handle, "received-chat-msg", plugin,
 
547
+                                               PURPLE_CALLBACK(notify_chat_nick), NULL);
 
548
 
 
549
        /* used just to not display the flood of guifications we'd get */
 
550
-       gaim_signal_connect (conn_handle, "signed-on", plugin,
 
551
-                                               GAIM_CALLBACK(event_connection_throttle), NULL);
 
552
+       purple_signal_connect (conn_handle, "signed-on", plugin,
 
553
+                                               PURPLE_CALLBACK(event_connection_throttle), NULL);
 
554
 
 
555
        return TRUE;
 
556
 }
 
557
 
 
558
 static gboolean
 
559
-plugin_unload (GaimPlugin *plugin)
 
560
+plugin_unload (PurplePlugin *plugin)
 
561
 {
 
562
        void *conv_handle, *blist_handle, *conn_handle;
 
563
 
 
564
-       conv_handle = gaim_conversations_get_handle ();
 
565
-       blist_handle = gaim_blist_get_handle ();
 
566
-       conn_handle = gaim_connections_get_handle();
 
567
+       conv_handle = purple_conversations_get_handle ();
 
568
+       blist_handle = purple_blist_get_handle ();
 
569
+       conn_handle = purple_connections_get_handle();
 
570
 
 
571
-       gaim_signal_disconnect (blist_handle, "buddy-signed-on", plugin,
 
572
-                                                       GAIM_CALLBACK(notify_buddy_signon_cb));
 
573
+       purple_signal_disconnect (blist_handle, "buddy-signed-on", plugin,
 
574
+                                                       PURPLE_CALLBACK(notify_buddy_signon_cb));
 
575
 
 
576
-       gaim_signal_disconnect (blist_handle, "buddy-signed-off", plugin,
 
577
-                                                       GAIM_CALLBACK(notify_buddy_signoff_cb));
 
578
+       purple_signal_disconnect (blist_handle, "buddy-signed-off", plugin,
 
579
+                                                       PURPLE_CALLBACK(notify_buddy_signoff_cb));
 
580
 
 
581
-       gaim_signal_disconnect (conv_handle, "received-im-msg", plugin,
 
582
-                                                       GAIM_CALLBACK(notify_new_message_cb));
 
583
+       purple_signal_disconnect (conv_handle, "received-im-msg", plugin,
 
584
+                                                       PURPLE_CALLBACK(notify_new_message_cb));
 
585
 
 
586
-       gaim_signal_disconnect (conv_handle, "received-chat-msg", plugin,
 
587
-                                                       GAIM_CALLBACK(notify_chat_nick));
 
588
+       purple_signal_disconnect (conv_handle, "received-chat-msg", plugin,
 
589
+                                                       PURPLE_CALLBACK(notify_chat_nick));
 
590
 
 
591
-       gaim_signal_disconnect (conn_handle, "signed-on", plugin,
 
592
-                                                       GAIM_CALLBACK(event_connection_throttle));
 
593
+       purple_signal_disconnect (conn_handle, "signed-on", plugin,
 
594
+                                                       PURPLE_CALLBACK(event_connection_throttle));
 
595
 
 
596
        g_hash_table_destroy (buddy_hash);
 
597
 
 
598
@@ -501,21 +505,21 @@
 
599
        return TRUE;
 
600
 }
 
601
 
 
602
-static GaimPluginUiInfo prefs_info = {
 
603
+static PurplePluginUiInfo prefs_info = {
 
604
     get_plugin_pref_frame,
 
605
     0,                                         /* page num (Reserved) */
 
606
     NULL                                       /* frame (Reserved) */
 
607
 };
 
608
 
 
609
-static GaimPluginInfo info = {
 
610
-    GAIM_PLUGIN_MAGIC,                                                                         /* api version */
 
611
-    GAIM_MAJOR_VERSION,
 
612
-    GAIM_MINOR_VERSION,
 
613
-    GAIM_PLUGIN_STANDARD,                                                                      /* type */
 
614
+static PurplePluginInfo info = {
 
615
+    PURPLE_PLUGIN_MAGIC,                                                                               /* api version */
 
616
+    PURPLE_MAJOR_VERSION,
 
617
+    PURPLE_MINOR_VERSION,
 
618
+    PURPLE_PLUGIN_STANDARD,                                                                    /* type */
 
619
     0,                                                                                                         /* ui requirement */
 
620
     0,                                                                                                         /* flags */
 
621
     NULL,                                                                                                      /* dependencies */
 
622
-    GAIM_PRIORITY_DEFAULT,                                                                     /* priority */
 
623
+    PURPLE_PRIORITY_DEFAULT,                                                                   /* priority */
 
624
     
 
625
     PLUGIN_ID,                                                                                         /* id */
 
626
     NULL,                                                                                                      /* name */
 
627
@@ -535,22 +539,22 @@
 
628
 };
 
629
 
 
630
 static void
 
631
-init_plugin (GaimPlugin *plugin)
 
632
+init_plugin (PurplePlugin *plugin)
 
633
 {
 
634
        bindtextdomain (PACKAGE, LOCALEDIR);
 
635
        bind_textdomain_codeset (PACKAGE, "UTF-8");
 
636
 
 
637
        info.name = _("Libnotify Popups");
 
638
        info.summary = _("Displays popups via libnotify.");
 
639
-       info.description = _("Gaim-libnotify:\nDisplays popups via libnotify.");
 
640
+       info.description = _("Pidgin-libnotify:\nDisplays popups via libnotify.");
 
641
 
 
642
-       gaim_prefs_add_none ("/plugins/gtk/libnotify");
 
643
-       gaim_prefs_add_bool ("/plugins/gtk/libnotify/newmsg", TRUE);
 
644
-       gaim_prefs_add_bool ("/plugins/gtk/libnotify/blocked", TRUE);
 
645
-       gaim_prefs_add_bool ("/plugins/gtk/libnotify/newconvonly", FALSE);
 
646
-       gaim_prefs_add_bool ("/plugins/gtk/libnotify/signon", TRUE);
 
647
-       gaim_prefs_add_bool ("/plugins/gtk/libnotify/signoff", FALSE);
 
648
+       purple_prefs_add_none ("/plugins/gtk/libnotify");
 
649
+       purple_prefs_add_bool ("/plugins/gtk/libnotify/newmsg", TRUE);
 
650
+       purple_prefs_add_bool ("/plugins/gtk/libnotify/blocked", TRUE);
 
651
+       purple_prefs_add_bool ("/plugins/gtk/libnotify/newconvonly", FALSE);
 
652
+       purple_prefs_add_bool ("/plugins/gtk/libnotify/signon", TRUE);
 
653
+       purple_prefs_add_bool ("/plugins/gtk/libnotify/signoff", FALSE);
 
654
 }
 
655
 
 
656
-GAIM_INIT_PLUGIN(notify, init_plugin, info)
 
657
+PURPLE_INIT_PLUGIN(notify, init_plugin, info)
 
658
 
 
659
--- Makefile.am 2005-12-24 02:44:33.000000000 +0000
 
660
+++ Makefile.am 2006-11-17 00:37:25.000000000 +0000
 
661
@@ -6,5 +6,5 @@
 
662
                README \
 
663
                COPYING
 
664
 
 
665
-SUBDIRS = intl po src
 
666
+SUBDIRS = po src
 
667
 
 
668
--- /dev/null   2007-05-03 09:23:19.077225576 +0100
 
669
+++ po/sl.po    2006-11-17 22:17:27.000000000 +0000
 
670
@@ -0,0 +1,75 @@
 
671
+# Slovenian (sl) translation of gaim-libnotify.
 
672
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 
673
+# This file is distributed under the same license as the gaim-libnotify package.
 
674
+#
 
675
+# Matic Žgur <mr.zgur@gmail.com>, 2006.
 
676
+#
 
677
+msgid ""
 
678
+msgstr ""
 
679
+"Project-Id-Version: gaim-libnotify\n"
 
680
+"Report-Msgid-Bugs-To: \n"
 
681
+"POT-Creation-Date: 2006-11-17 00:40+0000\n"
 
682
+"PO-Revision-Date: 2006-11-16 18:11+0100\n"
 
683
+"Last-Translator: Matic Žgur <mr.zgur@gmail.com>\n"
 
684
+"Language-Team: Slovenian <LL@li.org>\n"
 
685
+"MIME-Version: 1.0\n"
 
686
+"Content-Type: text/plain; charset=utf-8\n"
 
687
+"Content-Transfer-Encoding: 8bit\n"
 
688
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
 
689
+"%100==4 ? 2 : 3);\n"
 
690
+"X-Poedit-Language: Slovenian\n"
 
691
+
 
692
+#: src/gaim-libnotify.c:57
 
693
+msgid "New messages"
 
694
+msgstr "Nova sporočila"
 
695
+
 
696
+#: src/gaim-libnotify.c:62
 
697
+msgid "Only new conversations"
 
698
+msgstr "Samo novi pogovori"
 
699
+
 
700
+#: src/gaim-libnotify.c:67
 
701
+msgid "Ignore events from blocked users"
 
702
+msgstr "Prezri dogodke pri blokiranih uporabnikih"
 
703
+
 
704
+#: src/gaim-libnotify.c:72
 
705
+msgid "Buddy signs on"
 
706
+msgstr "Prijatelj se prijavi"
 
707
+
 
708
+#: src/gaim-libnotify.c:77
 
709
+msgid "Buddy signs off"
 
710
+msgstr "Prijatelj se odjavi"
 
711
+
 
712
+#: src/gaim-libnotify.c:295
 
713
+msgid "Show"
 
714
+msgstr "Prikaži"
 
715
+
 
716
+#: src/gaim-libnotify.c:324
 
717
+#, c-format
 
718
+msgid "%s signed on"
 
719
+msgstr "%s se je prijavil/a"
 
720
+
 
721
+#: src/gaim-libnotify.c:353
 
722
+#, c-format
 
723
+msgid "%s signed off"
 
724
+msgstr "%s se je odjavil/a"
 
725
+
 
726
+#: src/gaim-libnotify.c:380
 
727
+#, c-format
 
728
+msgid "%s says:"
 
729
+msgstr "%s pravi:"
 
730
+
 
731
+#: src/gaim-libnotify.c:543
 
732
+msgid "Libnotify Popups"
 
733
+msgstr "Pojavna okna libnotify"
 
734
+
 
735
+#: src/gaim-libnotify.c:544
 
736
+msgid "Displays popups via libnotify."
 
737
+msgstr "Prikaže pojavna okna preko libnotify."
 
738
+
 
739
+#: src/gaim-libnotify.c:545
 
740
+msgid ""
 
741
+"Gaim-libnotify:\n"
 
742
+"Displays popups via libnotify."
 
743
+msgstr ""
 
744
+"Gaim-libnotify:\n"
 
745
+"Prikaže pojavna okna preko libnotify."
 
746
--- src/Makefile.am     2005-12-24 02:44:33.000000000 +0000
 
747
+++ src/Makefile.am     2007-05-03 11:34:53.000000000 +0100
 
748
@@ -1,4 +1,4 @@
 
749
-gddir = $(GAIM_LIBDIR)/gaim
 
750
+gddir = $(LIBPURPLE_LIBDIR)/purple-2
 
751
 
 
752
 gaim_libnotify_la_LDFLAGS = -module -avoid-version
 
753
 
 
754
@@ -15,13 +15,14 @@
 
755
 endif
 
756
 
 
757
 AM_CPPFLAGS = \
 
758
-       -DLIBDIR=\"$(GAIM_LIBDIR)/gaim/\" \
 
759
-       -DDATADIR=\"$(GAIM_DATADIR)\" \
 
760
-       -DLOCALEDIR=\"$(GAIM_DATADIR)/locale\" \
 
761
+       -DLIBDIR=\"$(LIBPURPLE_LIBDIR)/purple-2/\" \
 
762
+       -DDATADIR=\"$(LIBPURPLE_DATADIR)\" \
 
763
+       -DLOCALEDIR=\"$(LIBPURPLE_DATADIR)/locale\" \
 
764
        $(DEBUG_CFLAGS) \
 
765
        $(GTK_CFLAGS) \
 
766
        $(GLIB_CFLAGS) \
 
767
-       $(GAIM_CFLAGS) \
 
768
+       $(PIDGIN_CFLAGS) \
 
769
+       $(LIBPURPLE_CFLAGS) \
 
770
        $(LIBNOTIFY_CFLAGS) \
 
771
        $(DBUS_CFLAGS) \
 
772
        $(GTK_CFLAGS)