8 * [todo] Test ordering |
8 * [todo] Test ordering |
9 * [todo] Bump API (compatibly) |
9 * [todo] Bump API (compatibly) |
10 * [todo] Reallocate array, when need more completions |
10 * [todo] Reallocate array, when need more completions |
11 * [todo] Design and publish interface to dynamic completion cbs |
11 * [todo] Design and publish interface to dynamic completion cbs |
12 |
12 |
|
13 diff -r f8958ab545ac mcabber/ChangeLog.api |
|
14 --- a/mcabber/ChangeLog.api Mon Oct 15 19:53:02 2012 +0200 |
|
15 +++ b/mcabber/ChangeLog.api Thu Oct 18 15:34:38 2012 +0300 |
|
16 @@ -1,3 +1,9 @@ |
|
17 +dev (24) |
|
18 + * MQ patch completion-sorting.diff |
|
19 + * Add compl_set_flags() function |
|
20 + |
|
21 + -- Myhailo Danylenko, 2012-10-18 |
|
22 + |
|
23 dev (23) |
|
24 * Changeset 8dc418af3e72 |
|
25 Add buddy_(get|set)activeresource() functions |
|
26 diff -r f8958ab545ac mcabber/mcabber/api.h |
|
27 --- a/mcabber/mcabber/api.h Mon Oct 15 19:53:02 2012 +0200 |
|
28 +++ b/mcabber/mcabber/api.h Thu Oct 18 15:34:38 2012 +0300 |
|
29 @@ -3,12 +3,13 @@ |
|
30 |
|
31 #include <mcabber/config.h> // For MCABBER_BRANCH |
|
32 |
|
33 -#define MCABBER_API_VERSION 23 |
|
34 +#define MCABBER_API_VERSION 24 |
|
35 #define MCABBER_API_MIN 21 |
|
36 |
|
37 #define MCABBER_BRANCH_DEV 1 |
|
38 |
|
39 #define MCABBER_API_HAVE_CMD_ID 1 |
|
40 +#define MCABBER_API_HAVE_COMPL_FLAGS 1 |
|
41 |
|
42 extern const gchar *mcabber_branch; |
|
43 extern const guint mcabber_api_version; |
13 diff -r f8958ab545ac mcabber/mcabber/compl.c |
44 diff -r f8958ab545ac mcabber/mcabber/compl.c |
14 --- a/mcabber/mcabber/compl.c Mon Oct 15 19:53:02 2012 +0200 |
45 --- a/mcabber/mcabber/compl.c Mon Oct 15 19:53:02 2012 +0200 |
15 +++ b/mcabber/mcabber/compl.c Thu Oct 18 00:00:39 2012 +0300 |
46 +++ b/mcabber/mcabber/compl.c Thu Oct 18 15:34:38 2012 +0300 |
16 @@ -2,7 +2,7 @@ |
47 @@ -2,7 +2,7 @@ |
17 * compl.c -- Completion system |
48 * compl.c -- Completion system |
18 * |
49 * |
19 * Copyright (C) 2005-2010 Mikael Berthe <mikael@lilotux.net> |
50 * Copyright (C) 2005-2010 Mikael Berthe <mikael@lilotux.net> |
20 - * Copyright (C) 2009,2010 Myhailo Danylenko <isbear@ukrpost.net> |
51 - * Copyright (C) 2009,2010 Myhailo Danylenko <isbear@ukrpost.net> |
241 + "Rejecting builtin category."); |
272 + "Rejecting builtin category."); |
242 + else if (!(flags & COMPL_CAT_ACTIVE)) |
273 + else if (!(flags & COMPL_CAT_ACTIVE)) |
243 + scr_log_print(LPRINT_DEBUG, "Error: compl_set_flags() - " |
274 + scr_log_print(LPRINT_DEBUG, "Error: compl_set_flags() - " |
244 + "Not existing category."); |
275 + "Not existing category."); |
245 + else |
276 + else |
246 + Categories[compl].flags = (flags & ~COMPL_CAT_USERFLAGS) |
277 + Categories[compl].flags = (flags & ~COMPL_CAT_USERFLAGS) | |
247 + | ((new_flags << 2) & COMPL_CAT_USERFLAGS); |
278 + (new_flags & COMPL_CAT_USERFLAGS); |
248 + } else |
279 + } else |
249 + scr_log_print(LPRINT_DEBUG, "Error: compl_set_flags() - " |
280 + scr_log_print(LPRINT_DEBUG, "Error: compl_set_flags() - " |
250 + "Not existing category."); |
281 + "Not existing category."); |
251 } |
282 } |
252 #endif |
283 #endif |
509 } |
540 } |
510 |
541 |
511 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */ |
542 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */ |
512 diff -r f8958ab545ac mcabber/mcabber/compl.h |
543 diff -r f8958ab545ac mcabber/mcabber/compl.h |
513 --- a/mcabber/mcabber/compl.h Mon Oct 15 19:53:02 2012 +0200 |
544 --- a/mcabber/mcabber/compl.h Mon Oct 15 19:53:02 2012 +0200 |
514 +++ b/mcabber/mcabber/compl.h Thu Oct 18 00:00:39 2012 +0300 |
545 +++ b/mcabber/mcabber/compl.h Thu Oct 18 15:34:38 2012 +0300 |
515 @@ -28,10 +28,17 @@ |
546 @@ -28,10 +28,17 @@ |
516 #define COMPL_OTRPOLICY 21 |
547 #define COMPL_OTRPOLICY 21 |
517 #define COMPL_MODULE 22 |
548 #define COMPL_MODULE 22 |
518 |
549 |
519 +void compl_init_system(void); /* private */ |
550 +void compl_init_system(void); /* private */ |
531 #endif |
562 #endif |
532 |
563 |
533 void compl_add_category_word(guint categ, const gchar *command); |
564 void compl_add_category_word(guint categ, const gchar *command); |
534 diff -r f8958ab545ac mcabber/mcabber/main.c |
565 diff -r f8958ab545ac mcabber/mcabber/main.c |
535 --- a/mcabber/mcabber/main.c Mon Oct 15 19:53:02 2012 +0200 |
566 --- a/mcabber/mcabber/main.c Mon Oct 15 19:53:02 2012 +0200 |
536 +++ b/mcabber/mcabber/main.c Thu Oct 18 00:00:39 2012 +0300 |
567 +++ b/mcabber/mcabber/main.c Thu Oct 18 15:34:38 2012 +0300 |
537 @@ -364,13 +364,13 @@ |
568 @@ -364,13 +364,13 @@ |
538 } |
569 } |
539 |
570 |
540 /* Initialize command system, roster and default key bindings */ |
571 /* Initialize command system, roster and default key bindings */ |
541 + compl_init_system(); |
572 + compl_init_system(); |