pidgin/plugins/gtkbuddynote.c

Sun, 15 Jun 2008 06:55:21 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Sun, 15 Jun 2008 06:55:21 +0000
branch
cpw.qulogic.msn
changeset 23789
3ef57c5a8d9c
parent 20288
5ca925a094e2
child 29770
ae8b684d1a59
permissions
-rw-r--r--

Properly parse (most of) the MSN GCF command. Provides a
<Account>->"View Blocked Text" dialog showing the regular expressions
that the MSN servers are currently blocking. For the people who were
wondering why their messages were never received.

17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
1 /*
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
2 * GtkBuddyNote - Store notes on particular buddies
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
3 * Copyright (C) 2007 Etan Reisner <deryni@pidgin.im>
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
4 *
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
6 * modify it under the terms of the GNU General Public License
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
7 * as published by the Free Software Foundation; either version 2
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
8 * of the License, or (at your option) any later version.
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
9 *
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
13 * GNU General Public License for more details.
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
14 *
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
16 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18889
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
18 */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
19 #include "internal.h"
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
20
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
21 #include <gtkblist.h>
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
22 #include <gtkplugin.h>
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
23
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
24 #include <debug.h>
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
25 #include <version.h>
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
26
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
27 static void
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
28 append_to_tooltip(PurpleBlistNode *node, GString *text, gboolean full)
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
29 {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
30 if (full) {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
31 const gchar *note = purple_blist_node_get_string(node, "notes");
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
32
18324
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
33 if ((note != NULL) && (*note != '\0')) {
20095
c3c62efefdd0 applied changes from 23c81a483086f0c1541212be4c849abb05f9f3bd
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
34 char *tmp;
c3c62efefdd0 applied changes from 23c81a483086f0c1541212be4c849abb05f9f3bd
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
35 purple_markup_html_to_xhtml(note, NULL, &tmp);
18324
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
36 g_string_append_printf(text, _("\n<b>Buddy Note</b>: %s"),
20095
c3c62efefdd0 applied changes from 23c81a483086f0c1541212be4c849abb05f9f3bd
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
37 tmp);
c3c62efefdd0 applied changes from 23c81a483086f0c1541212be4c849abb05f9f3bd
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
38 g_free(tmp);
17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
39 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
40 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
41 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
42
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
43 static gboolean
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
44 plugin_load(PurplePlugin *plugin)
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
45 {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
46 purple_signal_connect(pidgin_blist_get_handle(), "drawing-tooltip",
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
47 plugin, PURPLE_CALLBACK(append_to_tooltip), NULL);
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
48 return TRUE;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
49 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
50
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
51 static gboolean
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
52 plugin_unload(PurplePlugin *plugin)
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
53 {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
54 PurplePlugin *buddynote = NULL;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
55
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
56 buddynote = purple_plugins_find_with_id("core-plugin_pack-buddynote");
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
57
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
58 purple_plugin_unload(buddynote);
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
59
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
60 return TRUE;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
61 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
62
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
63 static PurplePluginInfo info =
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
64 {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
65 PURPLE_PLUGIN_MAGIC,
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
66 PURPLE_MAJOR_VERSION, /**< major version */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
67 PURPLE_MINOR_VERSION, /**< minor version */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
68 PURPLE_PLUGIN_STANDARD, /**< type */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
69 PIDGIN_PLUGIN_TYPE, /**< ui_requirement */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
70 0, /**< flags */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
71 NULL, /**< dependencies */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
72 PURPLE_PRIORITY_DEFAULT, /**< priority */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
73 "gtkbuddynote", /**< id */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
74 N_("Buddy Notes"), /**< name */
20288
5ca925a094e2 applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20095
diff changeset
75 DISPLAY_VERSION, /**< version */
17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
76 N_("Store notes on particular buddies."), /**< summary */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
77 N_("Adds the option to store notes for buddies "
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
78 "on your buddy list."), /**< description */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
79 "Etan Reisner <deryni@pidgin.im>", /**< author */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
80 PURPLE_WEBSITE, /**< homepage */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
81 plugin_load, /**< load */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
82 plugin_unload, /**< unload */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
83 NULL, /**< destroy */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
84 NULL, /**< ui_info */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
85 NULL, /**< extra_info */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
86 NULL, /**< prefs_info */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
87 NULL, /**< actions */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
88
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
89 /* padding */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
90 NULL,
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
91 NULL,
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
92 NULL,
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
93 NULL
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
94 };
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
95
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
96 static gboolean
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
97 check_for_buddynote(gpointer data)
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
98 {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
99 PurplePlugin *buddynote = NULL;
18324
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
100 PurplePlugin *plugin = (PurplePlugin *)data;
17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
101
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
102 buddynote = purple_plugins_find_with_id("core-plugin_pack-buddynote");
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
103
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
104 if (buddynote == NULL) {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
105 buddynote = purple_plugins_find_with_basename("buddynote");
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
106 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
107
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
108 if (buddynote != NULL) {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
109 PurplePluginInfo *bninfo = buddynote->info;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
110
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
111 bninfo->flags = PURPLE_PLUGIN_FLAG_INVISIBLE;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
112
18324
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
113
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
114 /* If non-gtk buddy note plugin is loaded, but we are not, then load
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
115 * ourselves, otherwise people upgrading from pre-gtkbuddynote days
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
116 * will not have 'Buddy Notes' showing as loaded in the plugins list.
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
117 * We also trigger a save on the list of plugins because it's not been
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
118 * loaded through the UI. */
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
119 if (purple_plugin_is_loaded(buddynote) &&
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
120 !purple_plugin_is_loaded(plugin)) {
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
121 purple_plugin_load(plugin);
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
122 pidgin_plugins_save();
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
123 }
7ebbdeaaa30d Make gtkbuddynote load itself if it finds buddynote was loaded and it is
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17681
diff changeset
124
17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
125 } else {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
126 info.flags = PURPLE_PLUGIN_FLAG_INVISIBLE;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
127 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
128
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
129 return FALSE;
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
130 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
131
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
132 static void
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
133 init_plugin(PurplePlugin *plugin)
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
134 {
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
135 /* Use g_idle_add so that the rest of the plugins can get loaded
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
136 * before we do our check. */
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
137 g_idle_add(check_for_buddynote, plugin);
18889
2eda48021b49 Fix core plugin dependency registering for gtkbuddynote to happen in plugin_init() so that it can work correctly. Add an additional sanity check in the core plugin unloading so that messed up dependency registrations don't cause crashes in the future. Thanks to deryni for helping figure this out.
Daniel Atallah <datallah@pidgin.im>
parents: 18324
diff changeset
138
2eda48021b49 Fix core plugin dependency registering for gtkbuddynote to happen in plugin_init() so that it can work correctly. Add an additional sanity check in the core plugin unloading so that messed up dependency registrations don't cause crashes in the future. Thanks to deryni for helping figure this out.
Daniel Atallah <datallah@pidgin.im>
parents: 18324
diff changeset
139 info.dependencies = g_list_append(info.dependencies,
2eda48021b49 Fix core plugin dependency registering for gtkbuddynote to happen in plugin_init() so that it can work correctly. Add an additional sanity check in the core plugin unloading so that messed up dependency registrations don't cause crashes in the future. Thanks to deryni for helping figure this out.
Daniel Atallah <datallah@pidgin.im>
parents: 18324
diff changeset
140 "core-plugin_pack-buddynote");
17681
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
141 }
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
142
b16ce226d996 Fix #318 which asked for the buddynote plugins notes to be shown in the
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
143 PURPLE_INIT_PLUGIN(gtkbuddynote, init_plugin, info)

mercurial