Mercurial > pidgin
annotate src/gtkplugin.c @ 7715:9f6dc7b4fc57
[gaim-migrate @ 8360]
I didn't do this earlier, because I figured people would still want to add
their own HTML tags using CVS, but I strongly doubt anyone will be hit with
the overwhelming desire to manually change the font size in an IM until that
gets implemented. I'm escaping HTML now. This will only happen with protocols
that support HTML, other protocols will receive just the text in the box.
When the toolbar gets widgetized, it will become desensitive when the current
account does not support HTML.
Also, because it's been asked of me, your default outgoing font will be set
in the wysiwyg entry widget, and ctrl-up will show the correct formatting.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Wed, 03 Dec 2003 04:29:26 +0000 |
| parents | ee51189dfe76 |
| children | fa6395637e2c |
| 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 * | |
| 7 * Copyright (C) 2002-2003, Christian Hammond <chipx86@gnupdate.org> | |
|
6927
ee51189dfe76
[gaim-migrate @ 7474]
Christian Hammond <chipx86@chipx86.com>
parents:
5982
diff
changeset
|
8 * |
| 5205 | 9 * This program is free software; you can redistribute it and/or modify |
| 10 * it under the terms of the GNU General Public License as published by | |
| 11 * the Free Software Foundation; either version 2 of the License, or | |
| 12 * (at your option) any later version. | |
| 13 * | |
| 14 * This program is distributed in the hope that it will be useful, | |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 * GNU General Public License for more details. | |
| 18 * | |
| 19 * You should have received a copy of the GNU General Public License | |
| 20 * along with this program; if not, write to the Free Software | |
| 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 */ | |
| 23 #include "gtkplugin.h" | |
|
5981
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
24 #include "debug.h" |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
25 #include "prefs.h" |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
26 |
| 5205 | 27 #include <string.h> |
| 28 | |
| 29 GtkWidget * | |
| 30 gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin) | |
| 31 { | |
| 32 GaimGtkPluginUiInfo *ui_info; | |
| 33 | |
| 34 g_return_val_if_fail(plugin != NULL, NULL); | |
| 35 g_return_val_if_fail(GAIM_IS_GTK_PLUGIN(plugin), NULL); | |
| 36 | |
| 37 if (plugin->info->ui_info == NULL) | |
| 38 return NULL; | |
| 39 | |
| 40 ui_info = GAIM_GTK_PLUGIN_UI_INFO(plugin); | |
| 41 | |
| 42 if (ui_info->get_config_frame == NULL) | |
| 43 return NULL; | |
| 44 | |
| 45 return ui_info->get_config_frame(plugin); | |
| 46 } | |
|
5981
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
47 |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
48 void |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
49 gaim_gtk_plugins_save(void) |
|
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 GList *pl; |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
52 GList *files = NULL; |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
53 GaimPlugin *p; |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
54 |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
55 for (pl = gaim_plugins_get_loaded(); pl != NULL; pl = pl->next) { |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
56 p = pl->data; |
|
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 if (p->info->type != GAIM_PLUGIN_PROTOCOL && |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
59 p->info->type != GAIM_PLUGIN_LOADER) { |
|
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 files = g_list_append(files, p->path); |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
62 } |
|
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 |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
65 gaim_prefs_set_string_list("/gaim/gtk/plugins/loaded", files); |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
66 g_list_free(files); |
|
81564bb4db68
[gaim-migrate @ 6429]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
67 } |
