Drop applied patches
authorMyhailo Danylenko <isbear@ukrpost.net>
Sun, 14 Oct 2012 19:11:07 +0300
changeset 49 92fdcdb3ccd0
parent 48 307314cdbb39
child 50 1c5d368913c9
Drop applied patches
fix-create-new-cat.diff
fix-receipts.diff
series
update-help.diff
--- a/fix-create-new-cat.diff	Sun Oct 14 16:52:27 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# HG changeset patch
-# Parent 26edaf6ea10b8db2ed07da3e4ad9bee03077de84
-Fix endless loop on exhaustion of completion category pool
-
-diff -r 26edaf6ea10b mcabber/mcabber/compl.c
---- a/mcabber/mcabber/compl.c	Mon Jul 30 22:39:17 2012 +0200
-+++ b/mcabber/mcabber/compl.c	Wed Aug 08 12:15:20 2012 +0300
-@@ -97,10 +97,11 @@
- // as it is likely to change in future.
- guint compl_new_category(void)
- {
-+  const guint maxcat = 8 * sizeof (registered_cats);
-   guint i = 0;
--  while ((registered_cats >> i) & 1)
-+  while ((registered_cats >> i) & 1 && i < maxcat)
-     i++;
--  if (i >= 8 * sizeof (registered_cats))
-+  if (i >= maxcat)
-     return 0;
-   else {
-     guint64 id = 1 << i;
--- a/fix-receipts.diff	Sun Oct 14 16:52:27 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-# HG changeset patch
-# Parent 99db5d4ed047b3dbe54727c1df311531f611f31f
-Fix receipts handling according to recent XEP updates
-
-  * add lm_get_uid() @xmpp_helper.h
-  * identify receipts by id attribute of 'received' subelement
-    instead of stanza id
-
-diff -r 99db5d4ed047 mcabber/mcabber/hbuf.c
---- a/mcabber/mcabber/hbuf.c	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/hbuf.c	Mon Apr 30 23:10:28 2012 +0300
-@@ -525,7 +525,7 @@
- //  hbuf_remove_receipt(hbuf, xep184)
- // Remove the Receipt Flag for the message with the given xep184 id
- // Returns TRUE if it was found and removed, otherwise FALSE
--gboolean hbuf_remove_receipt(GList *hbuf, gpointer xep184)
-+gboolean hbuf_remove_receipt(GList *hbuf, gconstpointer xep184)
- {
-   hbuf_block *blk;
- 
-@@ -533,7 +533,8 @@
- 
-   for ( ; hbuf; hbuf = g_list_previous(hbuf)) {
-     blk = (hbuf_block*)(hbuf->data);
--    if (blk->prefix.xep184 == xep184) {
-+    if (!g_strcmp0 (blk->prefix.xep184, xep184)) {
-+      g_free (blk->prefix.xep184);
-       blk->prefix.xep184 = NULL;
-       blk->prefix.flags ^= HBB_PREFIX_RECEIPT;
-       return TRUE;
-diff -r 99db5d4ed047 mcabber/mcabber/hbuf.h
---- a/mcabber/mcabber/hbuf.h	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/hbuf.h	Mon Apr 30 23:10:28 2012 +0300
-@@ -50,7 +50,7 @@
- GList *hbuf_jump_date(GList *hbuf, time_t t);
- GList *hbuf_jump_percent(GList *hbuf, int pc);
- GList *hbuf_jump_readmark(GList *hbuf);
--gboolean hbuf_remove_receipt(GList *hbuf, gpointer xep184);
-+gboolean hbuf_remove_receipt(GList *hbuf, gconstpointer xep184);
- void hbuf_set_readmark(GList *hbuf, gboolean action);
- void hbuf_remove_trailing_readmark(GList *hbuf);
- 
-diff -r 99db5d4ed047 mcabber/mcabber/screen.c
---- a/mcabber/mcabber/screen.c	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/screen.c	Mon Apr 30 23:10:28 2012 +0300
-@@ -2239,7 +2239,7 @@
-     scr_show_window(jidto, FALSE);
- }
- 
--void scr_remove_receipt_flag(const char *bjid, gpointer xep184)
-+void scr_remove_receipt_flag(const char *bjid, gconstpointer xep184)
- {
-   winbuf *win_entry = scr_search_window(bjid, FALSE);
-   if (win_entry) {
-diff -r 99db5d4ed047 mcabber/mcabber/screen.h
---- a/mcabber/mcabber/screen.h	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/screen.h	Mon Apr 30 23:10:28 2012 +0300
-@@ -108,7 +108,7 @@
- void scr_update_main_status(int forceupdate);
- void scr_update_chat_status(int forceupdate);
- void scr_roster_visibility(int status);
--void scr_remove_receipt_flag(const char *jidto, gpointer xep184);
-+void scr_remove_receipt_flag(const char *jidto, gconstpointer xep184);
- void scr_show_buddy_window(void);
- int  scr_buddy_buffer_exists(const char *jid);
- void scr_update_buddy_window(void);
-diff -r 99db5d4ed047 mcabber/mcabber/xmpp.c
---- a/mcabber/mcabber/xmpp.c	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/xmpp.c	Mon Apr 30 23:10:28 2012 +0300
-@@ -295,15 +295,6 @@
-   g_slist_free(resources);
- }
- 
--static LmHandlerResult cb_xep184(LmMessageHandler *h, LmConnection *c,
--                                 LmMessage *m, gpointer user_data)
--{
--  char *from = jidtodisp(lm_message_get_from(m));
--  scr_remove_receipt_flag(from, h);
--  g_free(from);
--  return LM_HANDLER_RESULT_REMOVE_MESSAGE;
--}
--
- //  xmpp_send_msg(jid, text, type, subject,
- //                otrinject, *encrypted, type_overwrite)
- // When encrypted is not NULL, the function set *encrypted to 1 if the
-@@ -432,7 +423,8 @@
-     lm_message_node_set_attribute
-             (lm_message_node_add_child(x->node, "request", NULL),
-              "xmlns", NS_RECEIPTS);
--    *xep184 = lm_message_handler_new(cb_xep184, NULL, NULL);
-+    *xep184 = lm_get_uid ();
-+    lm_message_node_set_attribute (x->node, "id", (const gchar *)*xep184);
-   }
-   g_free(barejid);
- 
-@@ -499,11 +491,7 @@
-   if (mystatus != invisible)
- #endif
-     update_last_use();
--  if (xep184 && *xep184) {
--    lm_connection_send_with_reply(lconnection, x, *xep184, NULL);
--    lm_message_handler_unref(*xep184);
--  } else
--    lm_connection_send(lconnection, x, NULL);
-+  lm_connection_send(lconnection, x, NULL);
-   lm_message_unref(x);
- }
- 
-@@ -1305,6 +1293,16 @@
-     lm_message_unref(rcvd);
-   }
- 
-+  { // xep184 receipt confirmation
-+    LmMessageNode *received = lm_message_node_get_child (m->node, "received");
-+    if (received && !g_strcmp0 (lm_message_node_get_attribute (received, "xmlns"), NS_RECEIPTS)) {
-+      char       *jid = jidtodisp(from);
-+      const char *id  = lm_message_node_get_attribute (received, "id");
-+      scr_remove_receipt_flag(jid, id);
-+      g_free(jid);
-+    }
-+  }
-+
-   if (from) {
-     x = lm_message_node_find_xmlns(m->node, NS_MUC_USER);
-     if (x && !strcmp(x->name, "x"))
-diff -r 99db5d4ed047 mcabber/mcabber/xmpp_helper.c
---- a/mcabber/mcabber/xmpp_helper.c	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/xmpp_helper.c	Mon Apr 30 23:10:28 2012 +0300
-@@ -72,7 +72,6 @@
-   {0, NULL, NULL, NULL, NULL}
- };
- 
--
- #ifdef MODULES_ENABLE
- static GSList *xmpp_additional_features = NULL;
- static char *ver, *ver_notavail;
-@@ -104,6 +103,13 @@
- }
- #endif
- 
-+// The caller must g_free this after use
-+gchar *lm_get_uid ()
-+{
-+  static guint xmpp_uid = 0;
-+  return g_strdup_printf ("mc%u", ++xmpp_uid);
-+}
-+
- const gchar* lm_message_node_get_child_value(LmMessageNode *node,
-                                              const gchar *child)
- {
-diff -r 99db5d4ed047 mcabber/mcabber/xmpp_helper.h
---- a/mcabber/mcabber/xmpp_helper.h	Thu Mar 01 20:18:00 2012 +0100
-+++ b/mcabber/mcabber/xmpp_helper.h	Mon Apr 30 23:10:28 2012 +0300
-@@ -29,6 +29,8 @@
- void xmpp_del_feature (const char *xmlns);
- #endif
- 
-+gchar *lm_get_uid (void);
-+
- LmMessageNode *lm_message_node_new(const gchar *name, const gchar *xmlns);
- LmMessageNode *lm_message_node_find_xmlns(LmMessageNode *node,
-                                           const char *xmlns);
--- a/series	Sun Oct 14 16:52:27 2012 +0300
+++ b/series	Sun Oct 14 19:11:07 2012 +0300
@@ -1,6 +1,3 @@
-fix-create-new-cat.diff
-update-help.diff
-fix-receipts.diff
 switch-to-experimental.diff
 separate-extcmd.diff
 modularize-extcmd.diff
--- a/update-help.diff	Sun Oct 14 16:52:27 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-# HG changeset patch
-# Parent 2645908d70617e3abf44ca43e3a9236a71b28976
-Update help translations [UK, RU]
-Translate added strings in help files for 'buffer', 'iline' and 'room'.
-
-diff -r 2645908d7061 mcabber/doc/help/ru/hlp_buffer.txt
---- a/mcabber/doc/help/ru/hlp_buffer.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/ru/hlp_buffer.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -30,7 +30,7 @@
- /buffer % n
-  Перемещает на позицию %n в текущем буфере (истории переписки)
- /buffer readmark
-- Jump to the readmark (first unread line), if there is one
-+ Перемещает к разделителю непрочитанных сообщений (если он есть)
- /buffer search_backward text
-  Ищет введенное значение [text] в текущем буфере (истории переписки) (от переводчика: до текущей позиции)
- /buffer search_forward text
-diff -r 2645908d7061 mcabber/doc/help/ru/hlp_iline.txt
---- a/mcabber/doc/help/ru/hlp_iline.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/ru/hlp_iline.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -57,10 +57,10 @@
-  Закончить ввод, отправить строку текущему пользователю
- /iline iline_accept_down_hist
-  Закончить ввод, отправить строку текущему пользователю, поместить следующую строку истории в строку ввода
--/iline iline_insert text
-- Insert text in the input line, at the current position.  Please note that quotes have to be escaped, and that the screen is not refreshed (use /screen_refresh).
-+/iline iline_insert текст
-+ Вставить текст в текущей позиции курсора.  Заметьте, что кавычки в тексте необходимо обезвредить с помощью '\', а также, что экран не будет обновлен автоматически (используйте /screen_refresh)
- /iline clear_history
-- Clear the command line history
-+ Очистить историю команд
- /iline compl_do
-  Завершить текущее слово в строке ввода
- /iline compl_cancel
-diff -r 2645908d7061 mcabber/doc/help/ru/hlp_room.txt
---- a/mcabber/doc/help/ru/hlp_room.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/ru/hlp_room.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -43,7 +43,7 @@
-  Изменяет настройки для текущей конференции (уведомления о событиях в конференции)
-  Для опции "print_status" доступны следующие значения "default", "none", "in_and_out", "all".
-  Для опции "auto_whois" возможные значения "default", "off", "on".
-- For flag_joins, the possible values are "default", "none", "joins", "all".
-+ Для опции "flag_joins" возможны значения "default", "none", "joins", "all".
-  Когда опция выставлена в "default" используются параметры "muc_print_status" / "muc_auto_whois" / "muc_flag_joins".
- /room bookmark [add|del] [-autojoin|+autojoin] [-|nick]
-  Добавить, удалить или обновить закладку (по умолчанию: add - добавить)
-diff -r 2645908d7061 mcabber/doc/help/ru/hlp_roster.txt
---- a/mcabber/doc/help/ru/hlp_roster.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/ru/hlp_roster.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -59,6 +59,6 @@
-  Если текст не задан, отображается текущий комментарий -- если Вы находитесь в истории переписки, все заметки отображаются.
-  Если текст задан как "-", заметка стирается.
- /roster resource_lock [full jid|resource]
-- Set active resource for a buddy in roster. Accepts special jid "./resource" for current buddy, or just a resource name.
-+ Установить активный ресурс для указанного пользователя. Позволяет использовать формат "./resource" (или просто "resource") для указания текущего пользователя.
- /roster resource_unlock [jid]
-- Unset active resource for a buddy. Accepts special jid "." for current buddy.
-+ Отменить действие /roster resource_lock. Позволяет использовать "." для указания текущего пользователя.
-diff -r 2645908d7061 mcabber/doc/help/uk/hlp_buffer.txt
---- a/mcabber/doc/help/uk/hlp_buffer.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/uk/hlp_buffer.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -30,7 +30,7 @@
- /buffer % процент
-  Перейти до вказаної у процентах позиції.
- /buffer readmark
-- Jump to the readmark (first unread line), if there is one
-+ Перейти до розділювача непрочитаних повідомлень (якщо він є).
- /buffer search_backward текст
-  Шукати текст, рухаючись до початку буфера.
- /buffer search_forward текст
-diff -r 2645908d7061 mcabber/doc/help/uk/hlp_iline.txt
---- a/mcabber/doc/help/uk/hlp_iline.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/uk/hlp_iline.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -57,10 +57,10 @@
-  Затвердити рядок.
- /iline iline_accept_down_hist
-  Перейти до наступного рядка в історії, затвердивши поточний.
--/iline iline_insert text
-- Insert text in the input line, at the current position.  Please note that quotes have to be escaped, and that the screen is not refreshed (use /screen_refresh).
-+/iline iline_insert текст
-+ Вставити вказаний текст у поточній позиції курсору.  Зауважте, що лапки у тексті мають бути знешкоджені за допомогою '\', а також, що екран не буде оновлено автоматично (скористайтеся /screen_refresh).
- /iline clear_history
-- Clear the command line history
-+ Спустошити історію командного рядка.
- /iline compl_do
-  Доповнити поточне слово.
- /iline compl_cancel
-diff -r 2645908d7061 mcabber/doc/help/uk/hlp_room.txt
---- a/mcabber/doc/help/uk/hlp_room.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/uk/hlp_room.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -43,7 +43,7 @@
-  Встановлює додаткові параметри для поточної кімнати
-  print_status керує відображенням змін у статусі присутніх ("default", "none", "in_and_out", "all").
-  auto_whois визначає, чи запитувати автоматично інформацію про новоприбульців до кімнати ("default", "off", "on").
-- For flag_joins, the possible values are "default", "none", "joins", "all".
-+ flag_joins вказує, чи потрібно підсвічувати кімнату, коли хтось входить чи виходить ("default", "none", "joins", "all").
-  Коли встановлено "default", мають силу глобальні опції muc_print_status / muc_auto_whois / muc_flag_joins.
- /room bookmark [add|del] [+autojoin|-autojoin] [-|nick]
-  Додати, потерти, або замінити закладку (якщо не вказано - додасть).
-diff -r 2645908d7061 mcabber/doc/help/uk/hlp_roster.txt
---- a/mcabber/doc/help/uk/hlp_roster.txt	Sun Oct 14 16:37:53 2012 +0300
-+++ b/mcabber/doc/help/uk/hlp_roster.txt	Sun Oct 14 16:50:38 2012 +0300
-@@ -57,7 +57,7 @@
-  Встановити "текст" як нотатку.
-  Коли "текст" не вказано, покаже нотатку до поточного об'єкту (а якщо цей об'єкт є вікном стану - відобразить усі нотатки).
-  Якщо вказати "-", то нотатку буде витерто.
--/roster resource_lock [full jid|resource]
-- Set active resource for a buddy in roster. Accepts special jid "./resource" for current buddy, or just a resource name.
-+/roster resource_lock [повний jid|ресурс]
-+ Встановити вказаний ресурс активним. Дозволяє використовувати синтаксис "./ресурс" (або просто ресурс) для поточного контакту.
- /roster resource_unlock [jid]
-- Unset active resource for a buddy. Accepts special jid "." for current buddy.
-+ Скасувати попередні вказівки щодо активності ресурсів. Щоб вказати поточний контакт, можна використати ".".