Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Unnamed
Monday, July 23rd, 2007 at 3:05:12pm UTC 

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

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right