Mon, 25 Aug 2003 02:49:42 +0000
[gaim-migrate @ 7145]
Individual accounts remember the "No Proxy" setting instead of reverting
back to "Use Global Proxy Settings"
Proxy settings for individual accounts do not revert to "No Proxy" if
you open an account, don't change the proxy drop down, then save the
account.
Those two sound like the same thing, but they're different. I think.
Added the "use environmental variables" setting in a way that isn't
horrible.
We're not using that thing that splits the proxy variable into
host:port yet. I'll do that later. I would have done that
earlier, but I had to go buy a bike.
Also, I'd like to show what the environmental variables are set to
somewhere. That'll come later.
Also a patch from Robot101:
(22:10:25) Bzubhipheron: I have a patch that replaces #define WFLAG_* with
GaimMessageFlags GAIM_MESSAGE_*
(22:10:30) Bzubhipheron: (an enum in disguise)
(22:14:18) Bzubhipheron: GaimMessageFlags protrays much better typing
information than "int". most of the other #defines are gone, and glib
standardises on enums for its flags too.
(22:14:27) Bzubhipheron: (gone or going)
(22:14:45) Bzubhipheron: and it makes the prototype of my message queueing stuff prettier.
committer: Mark Doliner <markdoliner@pidgin.im>
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
1 | #include "internal.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
2 | |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
3 | #include "blist.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
4 | #include "conversation.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
5 | #include "debug.h" |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
6 | #include "signals.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
7 | |
| 5267 | 8 | static void |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
9 | write_status(struct buddy *buddy, const char *message) |
| 5267 | 10 | { |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5587
diff
changeset
|
11 | GaimConversation *conv; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
12 | const char *who; |
| 5267 | 13 | char buf[256]; |
| 14 | ||
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
15 | conv = gaim_find_conversation_with_account(buddy->name, buddy->account); |
| 5267 | 16 | |
| 17 | if (conv == NULL) | |
| 18 | return; | |
| 19 | ||
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
20 | who = gaim_get_buddy_alias(buddy); |
| 5267 | 21 | |
|
6489
4281626455d8
[gaim-migrate @ 7003]
Robert McQueen <robot101@debian.org>
parents:
6485
diff
changeset
|
22 | g_snprintf(buf, sizeof(buf), message, who); |
| 5267 | 23 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6489
diff
changeset
|
24 | gaim_conversation_write(conv, NULL, buf, -1, GAIM_MESSAGE_SYSTEM, time(NULL)); |
| 5267 | 25 | } |
| 26 | ||
| 27 | static void | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
28 | buddy_away_cb(struct buddy *buddy, void *data) |
| 5267 | 29 | { |
|
6489
4281626455d8
[gaim-migrate @ 7003]
Robert McQueen <robot101@debian.org>
parents:
6485
diff
changeset
|
30 | write_status(buddy, _("%s has gone away.")); |
| 5267 | 31 | } |
| 32 | ||
| 33 | static void | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
34 | buddy_unaway_cb(struct buddy *buddy, void *data) |
| 5267 | 35 | { |
|
6489
4281626455d8
[gaim-migrate @ 7003]
Robert McQueen <robot101@debian.org>
parents:
6485
diff
changeset
|
36 | write_status(buddy, _("%s is no longer away.")); |
| 5267 | 37 | } |
| 38 | ||
| 39 | static void | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
40 | buddy_idle_cb(struct buddy *buddy, void *data) |
| 5267 | 41 | { |
|
6489
4281626455d8
[gaim-migrate @ 7003]
Robert McQueen <robot101@debian.org>
parents:
6485
diff
changeset
|
42 | write_status(buddy, _("%s has become idle.")); |
| 5267 | 43 | } |
| 44 | ||
| 45 | static void | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
46 | buddy_unidle_cb(struct buddy *buddy, void *data) |
| 5267 | 47 | { |
|
6489
4281626455d8
[gaim-migrate @ 7003]
Robert McQueen <robot101@debian.org>
parents:
6485
diff
changeset
|
48 | write_status(buddy, _("%s is no longer idle.")); |
| 5267 | 49 | } |
| 50 | ||
| 51 | static gboolean | |
| 52 | plugin_load(GaimPlugin *plugin) | |
| 53 | { | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
54 | void *blist_handle = gaim_blist_get_handle(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
55 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
56 | gaim_signal_connect(blist_handle, "buddy-away", |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
57 | plugin, GAIM_CALLBACK(buddy_away_cb), NULL); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
58 | gaim_signal_connect(blist_handle, "buddy-back", |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
59 | plugin, GAIM_CALLBACK(buddy_unaway_cb), NULL); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
60 | gaim_signal_connect(blist_handle, "buddy-idle", |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
61 | plugin, GAIM_CALLBACK(buddy_idle_cb), NULL); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
62 | gaim_signal_connect(blist_handle, "buddy-unidle", |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
63 | plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL); |
| 5267 | 64 | |
| 65 | return TRUE; | |
| 66 | } | |
| 67 | ||
| 68 | static GaimPluginInfo info = | |
| 69 | { | |
| 70 | 2, /**< api_version */ | |
| 71 | GAIM_PLUGIN_STANDARD, /**< type */ | |
| 72 | NULL, /**< ui_requirement */ | |
| 73 | 0, /**< flags */ | |
| 74 | NULL, /**< dependencies */ | |
| 75 | GAIM_PRIORITY_DEFAULT, /**< priority */ | |
| 76 | ||
| 77 | NULL, /**< id */ | |
| 78 | N_("Buddy State Notification"), /**< name */ | |
| 79 | VERSION, /**< version */ | |
| 80 | /** summary */ | |
| 81 | N_("Notifies in a conversation window when a buddy goes or returns from " | |
| 82 | "away or idle."), | |
| 83 | /** description */ | |
| 84 | N_("Notifies in a conversation window when a buddy goes or returns from " | |
| 85 | "away or idle."), | |
| 86 | "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6441
diff
changeset
|
87 | GAIM_WEBSITE, /**< homepage */ |
| 5267 | 88 | |
| 89 | plugin_load, /**< load */ | |
| 90 | NULL, /**< unload */ | |
| 91 | NULL, /**< destroy */ | |
| 92 | ||
| 93 | NULL, /**< ui_info */ | |
| 94 | NULL /**< extra_info */ | |
| 95 | }; | |
| 96 | ||
| 97 | static void | |
|
5920
963bfdefee02
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
98 | init_plugin(GaimPlugin *plugin) |
| 5267 | 99 | { |
| 100 | } | |
| 101 | ||
| 6063 | 102 | GAIM_INIT_PLUGIN(statenotify, init_plugin, info) |