Mercurial > pidgin
annotate src/gtkplugin.c @ 11176:6932df31225f
[gaim-migrate @ 13283]
Fix a buglet in auto linkifying mailto: things, which was causing the
MSN prpl to have kittens trying to parse what was being sent.
Also fixup the MSN parsing code to be more accomodating in what it
accepts from the core - as this code was originally borrowed from the
Zephyr prpl, robustify Zephyr in a similar way.
Unfortunately I have no way of testing the Zephyr fixes.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 31 Jul 2005 15:21:31 +0000 |
parents | 4a15962c344a |
children | 7e0ad3b6882a |
rev | line source |
---|---|
5205 | 1 /** |
6927
ee51189dfe76
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
2 * @file gtkplugin.c GTK+ Plugins support |
ee51189dfe76
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
3 * @ingroup gtkui |
5205 | 4 * |
5 * gaim | |
6 * | |
8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
6927
ee51189dfe76
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
10 * |
5205 | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
9791 | 25 #include "gtkgaim.h" |
5205 | 26 #include "gtkplugin.h" |
5981
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
27 #include "debug.h" |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
28 #include "prefs.h" |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
29 |
5205 | 30 #include <string.h> |
31 | |
32 GtkWidget * | |
33 gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin) | |
34 { | |
35 GaimGtkPluginUiInfo *ui_info; | |
36 | |
37 g_return_val_if_fail(plugin != NULL, NULL); | |
38 g_return_val_if_fail(GAIM_IS_GTK_PLUGIN(plugin), NULL); | |
39 | |
40 if (plugin->info->ui_info == NULL) | |
41 return NULL; | |
42 | |
43 ui_info = GAIM_GTK_PLUGIN_UI_INFO(plugin); | |
44 | |
45 if (ui_info->get_config_frame == NULL) | |
46 return NULL; | |
47 | |
48 return ui_info->get_config_frame(plugin); | |
49 } | |
5981
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
50 |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
51 void |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
52 gaim_gtk_plugins_save(void) |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
53 { |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
54 GList *pl; |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
55 GList *files = NULL; |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
56 GaimPlugin *p; |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
57 |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
58 for (pl = gaim_plugins_get_loaded(); pl != NULL; pl = pl->next) { |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
59 p = pl->data; |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
60 |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
61 if (p->info->type != GAIM_PLUGIN_PROTOCOL && |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
62 p->info->type != GAIM_PLUGIN_LOADER) { |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
63 |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
64 files = g_list_append(files, p->path); |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
65 } |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
66 } |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
67 |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
68 gaim_prefs_set_string_list("/gaim/gtk/plugins/loaded", files); |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
69 g_list_free(files); |
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
70 } |