Sun, 17 Oct 2004 23:55:49 +0000
[gaim-migrate @ 11141]
Two things:
a. Added Enter as a gtk_binding to GtkIMHtml. This fixes everything.
Input methods now work. The "Enter sends" and "Ctrl-Enter sends" preferences
were removed and defaulted to yes and no respectively, BUT, in a very super-cool
turn of events, you can now add your own bindings to .gtkrc to make WHATEVER
YOU WANT send. Awesome. Someone should use g_signal_accumulator_true_handled
or something to make profiles and away messages able to insert newlines.
b. Removed "Use multi-colored screennames in chats," defaulted to yes, and
wrote a nifty algorithm to automatically adjust the colors to accomodate the
background (see http://gaim.sf.net/sean/porn-chat.png). People should play
around and tweak it a bit. The algorithm takes into consideration the
luminosity of the current background and the base hue to use for the screenname
in generating the new colors. Note that it does this while maintaining the hues.
Someone should optimize this so it skips over the floating point arithmatic when
the background color is white.
| 6531 | 1 | #include "module.h" |
| 2 | ||
| 3 | MODULE = Gaim::BuddyList PACKAGE = Gaim::BuddyList PREFIX = gaim_blist_ | |
| 4 | PROTOTYPES: ENABLE | |
| 5 | ||
| 6 | void | |
| 7 | gaim_blist_set_visible(show) | |
| 8 | gboolean show | |
| 9 | ||
| 10 | void | |
| 11 | add_buddy(buddy, group) | |
| 12 | Gaim::BuddyList::Buddy buddy | |
| 13 | Gaim::BuddyList::Group group | |
| 14 | CODE: | |
|
6699
1af918908513
[gaim-migrate @ 7225]
Christian Hammond <chipx86@chipx86.com>
parents:
6545
diff
changeset
|
15 | gaim_blist_add_buddy(buddy, NULL, group, NULL); |
| 6531 | 16 | |
| 17 | void | |
| 18 | add_group(group) | |
| 19 | Gaim::BuddyList::Group group | |
| 20 | CODE: | |
| 21 | gaim_blist_add_group(group, NULL); | |
| 22 | ||
| 23 | void | |
| 24 | add_chat(chat, group) | |
| 25 | Gaim::BuddyList::Chat chat | |
| 26 | Gaim::BuddyList::Group group | |
| 27 | CODE: | |
| 28 | gaim_blist_add_chat(chat, group, NULL); | |
| 29 | ||
| 30 | void | |
| 31 | gaim_blist_remove_buddy(buddy) | |
| 32 | Gaim::BuddyList::Buddy buddy | |
| 33 | ||
| 34 | void | |
| 35 | gaim_blist_remove_group(group) | |
| 36 | Gaim::BuddyList::Group group | |
| 37 | ||
| 38 | void | |
| 39 | gaim_blist_remove_chat(chat) | |
| 40 | Gaim::BuddyList::Chat chat | |
| 41 | ||
| 42 | Gaim::BuddyList::Buddy | |
| 43 | find_buddy(account, name) | |
| 44 | Gaim::Account account | |
| 45 | const char *name | |
| 46 | CODE: | |
| 47 | RETVAL = gaim_find_buddy(account, name); | |
| 48 | OUTPUT: | |
| 49 | RETVAL | |
| 50 | ||
| 51 | void | |
| 52 | find_buddies(account, name) | |
| 53 | Gaim::Account account | |
| 54 | const char *name | |
| 55 | PREINIT: | |
| 56 | GSList *l; | |
| 57 | PPCODE: | |
| 58 | for (l = gaim_find_buddies(account, name); l != NULL; l = l->next) | |
| 59 | { | |
| 60 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, | |
| 61 | "Gaim::BuddyList::Buddy"))); | |
| 62 | } | |
| 63 | ||
| 64 | g_slist_free(l); | |
| 65 | ||
| 66 | Gaim::BuddyList::Group | |
| 67 | find_group(name) | |
| 68 | const char *name | |
| 69 | CODE: | |
| 70 | RETVAL = gaim_find_group(name); | |
| 71 | OUTPUT: | |
| 72 | RETVAL | |
| 73 | ||
| 74 | Gaim::BuddyList::Chat | |
| 75 | gaim_blist_find_chat(account, name) | |
| 76 | Gaim::Account account | |
| 77 | const char *name | |
| 78 | ||
|
6540
55a72edbd2d5
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
79 | void |
|
55a72edbd2d5
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
80 | groups() |
|
55a72edbd2d5
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
81 | PREINIT: |
|
55a72edbd2d5
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
82 | GaimBlistNode *node; |
|
6544
b248ad9766b1
[gaim-migrate @ 7066]
Christian Hammond <chipx86@chipx86.com>
parents:
6543
diff
changeset
|
83 | PPCODE: |
|
6543
4e9e0b46461c
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
84 | if (gaim_get_blist() != NULL) |
|
6540
55a72edbd2d5
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
85 | { |
|
6543
4e9e0b46461c
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
86 | for (node = gaim_get_blist()->root; node != NULL; node = node->next) |
|
4e9e0b46461c
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
87 | { |
|
4e9e0b46461c
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
88 | XPUSHs(sv_2mortal(gaim_perl_bless_object(node, |
|
4e9e0b46461c
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
89 | "Gaim::BuddyList::Group"))); |
|
4e9e0b46461c
[gaim-migrate @ 7065]
Christian Hammond <chipx86@chipx86.com>
parents:
6542
diff
changeset
|
90 | } |
|
6540
55a72edbd2d5
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
91 | } |
|
6545
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
92 | |
|
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
93 | void * |
|
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
94 | handle() |
|
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
95 | CODE: |
|
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
96 | RETVAL = gaim_blist_get_handle(); |
|
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
97 | OUTPUT: |
|
139a447a1419
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
98 | RETVAL |